iOS release version crashes immediately after showing splash screen. Works fine debug mode.

LeoJHarrisLeoJHarris NZMember ✭✭✭
edited June 18 in Xamarin.Forms

Hi all,

Im having a major issue here that Ive been battling now for last few days and this was previously working as well. My release version on the app store is crashing directly after the splash screens show up. Debug version runs fine as does the adhoc version that I installed from hockeyapp - both work fine. Release version downloaded from store is not working fine.

The only thing that has changed since I was able to get release version to work was my provisioning profiles expired and the distribution certificate expired I've since created a new distribution certificate and distribution provisioning profile. I used the same .certSigningRequest that I used for the expired distribution certificate to renew that.

Im running Xcode 10.1 on my mac mini running 10.13.6 with Visual studio is 2019, I have a red squigly line on the solution saying 'xcode version 10.1 not compatable with this version of Visual Studio... Please install version 10.2' however I cant install 10.2 as my mac machine not compatable with xcode 10.2.

Below is the provision I use for building the release version that I submit to the store:

Visual studio setup for release then I do a build and see the IPA on the build server (mac machine)

below is iOS log report at the time of crash:

I'm not sure what left to check as this was definely working fine on previous release version..

I really need to get some help on this!

Best Answer

  • LeoJHarrisLeoJHarris NZ ✭✭✭
    edited August 12 Accepted Answer

    I have tried with a newer mac with lastest xcode and problem still persists and unfortunately we need to target iOS 10+. I checked device crash log on my ipad and the following was the exception when the app crashes immediately on launch from Test Flight / App Store:

        {"bug_type":"109","os_version":"iPhone OS 10.3.3 (14G60)","build_version":"20",
    "timestamp":"2019-08-12 13:22:57.19 +1200","is_beta":true,"app_name":"SampleApp.iOS","app_cohort":"2|date=1565571600000&sf=143461&tid=04e4ca7358ea8d2fba25d0b81f5490f8dffc926b37292b959073ec2761cfd257&ttype=i",
    "bundleID":"com.myapp.sampleapp","incident_id":"C2990110-841A-4BBC-916A-61190A0D1CA9","name":"SampleApp.iOS","is_first_party":false,"app_version":"4.0","share_with_app_devs":false,"slice_uuid":"692e9d46-abd9-3e3f-a0ce-dbe5932cdc9b","adam_id":1474065797}
        Incident Identifier: C2990110-841A-4BBC-916A-61190A0D1CA9
        Beta Identifier:     281613BC-F3E4-42D7-8F93-0EE24AAEDE16
        Hardware Model:      iPad3,4
        Process:             SampleApp.iOS [1056]
        Path:                /private/var/containers/Bundle/Application/E15C620A-6E99-46ED-A9D7-95BA048E2B26/SampleApp.iOS.app/SampleApp.iOS
        Identifier:          com.myapp.sampleapp
        Version:             20 (4.0)
        Beta:                YES
        Code Type:           ARM (Native)
        Role:                Foreground
        Parent Process:      launchd [1]
        Coalition:           com.myapp.sampleapp [459]
    
    
        Date/Time:           2019-08-12 13:22:57.0883 +1200
        Launch Time:         2019-08-12 13:22:57.0000 +1200
        OS Version:          iPhone OS 10.3.3 (14G60)
        Report Version:      104
    
        Exception Type:  EXC_CRASH (SIGABRT)
        Exception Codes: 0x0000000000000000, 0x0000000000000000
        Exception Note:  EXC_CORPSE_NOTIFY
        Termination Description: DYLD, Library not loaded: @rpath/MaterialComponents.framework/MaterialComponents | Referenced from: /var/containers/Bundle/Application/E15C620A-6E99-46ED-A9D7-95BA048E2B26/SampleApp.iOS.app/SampleApp.iOS | Reason: image not found
        Triggered by Thread:  0
    
        Filtered syslog:
        None found
    
        Thread 0 Crashed:
        0   dyld                            0x02a701dc 0x2a4e000 + 139740
        1   dyld                            0x02a6fe3e 0x2a4e000 + 138814
        2   dyld                            0x02a6fe78 0x2a4e000 + 138872
        3   dyld                            0x02a51ca4 0x2a4e000 + 15524
        4   dyld                            0x02a54588 0x2a4e000 + 25992
        5   dyld                            0x02a4f1d0 0x2a4e000 + 4560
        6   dyld                            0x02a4f040 0x2a4e000 + 4160
    
        Thread 0 crashed with ARM Thread State (32-bit):
            r0: 0x00000000    r1: 0x00000000      r2: 0x00000000      r3: 0x02bb8208
            r4: 0x000000b5    r5: 0x02bb7e08      r6: 0x00000000      r7: 0x02bb7dd4
            r8: 0x00000000    r9: 0x000000b5     r10: 0x00000000     r11: 0x00000000
            ip: 0x00000209    sp: 0x02bb7d94      lr: 0x02a6fe3f      pc: 0x02a701dc
          cpsr: 0x40000010
    
        Binary Images:
        0x9e000 - 0x278dfff SampleApp.iOS armv7  <692e9d46abd93e3fa0cedbe5932cdc9b> /var/containers/Bundle/Application/E15C620A-6E99-46ED-A9D7-95BA048E2B26/SampleApp.iOS.app/SampleApp.iOS
        0x2a4e000 - 0x2a79fff dyld armv7s  <ae540e30134e34dfbdc1a1e57b551611> /usr/lib/dyld
    
        EOF
    

    @ColeX it looks like its crashing due to following (taken from above):

    Termination Description: DYLD, Library not loaded: @rpath/MaterialComponents.framework/MaterialComponents | Referenced from: /var/containers/Bundle/Application/E15C620A-6E99-46ED-A9D7-95BA048E2B26/SampleApp.iOS.app/SampleApp.iOS | Reason: image not found

    My app is using the Xamarin.Forms Material Visual feature in my iOS project so I am wondering if this is a potential issue, also: https://github.com/xamarin/XamarinComponents/issues/597

    EDIT turns out removing line below has fixed my issue: global::Xamarin.Forms.FormsMaterial.Init();

