Xcode 13.3: dependent dylib '@rpath/Alamofire.framework/Alamofire' not found on iOS 14 only

Date/Time:           2022-03-24 10:11:13.6158 +0800
Launch Time:         2022-03-24 10:11:13.5675 +0800
OS Version:          iPhone OS 14.4 (18D52)
Release Type:        User
Baseband Version:    1.42.03
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Description: DYLD, dyld: Using shared cache: C784A723-0833-38DE-AC50-E2ECDCC7D4B4 | dependent dylib '@rpath/Alamofire.framework/Alamofire' not found for '/private/var/containers/Bundle/Application/F07FEC26-71CE-4562-BE1E-F26C87EAFC94/AppName.app/AppName'. chained fixups, seg_count exceeds number of segments
Highlighted by Thread:  0

Backtrace not available

Unknown thread crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000006   x1: 0x0000000000000001   x2: 0x000000016dae6030   x3: 0x000000000000009b
    x4: 0x000000016dae5c30   x5: 0x0000000000000000   x6: 0x0000000000000000   x7: 0x0000000000000000
    x8: 0x0000000000000020   x9: 0x0000000000000009  x10: 0x0000000000000001  x11: 0x00000000000000a7
   x12: 0x0000000000000023  x13: 0x0000000000000008  x14: 0x0000000000000033  x15: 0x0000000000000038
   x16: 0x0000000000000209  x17: 0x00000001026c17b4  x18: 0x0000000000000000  x19: 0x0000000000000000
   x20: 0x000000016dae5c30  x21: 0x000000000000009b  x22: 0x000000016dae6030  x23: 0x0000000000000001
   x24: 0x0000000000000006  x25: 0x000000016dae68f8  x26: 0x00000001026e8778  x27: 0x00000001026e8000
   x28: 0x0000000000000000   fp: 0x000000016dae5c00   lr: 0x00000001026cf6e0
    sp: 0x000000016dae5bc0   pc: 0x00000001026c7440 cpsr: 0x00000000
   esr: 0x00000000  Address size fault

Binary images description not available

Error Formulating Crash Report:
Failed to create CSSymbolicatorRef - corpse still valid ¯\_(ツ)_/¯

EOF

Several users reported this bug. I cannot reproduce this bug using iOS 14.2.x. But users with iOS 14.4 and 14.8.1 are seeing this bug constantly.

(FB9967946)

Embed without code sign if it is an AppName.workspace made up of an AppName.project & Alamofire.project where Alamofire is a linked framework to the AppName.project

We're facing a very similar issue (not with Alamofire but another dependency). Is there any workaround for this?

This is the key info:

chained fixups, seg_count exceeds number of segments

One of my colleagues posted more info about that in another thread, including a workaround.

Xcode 13.3: dependent dylib '@rpath/Alamofire.framework/Alamofire' not found on iOS 14 only
 
 
Q