Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Need Help.. My iOS Simulator crashes

JassimRahmaJassimRahma USMember ✭✭✭✭

Hi,

I need help please

Why my iOS simulator crashes?

I am able to build the app with zero errors and it's also working perfectly on Droid.

It's a Xamarin Forms PCL

Here is my Build Log:

https://www.softnames.com/temp/iOS-Log.rtf

Thanks,
Jassim

Tagged:

Best Answer

Answers

  • JohnHardmanJohnHardman GBUniversity admin

    @JassimRahma said:
    Why my iOS simulator crashes?

    @JassimRahma -

    (1) Your app crashes when running in the simulator, or the simulator crashes?
    (2) Reword "crashes" as "throws an unhandled exception". Have you got any details of the exception?

  • JassimRahmaJassimRahma USMember ✭✭✭✭

    Sorry, my app crashes when it starts on iOS simulator but perfectly working on Android emulator.

    The log doesn't show any exception..

    How to troubleshoot it here?

  • JassimRahmaJassimRahma USMember ✭✭✭✭

    Oh Ok I got it but still need help..

    It crashes because I have:

    OneSignal.Current.StartInit("xxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxx")
       .EndInit();
    

    in App.xaml.cs and AppDelegate.cs

    If I comment it then the simulator will work fine

    WHat's the solution other than commenting it?

  • JohnHardmanJohnHardman GBUniversity admin

    @JassimRahma - "crash" = "unhandled exception". If you know where the exception is being thrown, put an exception handler around it to get the details of the exception.

    Have you followed the iOS and iOS simulator instructions at https://documentation.onesignal.com/v3.0/docs/xamarin-sdk-setup ?

  • JassimRahmaJassimRahma USMember ✭✭✭✭
    edited November 2017

    What I mean is if I use this:

    OneSignal.Current.StartInit("xxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxx")
       .EndInit();
    

    in the Simulator it will crash but not on real device..

    So is there any way to say

    fi (**NOT RUNNING ON SIMULATOR**)
    {
         OneSignal.Current.StartInit("xxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxx")
              .EndInit();
    }
    
  • Amar_BaitAmar_Bait DZMember ✭✭✭✭✭
    edited November 2017
    @JohnHardman learned it from XDA forums, from the time I was doing some game development. And believe me, these Forums are way better than XDA/game engines one. I mean during that period, we had literally questions like "I'm 13 years old, never coded in my life, but I know how to resolve 2nd degree equations. I want to make a game like God of War, but in better since it'll be a collaborative MMO hack and slash with 1 million concurrent users. Can you show me, or do it and give you 20% of profits."
Sign In or Register to comment.