Forum Xamarin.iOS

App re-compiled against the new iOS 10 SDK crash at startup on iOS 8.1simulator

SeacenSeacen USMember
edited September 2016 in Xamarin.iOS

Everything is fine on iOS 10, but app crashes at startup on iOS 8.1 .

I saw the following in the release notes:

Issue: Applications re-compiled against the new iOS 10 SDK crash at startup. iOS 10 requires additional keys (in their Info.plist) to access some private resources (e.g. calendar, photos, music...). iOS will crash (by design) applications using the related API if those keys are missing. (The string "CRASHING_DUE_TO_PRIVACY_VIOLATION" can appear in the stack trace for the crash in these cases.)

Workaround: Update your Info.plist with the required privacy keys. The required key (causing the crash) can be seen in the device logs.

My app doesn't require access to any private resources as far as I'm aware, I couldn't find any device log either.

This is the console output when debugging the app on iOS 8.1:

Launching 'Colosseo' on 'iPhone 6 iOS 8.1'...
Launch succeeded. The app  'Colosseo' has been successfully launched on 'iPhone 6 iOS 8.1'.
The app has been terminated.

It wouldn't debug any further.


I just deployed the app to an iOS8.1 iPad mini device and it launched fine. It seems that this is only a problem with the simulator.


Best Answer


  • NuninzNuninz USMember ✭✭

    It's happening the same with me! Glad it works with a iOS 8 device, unfortunately I don't have any to test

  • ArramusArramus USMember

    Hey guys,

    I also have this problem, has anyone found out the reasoning behind it? I'm not sure if its a code specific problem or just a problem with the simulators due to not having any testing devices currently.

  • LarryOBrienLarryOBrien USXamarin Team Xamurai

    If you don't use a privacy-related topic and it only crashes on the simulator, the other thing that jumps out is whether you're attempting to access a hardware feature that is not emulated by the simulator. Are you doing anything with Core Motion or wide-color?

    To help others with "crash on startup":

    The privacy issue and NS{Topic}UsageDescription requirement is definitely one that bites you when you switch to iOS 10 and it fits your description of the "crash on launch" (well, crash on the first access of the private topic, which is often done during startup).

    Here are the topics:

    • Bluetooth Sharing
    • Calendar
    • CallKit/VoIP
    • Camera
    • Contacts
    • Health
    • HomeKit
    • Location
    • Media Library
    • Microphone
    • Motion
    • Photos
    • Reminders
    • Speech Recognition
    • SiriKit
    • TV Provider
  • ArramusArramus USMember

    Hi @LarryOBrien , thanks for your guidance.

    We've been able to get the app to run on iOS 8.1 by enabling linking. Both 'Link all assemblies' and 'Link SDK assemblies only' fix the crash. Do you have any idea as to why this fixes it?

    We aren't using core motion or wide-color. We do access the contacts but we have the required 'NSContactsUsageDescription' key in our Info.plist and the app works fine (without linking) on iOS 9+.

  • Same problem here. The workaround suggested by @Arramus works for me as well.


    • App runs fine on iOS 9.X and 10.X emulators
    • App crashes on iOS 8.X emulators
    • Workaround: Make sure that the build option to 'Link all assemblies' or 'Link SDK assemblies only' is checked.
    • Root cause: See my device system log below. It seems that when the SDK assemblies are not linked, a referenced library fails to load with the message "CoreAudioKit: mach-o, but not built for iOS simulator". My app does not use core audio, and that is why this library is only referenced when the SDK assemblies are not linked.

    I personally don't know if this is a Xamarin or an Xcode installation issue.

    System Logs for app crash on iOS 8.1 ===========================

        Process:               APPLICATION_NAME [9582]
        Path:                  /Users/USER/Library/Developer/CoreSimulator/Devices/DD358A28-1C22-4399-8CDA-4231169D40D7/data/Containers/Bundle/Application/B4C1BB8B-6086-4E2A-9773-B08D4BC5F65C/
        Identifier:            APPLICATION_NAME
        Version:               ???
        Code Type:             X86-64 (Native)
        Parent Process:        launchd_sim [9492]
        Responsible:           APPLICATION_NAME [9582]
        User ID:               501
        Date/Time:             2016-10-11 18:22:56.344 -0500
        OS Version:            Mac OS X 10.11.6 (15G1004)
        Report Version:        11
        Anonymous UUID:        0DBF1E70-A92F-AE4C-781F-C8AE779FBF43
        Sleep/Wake UUID:       0864C6CD-AF73-4660-B7D4-F171AD73DB45
        Time Awake Since Boot: 440000 seconds
        Time Since Wake:       490 seconds
        System Integrity Protection: enabled
        Crashed Thread:        0
        Exception Type:        EXC_BREAKPOINT (SIGTRAP)
        Exception Codes:       0x0000000000000002, 0x0000000000000000
        Exception Note:        EXC_CORPSE_NOTIFY
        Application Specific Information:
        dyld: launch, loading dependent libraries
        DYLD_ROOT_PATH=/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 8.4.simruntime/Contents/Resources/RuntimeRoot
        DYLD_FALLBACK_FRAMEWORK_PATH=/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 8.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks
        DYLD_FALLBACK_LIBRARY_PATH=/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 8.4.simruntime/Contents/Resources/RuntimeRoot/usr/lib
        DYLD_FALLBACK_FRAMEWORK_PATH=/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 8.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks
        DYLD_FALLBACK_LIBRARY_PATH=/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 8.4.simruntime/Contents/Resources/RuntimeRoot/usr/lib
        Dyld Error Message:
          Library not loaded: /System/Library/Frameworks/CoreAudioKit.framework/CoreAudioKit
          Referenced from: /Users/USER/Library/Developer/CoreSimulator/Devices/DD358A28-1C22-4399-8CDA-4231169D40D7/data/Containers/Bundle/Application/B4C1BB8B-6086-4E2A-9773-B08D4BC5F65C/
          Reason: no suitable image found.  Did find:
            /System/Library/Frameworks/CoreAudioKit.framework/CoreAudioKit: mach-o, but not built for iOS simulator
        Binary Images:
               0x10ce19000 -        0x10ce3d77f +dyld_sim (360.22) <CA4A779A-BA45-39C7-9456-1B8A06818142> /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 8.4.simruntime/Contents/Resources/RuntimeRoot/usr/lib/dyld_sim
            0x7fff6f75b000 -     0x7fff6f792a47  dyld (360.22) <DC81CC9D-651A-3A45-8809-928282052BD3> /usr/lib/dyld
  • @LarryOBrien See my comment above. It should help the team investigate further.

  • MichelangeloFrancoMichelangeloFranco ITUniversity ✭✭✭

    My App just work fine except on ios10, I using location update so I have to enable Background modes -> Location Update in my info.plist and everything works.

    Hope this help

  • I am starting to have this issue with other simulators too (like iOS 10). The workaround of Linking SDK assemblies still works, but it really slows down compilation time.

    @MichelangeloFranco Thanks for your tip, but I think that the root cause for this issue is compilation-related. The compiler is obviously trying to load unnecessary assemblies that are missing whenever the Xamarin SDK is not explicitly linked.

  • NateCookPersonalNateCookPersonal USUniversity ✭✭
    edited November 2016

    We're running into the iOS 8 simulator issue as well. Linking SDK assemblies for the simulator also fixes it for us. Has anyone opened a bugzilla on this issue that we can all track?

    Edit: Adding the original error message I saw in my simulator log here, for SEO purposes in case people are googling what I was googling before I found this thread. The error message was Service exited due to signal: Trace/BPT trap: 5 Application 'UIKitApplication:com.our.domain[0xa7db]' crashed.

Sign In or Register to comment.