iOS app crashes at launch on Testflight for iOS 14 and below but not iOS 15+

We're having some strange issue with our app and/or Testflight since a few days ago: our app runs fine on simulator and devices (iOS 12, iOS 14 & iOS 15) when run from Xcode, but it crashed at launch when we archive and distribute it via Testflight for iOS 14 and below, but NOT for iOS 15 (we haven't tried to actually release to the AppStore). The app was working perfectly fine on iOS 12+ until then, on Testflight or otherwise. No crash log is ever generated by these crashes (either on Crashlytics, or Organizer, or even in the device crash logs), and what's more mysterious is that when re-archiving past versions of the code that had no issues 3 weeks ago and are live on the app store, we are now getting the crashes. We've dug into the device logs to try and get some more info, and we could find

com.apple.stability.crash {"appVersion":"3.3.1","bundleID":"com.cobble.ios","exceptionCodes":"0x0000000000000000, 0x0000000000000000","incidentID":"B47DF725-343B-4D8E-A1C4-8F52EB5766C1","logwritten":1,"process":"Cobble Production","terminationReasonExceptionCode":"0x1","terminationReasonNamespace":"DYLD"}

for iOS 14, and

Process exited: <FBApplicationProcess: 0x10a2dd110; Cobble Producti (com.cobble.ios); pid: -1> -> <FBApplicationProcessExitContext: 0x28331a100; exitReason: (none); terminationReason: (none)> {
    stateAtExit = <FBProcessState: 0x283cd8cc0; pid: 4156; taskState: Not Running; visibility: Unknown>;
}

for iOS 12.

We haven't had any luck so far figuring out what the issue(s) can be, but we've tried a lot of things from building on different computers, playing around in the build settings, updating our pods, to fully uninstalling/reinstalling Xcode and the project from Github.. It might be worth noting that we're using automatic signing from Xcode (changing that is our next test)

Any help would be greatly appreciated!!

We've also posted this question on StackOverflow (https://stackoverflow.com/questions/70316323/ios-app-crashes-at-launch-on-testflight-for-ios-14-and-below-but-not-ios-15)

  • Seeing identical behavior. One caveat is my current code is using the back-ported Swift concurrency on iOS 14. The app works fine in simulator and device with Xcode on iOS 14, but crashes on launch with TestFlight build. The TestFlight build works on iOS 15. Haven't tried using older code, but based on what we're both seeing, I think this is an Apple/TestFlight issue they need to fix.

Add a Comment

Accepted Reply

We've ended up finding a solution for our issue:

  • we're using the new Xcode 13.2RC (not ideal since it's not a final release yet, but no luck without it) - you'll need the latest MacOS to run it
  • we've removed support for iOS 12 from our build (which thankfully we could afford to do since only a tiny fraction of our users were still using that version)

These 2 things are both required on our end, trying to do one without the other would still show us the crashes.

I don't know if this is going to be the solution for everybody, so here's a link we've used to get some ideas: https://developer.apple.com/forums/thread/696197

Also wanted to add to the things we've tested while debugging:

  • From Xcode Organizer, distributing as Dev or Ad Hoc an archive that presents the issue on Testflight does NOT present the issue when installing directly to device, which reinforces the idea this is not a code/archive issue
  • We've switched automated app signing to manual using all sorts of provisioning profiles (ad hoc, dev & distribution, using either iOS-only or Apple certificates), and the issue only presents itself when distributing to Testflight/Store using the distribution profiles

At the end of the day, it does look like an Apple issue and we would expect to see a fix soon - especially since more and more people have been faced with a similar problem.

Replies

Take a look at the most recent set of framework APIs added, this could be an API only available to iOS 15 and higher.

See a related thread. Apparently this is caused by Xcode versions. Apple did something which causes TestFlight builds to crash when built with older Xcodes, but it works when using 13.2 RC. https://developer.apple.com/forums/thread/696197

  • Still crashing on < iOS 15 with iOS 13.2 RC. Attempted using the workaround described in the thread (linking libswift_Concurrency.tbd) but no difference.

    Can someone from Apple please look into a resolution? Thanks.

Add a Comment

We've ended up finding a solution for our issue:

  • we're using the new Xcode 13.2RC (not ideal since it's not a final release yet, but no luck without it) - you'll need the latest MacOS to run it
  • we've removed support for iOS 12 from our build (which thankfully we could afford to do since only a tiny fraction of our users were still using that version)

These 2 things are both required on our end, trying to do one without the other would still show us the crashes.

I don't know if this is going to be the solution for everybody, so here's a link we've used to get some ideas: https://developer.apple.com/forums/thread/696197

Also wanted to add to the things we've tested while debugging:

  • From Xcode Organizer, distributing as Dev or Ad Hoc an archive that presents the issue on Testflight does NOT present the issue when installing directly to device, which reinforces the idea this is not a code/archive issue
  • We've switched automated app signing to manual using all sorts of provisioning profiles (ad hoc, dev & distribution, using either iOS-only or Apple certificates), and the issue only presents itself when distributing to Testflight/Store using the distribution profiles

At the end of the day, it does look like an Apple issue and we would expect to see a fix soon - especially since more and more people have been faced with a similar problem.

I know that this thread is a year old, but I just ran into the same issue. Built my app (using Xamarin), latest XCode, brand new iMac. Uploaded to TestFlight and when testing it would crash without leaving any trace in TestFlight, app logs, or App Center Analytics (which I use to capture exceptions). It looked as if it never launched.

I would get the splash screen for under a second and it would crash.

Thanks to comments in here, I updated my min supported iOS Version from 12 to 13 and it now works. This will have no effect on my user base, but I can imagine it would cause issues for apps with a wider audience.

Thank you to all

Hello everyone,

I also had this problem that I recently encountered and the solution I found, as it may be helpful to others.

Im on Mac Monterey 12.6.3 and Xcode 14.2.

I had an issue where my iOS app was crashing on launch when distributed through TestFlight for devices running iOS 14 and below. The crashes were difficult to diagnose as no crash logs were being generated.

After exhausting several debugging options, I stumbled upon this thread and I followed suit, changing my app's minimum deployment target from iOS 14 to iOS 15. This effectively resolved the crashes and the app now runs smoothly through TestFlight on devices running iOS 15 and up.

It's noteworthy that the issue seems to be related to the distribution through TestFlight, as the app ran without issues in local development and direct device installation from Xcode Organizer. It suggests that the problem may be on Apple's end with TestFlight or specific iOS versions' compatibility.

I hope this helps anyone facing a similar issue! Looking forward to seeing Apple resolve this issue soon