Crash on start

KarlKoppKarlKopp AUMember ✭✭

Hi all - I've just updated a project I've worked on for a while to the latest XF build as well as updated all the project packages. Now when I start the app on the simulator, everything works fine, but when I deploy to a device (iOS both debug and release) it shows the splash screen and crashes. I've tried adding breakpoints in Xamarin Studio in the Main.cs and AppDelegate.cs files, but no break point is ever hit. It seems to crash before anything has loaded. There is also no error message in the Application Output except:

Please ensure your device is connected... Connected to: K's iPhone Launching /private/var/mobile/Containers/Bundle/Application/GUID/App.iOS.app -monodevelop-port 10000 -connection-mode usb

I'm lost at how I can debug further? Any thoughts/ideas?

Cheers,
Kolchy

Tagged:

Posts

  • KarlKoppKarlKopp AUMember ✭✭

    Thanks for the links @Yksh.Leo - details are:

    • iOS 9.1
    • iPhone 5
    • XCode is 7.1.1
    • Xamarin Studio 5.10.1 (build 3)
    • Xamarin.iOS 9.2.1.54

    Debug build doesn't link assemblies, release does. Both don't run, crash straight after seeing the splash screen. Tried a few different options for supported architectures, none seem to work.

  • KarlKoppKarlKopp AUMember ✭✭

    On this, it seems there was an issue using Xamarin.Facebook.iOS. I didn't have the OpenURL method defined in AppDelegate and the permissions weren't set correctly. Strange that it crashed and showed no debug info tho...

  • Kolchy, what did you mean that permissions were not set correct? I am also getting this app crash , but i have openurl method defined.

  • KarlKoppKarlKopp AUMember ✭✭

    Hi @JC.randomtext - the permissions I'm talking about are the ones listed here under the key LSApplicationQueriesSchemes for your plist file.

    <key>LSApplicationQueriesSchemes</key>
    <array>
            <string>fbapi</string>
            <string>fb-messenger-api</string>
            <string>fbauth2</string>
            <string>fbshareextension</string>
    </array><key>LSApplicationQueriesSchemes</key>
    <array>
            <string>fbapi</string>
            <string>fb-messenger-api</string>
            <string>fbauth2</string>
            <string>fbshareextension</string>
    </array>
    
  • KarlKoppKarlKopp AUMember ✭✭

    @GeoffAldridge.4298 I'm still getting a crash when calling the following. Have you guys got it working?

    var view = UIApplication.SharedApplication.KeyWindow.RootViewController;
    
    loginManager.LogInWithReadPermissions (new string[]{ "email", "public_profile", "user_friends", "user_likes" }, view, FacebookLoginHandler);
    
    
  • GeoffAGeoffA USMember ✭✭

    Hmmm...

    We're not using any of the additional functionality. Just inclusion of the library. Our issue was the app crash on startup (just after the Splash Screen). Does it crash only on a device or the emulator as well?

  • AnthonyJanssensAnthonyJanssens BEUniversity ✭✭

    @GeoffAldridge.4298 Thanks! Your solution worked!

  • ChaseBlazekChaseBlazek USMember
    edited August 2016

    Duuuuuude! @GeoffAldridge.4298 5 hours of debugging and your solution solved my issue in 5 minutes. Thank you doesn't quite suffice :smiley:

    I had to add the fb-messenger-api string beneath the
    fb-messenger-api20140430 string
    (this step was missing in the Facebook SDK documentation).

Sign In or Register to comment.