Hello,
I have an iOS app built using the .NET 8 iOS framework, and I'm encountering a puzzling issue: the app crashes immediately on launch, but only for some users.
What We Know:
The crash is not device or OS-specific. It affects a few users on iPhone 14 and iPhone 15, across various iOS versions (e.g., 17.7, 18.5, and even the latest). Other users with identical device and OS specs are able to run the app without issues. The crash only occurs when the app is installed via App Store or TestFlight. If the same IPA is distributed via a third-party tool like Updraft, the app runs fine for affected users. This suggests the issue may be related to code signing or packaging during submission to App Store Connect.
What We've Tried:
Added additional exception and error handling in didFinishLaunchingWithOptions. Experimented with build settings, including enabling AOT compilation. Reviewed crash logs and symbolicated them using atos.
Crash Log Snippet:
Here’s a portion of the lastExceptionBacktrace from the crash logs:
"lastExceptionBacktrace": [
{"imageOffset":1155264,"symbol":"__exceptionPreprocess","symbolLocation":164,"imageIndex":12},
{"imageOffset":203452,"symbol":"objc_exception_throw","symbolLocation":88,"imageIndex":13},
{"imageOffset":4403460,"imageIndex":0}, -xamarin_unhandled_exception_handler (in TheApp) (runtime.m:1129)
{"imageOffset":8159120,"imageIndex":0}, -native_to_managed_trampoline_23(objc_object*, objc_selector*, _MonoMethod**, objc_object*, objc_object*, unsigned int) (in TheApp) (registrar.mm:1453)
{"imageOffset":8169364,"imageIndex":0}, -[AppDelegate application:didFinishLaunchingWithOptions:] (in TheApp) (registrar.mm:7895)
{"imageOffset":1277452,"symbol":"-[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:]","symbolLocation":320,"imageIndex":15},
{"imageOffset":1284496,"symbol":"-[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:]","symbolLocation":2988,"imageIndex":15},
{"imageOffset":1267976,"symbol":"-[UIApplication _runWithMainScene:transitionContext:completion:]","symbolLocation":972,"imageIndex":15},
{"imageOffset":1266804,"symbol":"-[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:]","symbolLocation":132,"imageIndex":15},
...] There is more if this is not enough of the log
Request for Help:
We’re looking for any insights or suggestions. Could this be related to App Store signing, entitlements, or something else we're overlooking? Has anyone encountered a similar issue with .NET 8 iOS apps?
Thanks in advance for your help!