App crash on iOS 16.7.8 installed by mdm

Hello,

I have a problem with an iOS app that is deployed via the MDM system Intune. The app closes immediately after starting. The APP works without distribution via the MDM. Devices with iOS 17 also work. I am attaching a crash report. (txt is ips)

Unfortunately I have no idea how to solve the problem because it only occurs via the MDM and therefore I cannot debug it. The problem occurs in production environment. Please help me with the solution.

Best regards Moritz

Answered by DTS Engineer in 792815022

Consider the crashing thread backtrace:

Thread 0 name:   Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib  … __pthread_kill + 8
1 libsystem_pthread.dylib … pthread_kill + 208
2 libsystem_c.dylib       … abort + 124
3 libswiftCore.dylib      … swift::fatalError(unsigned int, char const*, ...) + 56
4 libswiftCore.dylib      … checkVersion() + 60
5 dyld                    … invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const::$_0::operator()() const + 152
…

Frame 5 shows the dynamic linker calling library initialisers to start your app. Frame 4 is a Swift runtime library checking its context. Frames 3 through 0 show that this check failed, resulting in a trap.

Now consider this:

Binary Images:
       …
       0x106f68000 -        0x107287fff libswiftCore.dylib arm64  <ad0cad3b1b51332786448be1ff1f0ae9> /private/var/containers/Bundle/Application/608D3D36-BE60-4B41-8BD4-B1BD8C74BE48/Insight Mobile.app/Frameworks/libswiftCore.dylib
       …

This shows that this Swift runtime library was loaded from within your app. That’s wrong, because iOS 16 has the Swift runtime built in [1].

This problem is almost certainly caused by a out of order entry in your app’s rpath list. I explain that in more detail in the Swift System Libraries section of Dynamic Library Standard Setup for Apps.

Share and Enjoy

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

[1] That’s been the case since iOS 12.3-ish.

Consider the crashing thread backtrace:

Thread 0 name:   Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib  … __pthread_kill + 8
1 libsystem_pthread.dylib … pthread_kill + 208
2 libsystem_c.dylib       … abort + 124
3 libswiftCore.dylib      … swift::fatalError(unsigned int, char const*, ...) + 56
4 libswiftCore.dylib      … checkVersion() + 60
5 dyld                    … invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const::$_0::operator()() const + 152
…

Frame 5 shows the dynamic linker calling library initialisers to start your app. Frame 4 is a Swift runtime library checking its context. Frames 3 through 0 show that this check failed, resulting in a trap.

Now consider this:

Binary Images:
       …
       0x106f68000 -        0x107287fff libswiftCore.dylib arm64  <ad0cad3b1b51332786448be1ff1f0ae9> /private/var/containers/Bundle/Application/608D3D36-BE60-4B41-8BD4-B1BD8C74BE48/Insight Mobile.app/Frameworks/libswiftCore.dylib
       …

This shows that this Swift runtime library was loaded from within your app. That’s wrong, because iOS 16 has the Swift runtime built in [1].

This problem is almost certainly caused by a out of order entry in your app’s rpath list. I explain that in more detail in the Swift System Libraries section of Dynamic Library Standard Setup for Apps.

Share and Enjoy

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

[1] That’s been the case since iOS 12.3-ish.

App crash on iOS 16.7.8 installed by mdm
 
 
Q