Answers

  • ColeXColeX Member, Xamarin Team Xamurai

    Have you test on real device on release mode ?

  • LeoJHarrisLeoJHarris NZMember ✭✭✭
    edited June 19

    Hi @ColeX I appreciate you reaching out.

    I have again checked and the following 3 configurations (opted for Automatic Provisioning rather then Manual Provisioning):

    In debug configuration the app works fine on a real device - configuration is Debug, Scheme is Automatic Provisioning (automatic signing completed successfully), the signing identity indicates 'iPhone Developer: ...', provisioning profile is Automatic.

    In App Store configuration (start without debugging) the app runs fine on my real device - configuration is App Store, Scheme is Automatic Provisioning (automatic signing completed successfully), the signing identity indicates Distribution (Automatic), provisioning profile is Automatic. Regarding App Store when I build and upload the IPA through Application Loader onto TestFlight and Apple Store then the app crashes immediatly after splash screen.

    In Ad-Hoc configuration (start without debugging) the app crashes on my real device immediately after Splash screen is shown - configuration is Ad-Hoc, Scheme is Automatic Provisioning (automatic signing completed successfully), the signing identity indicates Distribution (Automatic), provisioning profile is Automatic.

    App Store configuration is as below:

  • ColeXColeX Member, Xamarin Team Xamurai
    edited June 19

    Since it works fine in debug configuration , it should not be related with your code issue.

    Try to not select Automatic provisioning , switch to Manual provisioning and specify the exact signing identity and provisioning profile , try again.

  • LeoJHarrisLeoJHarris NZMember ✭✭✭
    edited June 20

    @ColeX thanks for getting back to me, just for clarity are you suggesting to use the iPhone Developer Signing Identity or the iPhone distribution signing identity? Its just that from your screenshot your referring the development.

    In any event below is my current configuration again, can you let me know the provisioning profile I should be using below with release configuration? Im assuming it is the store provisioning profile?

    With the above configuration using 'Store Provision Profile' I get following error while it is deploying using start without debugging, when I generate the IPA file from the build it still crashes from test flight submitted via application loader):

    This was the error report when I tried deploying the release with start without debugging:

    CopyingFile - Path: /Users/developer/Library/Caches/Xamarin/mtbs/builds/XeniaGuestAppii.iOS/5c31dda6f9c8e078cbbc581cfe220a7f/bin/iPhone/Release/XeniaGuestAppii.iOS.app/.monotouch-32/MaterialComponents.aotdata.armv7Deploy failed. The app 'XeniaGuestAppii.iOS' could not be deployed to the device 'Leonard’s iPad'. Error: error MT1006: Could not install the application '/Users/developer/Library/Caches/Xamarin/mtbs/builds/XeniaGuestAppii.iOS/5c31dda6f9c8e078cbbc581cfe220a7f/bin/iPhone/Release/XeniaGuestAppii.iOS.app' on the device 'Leonard’s iPad': Your code signing/provisioning profiles are not correctly configured. Probably you have an entitlement not supported by your current provisioning profile, or your device is not part of the current provisioning profile. Please check the iOS Device Log for details (error: 0xe8008016).. Please check the logs for more details.

    I do get an initial warning: warning HE1901: The application 'com.xeniasuite.XeniaGuestAppii' has been signed with a provisioning profile which does not include any devices. but as the provioning profile I am using is the store provisioning profile there wouldnt be any devices, so this shouldnt be an issue.

    Below is the log of the ipad when it fails:

    I checked Capabilities for the App ID and the only ones enabled are Fonts (this was added after I was having issues), Game Center (greyed out and checked), in app purchases (also greyed out and checked) and thats it. In Visual Studio I am not using a Custom Entitlements (this is empty in the ios Bundle Signing and I'm pretty sure I never had one set anyhow

    Alight this is interesting - i just run the app on my iPhone 6s from the apple store and it works fine (which is why it was passing the review/testing to get on the apple store) while my ipad is crashing right after the splash screen is shown. The iPhone is running software version 12.3.1, while my iPad running version 10.3.3. In my visual studio project the sdk version is set to default but from the drop drown there is only 12.1 so it would be using that, might that be an issue? I might need to lower that perhaps? Just thinking out loud. At least I have isolated the issue to my tablet running 10.3.3

  • LeoJHarrisLeoJHarris NZMember ✭✭✭
    edited June 20

    My deployment target is set to 9.0, but I dont see how that or the sdk version would be an issue if the app builds and deploys in debug configuration, this and the Sdk version im pretty sure have never changed.

    Im am seeing this issue though below, however as mentioned my mac mini version means I cannot update xcode:

  • ColeXColeX Member, Xamarin Team Xamurai

    In any event below is my current configuration again, can you let me know the provisioning profile I should be using below with release configuration? Im assuming it is the store provisioning profile?

    Yes , it should be distribution signing identity while in release configuration , it is because i don't have distribution profile on my mac ,so i have to select the developer..

    Error: error MT1006: Could not install the application

    When you wanna to test application to real device , you should choose ad-hoc not app-store provisioning profile . Ad-Hoc is used to test and app-store is only for publishing.

  • LeoJHarrisLeoJHarris NZMember ✭✭✭
    edited June 20

    When you wanna to test application to real device , you should choose ad-hoc not app-store provisioning profile . Ad-Hoc is used to test and app-store is only for publishing.

    For some reason I thought I had selected ad-hoc in the past to put a build on the apple store, but it was about 6 months ago i did that and with getting these issues above was just giving me confusion with the proper configuration for app store lol (my bad!), but I understand that :smile:

  • LeoJHarrisLeoJHarris NZMember ✭✭✭
    edited June 20

    Any ideas why this wouldnt be working on my iPad running 10.3.3 from the app store though, I wondered if it had to do with the latest version of xcode as Im pretty sure I wasnt having this issue before that, it was about 6 months I made a last app release, that was fine & no issue.

    Would there be some entitlement it might be wanting with latest xcode version specific to my ipad or something?

  • ColeXColeX Member, Xamarin Team Xamurai

    My suggestion : Use another mac (borrow from friend..)with the latest xcode to see if problem persists.

  • LeoJHarrisLeoJHarris NZMember ✭✭✭
    edited June 20

    @ColeX alright Ill try that when I can, but in the meantime I think raising the deployment target to 11.0 is a pretty good bet. I only know that its failing on iOS 10 but working on iOS 12 so it might be okay on iOS 11 as well but dunno.

    It seems that after going through the apple store there are issues on pre iOS 11 so perhaps there are limitations for apps on the store with certain versions (maybe xcode is affecting that as well?) but looking at the data regarding users using pre-iOS 11 its pretty small.

  • ColeXColeX Member, Xamarin Team Xamurai

    Yes, most of people are using iOS 11 and later , just try it .

  • stesvisstesvis USMember ✭✭✭

    Hello I am having the same issue.

    From Visual Studio: everything works well in debug, release, simulator and phone.
    Adhoc: crashes during splash screen.

    What was the actual solution? I have the latest xamarin forms, xcode and VS versions...thanks

  • LeoJHarrisLeoJHarris NZMember ✭✭✭
    edited July 28

    @stesvis I didnt find a solution to the problem I was 100% satisfied with, the only work around was bumping the deployment target to iOS 11 and supress the crashing on pre-iOS 11

    I think that apple store doesnt accept apps targeting pre-iOS 11 anymore and they need to target the arm-64 bit architecture that iOS 11, apps targetting pre-iOS 11 will simply crash on startup.

    But can somebody confirm this with me??

  • stesvisstesvis USMember ✭✭✭
    @LeoJHarris that did not work for me.
    The only way to make it work is if i "don't link" assemblies.. But it's not an acceptable solution...
  • LeoJHarrisLeoJHarris NZMember ✭✭✭

    @stesvis thats strange, which iOS version is your deployment target set to?

  • stesvisstesvis USMember ✭✭✭

    @LeoJHarris I set it now to 11.0.
    But for the app store I believe you shouldn't use "Don't link", right?

  • LeoJHarrisLeoJHarris NZMember ✭✭✭

    @stesvis I think with iOS SDK 12.1 you should be Linking Assemblies.

  • LeoJHarrisLeoJHarris NZMember ✭✭✭
    edited August 12 Accepted Answer

    I have tried with a newer mac with lastest xcode and problem still persists and unfortunately we need to target iOS 10+. I checked device crash log on my ipad and the following was the exception when the app crashes immediately on launch from Test Flight / App Store:

        {"bug_type":"109","os_version":"iPhone OS 10.3.3 (14G60)","build_version":"20",
    "timestamp":"2019-08-12 13:22:57.19 +1200","is_beta":true,"app_name":"SampleApp.iOS","app_cohort":"2|date=1565571600000&sf=143461&tid=04e4ca7358ea8d2fba25d0b81f5490f8dffc926b37292b959073ec2761cfd257&ttype=i",
    "bundleID":"com.myapp.sampleapp","incident_id":"C2990110-841A-4BBC-916A-61190A0D1CA9","name":"SampleApp.iOS","is_first_party":false,"app_version":"4.0","share_with_app_devs":false,"slice_uuid":"692e9d46-abd9-3e3f-a0ce-dbe5932cdc9b","adam_id":1474065797}
        Incident Identifier: C2990110-841A-4BBC-916A-61190A0D1CA9
        Beta Identifier:     281613BC-F3E4-42D7-8F93-0EE24AAEDE16
        Hardware Model:      iPad3,4
        Process:             SampleApp.iOS [1056]
        Path:                /private/var/containers/Bundle/Application/E15C620A-6E99-46ED-A9D7-95BA048E2B26/SampleApp.iOS.app/SampleApp.iOS
        Identifier:          com.myapp.sampleapp
        Version:             20 (4.0)
        Beta:                YES
        Code Type:           ARM (Native)
        Role:                Foreground
        Parent Process:      launchd [1]
        Coalition:           com.myapp.sampleapp [459]
    
    
        Date/Time:           2019-08-12 13:22:57.0883 +1200
        Launch Time:         2019-08-12 13:22:57.0000 +1200
        OS Version:          iPhone OS 10.3.3 (14G60)
        Report Version:      104
    
        Exception Type:  EXC_CRASH (SIGABRT)
        Exception Codes: 0x0000000000000000, 0x0000000000000000
        Exception Note:  EXC_CORPSE_NOTIFY
        Termination Description: DYLD, Library not loaded: @rpath/MaterialComponents.framework/MaterialComponents | Referenced from: /var/containers/Bundle/Application/E15C620A-6E99-46ED-A9D7-95BA048E2B26/SampleApp.iOS.app/SampleApp.iOS | Reason: image not found
        Triggered by Thread:  0
    
        Filtered syslog:
        None found
    
        Thread 0 Crashed:
        0   dyld                            0x02a701dc 0x2a4e000 + 139740
        1   dyld                            0x02a6fe3e 0x2a4e000 + 138814
        2   dyld                            0x02a6fe78 0x2a4e000 + 138872
        3   dyld                            0x02a51ca4 0x2a4e000 + 15524
        4   dyld                            0x02a54588 0x2a4e000 + 25992
        5   dyld                            0x02a4f1d0 0x2a4e000 + 4560
        6   dyld                            0x02a4f040 0x2a4e000 + 4160
    
        Thread 0 crashed with ARM Thread State (32-bit):
            r0: 0x00000000    r1: 0x00000000      r2: 0x00000000      r3: 0x02bb8208
            r4: 0x000000b5    r5: 0x02bb7e08      r6: 0x00000000      r7: 0x02bb7dd4
            r8: 0x00000000    r9: 0x000000b5     r10: 0x00000000     r11: 0x00000000
            ip: 0x00000209    sp: 0x02bb7d94      lr: 0x02a6fe3f      pc: 0x02a701dc
          cpsr: 0x40000010
    
        Binary Images:
        0x9e000 - 0x278dfff SampleApp.iOS armv7  <692e9d46abd93e3fa0cedbe5932cdc9b> /var/containers/Bundle/Application/E15C620A-6E99-46ED-A9D7-95BA048E2B26/SampleApp.iOS.app/SampleApp.iOS
        0x2a4e000 - 0x2a79fff dyld armv7s  <ae540e30134e34dfbdc1a1e57b551611> /usr/lib/dyld
    
        EOF
    

    @ColeX it looks like its crashing due to following (taken from above):

    Termination Description: DYLD, Library not loaded: @rpath/MaterialComponents.framework/MaterialComponents | Referenced from: /var/containers/Bundle/Application/E15C620A-6E99-46ED-A9D7-95BA048E2B26/SampleApp.iOS.app/SampleApp.iOS | Reason: image not found

    My app is using the Xamarin.Forms Material Visual feature in my iOS project so I am wondering if this is a potential issue, also: https://github.com/xamarin/XamarinComponents/issues/597

    EDIT turns out removing line below has fixed my issue: global::Xamarin.Forms.FormsMaterial.Init();

Sign In or Register to comment.