Xcode 13.3 App Crashes on Launch

We are seeing a crash on launch on Xcode 13.3 which did not happen on 13.2.x.

dyld[80074]: Symbol not found: _$s10Foundation10URLRequestV10httpMethodSSSgvs

Has anyone see this kind of dynamic linking error before?

To be more clear here, Xcode is not crashing, but our iOS app is crashing when trying to run with Xcode 13.3. When compiling the same code with Xcode 13.2.x, the app does not crash.

Any progress on this one?

I'm seeing a similar issue -- different symbol but its still from Foundation:

dyld[38483]: Symbol not found: _$s10Foundation10CocoaErrorV03_nsC0So7NSErrorCvg

App works fine in 13.2.1.

Does this crash only occur on iOS 14?

We found that including the swiftlibFoundation.tbd files in the build phase allowed us to move past the foundation link error. However, dyld failed in a different location. Adding more .tbd files just produced errors in other places.

I used otool -l to show the loading paths. I compared the output the working Xcode 13.2.1 built binary and the Xcode 13.3 and the only difference I found was the version number of Foundation.

Load command 284      cmd LC_LOAD_DYLIB    cmdsize 64      name /usr/lib/swift/libswiftFoundation.dylib (offset 24)   time stamp 2 Wed Dec 31 16:00:02 1969    current version 69.0.0 compatibility version 1.0.0

Load command 284      cmd LC_LOAD_DYLIB    cmdsize 64      name /usr/lib/swift/libswiftFoundation.dylib (offset 24)   time stamp 2 Wed Dec 31 16:00:02 1969    current version 72.105.0

We are using cocoa pods to build the frameworks that get included in this library.

I did an "nm" of the framework that was causing the problem and found the missing symbol is the first symbol in the file.

(undefined) external _$s10Foundation10URLRequestV10httpMethodSSSgvs (from libswiftFoundation)

However, this symbol also appears at the top of the working Xcode 13.2.1 built library as well.

We believe Apple is aware of this issue and is investigating this as a possible but in Xcode 13.3.

I have same issue with xcode 13.3. And what 's your solution? Can you help me?

The problem happens when the total embedded frameworks + dynamic iOS embedded libraries exceeds 240. At least, that's what we've learned in our exchanges with Apple Developer Technical support so far. Converting cocoa pods to swift packages will reduce the number of embedded frames works in the app bundle. However, we still have not been able to overcome the bug in the Apple Linker at this time.

I didn’t take that TSI but I have some fact and some opinions…

This is definitely a bug in the linker (r. 91272871). I don’t have any info to share as to when the fix will ship.

Having said that, my advice is to restructure your app to use fewer dynamic libraries. Regardless of this issue, every dynamic library has a binary size and runtime performance cost. On other platforms that might be justified but that’s not the case on iOS, where you app ship as a monolithic unit.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Apparently this is the same crash reported here: https://developer.apple.com/forums/thread/705781

These crashes are resolved if you rebuild your app with Xcode 13.4. Try the Release Candidate, and use Feedback Assistant if you continue to encounter this crash, and post the FB number here.

Thanks Ed! I think this fixed the problem.

Xcode 13.3 App Crashes on Launch
 
 
Q