Production TestFlight test crashes when start, but the same code/archive works when is signed for development distribution

Hi there, please we need your help.

Our case is the next.

  • We are using Xcode 13.4.1 for compatibility with a library.
  • We have a published app on March 1st of this year with any problem.
  • On August 31 we have uploaded a new version for test purposes, it was distributed by TestFlight without any problem.
  • Our original IOS distribution certificate expires on 2022/12/17.
  • On September 15th, we have created a new IOS distribution certificate.
  • On October 6th, we have create an App Store Profile based on the new iOS Distribution profile.

Our problem is when we archive new versions of the App and distribute for testing purposes by TestFlight, when we run on different devices (without iOS 16 by the way), it crashes. In devices with iOS 16, seems work fine. We have tested with the same archive but signed and exported for development, the App installed using this IPA works without any issue.

We also have tried deploy the same code of the App with a new archive IPA of August 31, it also crashes; this make us suspect the problem is at the signing/distribution phase.

We have the same problem at all crash reports give the next information:

  • Exception Type: EXC_CRASH (SIGABRT)
  • Exception Codes:
  • Exception Note: EXC_CORPSE_NOTIFY
  • Termination Reason: DYLD 4 Symbol missing
  • Symbol not found: (_swift_FORCE_LOAD$_swiftFoundation)

We have tried automatically and manual signing without any change. Thank you so much for your help.

look at [this](xcode13.4.1:Library not loaded: /usr/lib/swift/libswiftCoreGraphics.dylib https://developer.apple.com/forums/thread/715162?answerId=728753022#728753022) : some libraries may not be found and cause error with xCode 13.4.1. May be just using xCode 13.4 will help.

Thank you so much for the info, we'll test with xCode 13.4 and post the results.

Thank you for the help. We have performed the archive/distribution with xCode 13.4 and 13.2.1, but the same result :-(

Termination Reason: DYLD 4 Symbol missing Symbol not found: __swift_FORCE_LOAD_$_swiftFoundation Referenced from: /Volumes/VOLUME/*/Primax Go.app/Frameworks/IBMMobileFoundationSwift.framework/IBMMobileFoundationSwift Expected in: /System/Library/Frameworks/Foundation.framework/Foundation

You seem to use an external framework (IBMMobileFoundationSwift) . Have you the compatibility for swift version ?

The solution as you've mentioned and I forgot to applied, was change these compilation flags and distribution options: Build Settings / deployment / oAlways Embed Swift Libraries = Yes Build Settings / deployment / strip swift symbol = No Also when uploading : unselect 2 first options about BitCode and Strip Swift Symbols At this answer https://developer.apple.com/forums/thread/715162?answerId=728753022#728753022 By the way, with the changes, works even with xCode 13.4.1.

Thank you so much

I experience the same error you describe DYLD 4 Symbol missing, I run Xcode 14.0.1 though.

When I run my app through Xcode on a device running iOS 15.7 (15.x in general), the app works fine. When I make a release through the app store, the app crashes on launch on that same device.

After updating the same device to iOS 16.x the app works fine when released through the App Store.

Soon after I found the culprit. I received the same error as you.

It came from an imported library, where that library's "iOS Deployment Target" under Build Settings somehow was set to iOS 16.0, while all other libraries and the main project were set to iOS 11.0. Everything would compile normally, but the app would crash on any real device running 15.x and lower for release builds. Not sure why it still worked in the simulator or real device in debug build.

My solution: check all libraries used in your project whether their iOS Deployment Target is set to what you expect.

Production TestFlight test crashes when start, but the same code/archive works when is signed for development distribution
 
 
Q