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
The question has transitioned through:
(1) Why my iOS simulator crashes?
(2) How to troubleshoot it here?
(3) So is there any way to say "fi (NOT RUNNING ON SIMULATOR)"
IMHO, it would be better to investigate (1) and (2) before making use of (3). Assuming the line of code highlighted is where the exception is being raised - what would your app do if that line of code threw an exception (perhaps for a different reason) on a physical device? If it happened in development, how would you troubleshoot it? If it happened in production, how would you troubleshoot it? By jumping to (3) before answering (1) and (2), you have technical debt building up.
@nadjib - The most stylish way of advising somebody to use Google that I have seen so far :-)
Answers
@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?
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?
Oh Ok I got it but still need help..
It crashes because I have:
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?
@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 ?
What I mean is if I use this:
in the Simulator it will crash but not on real device..
So is there any way to say
@JassimRahma
The question has transitioned through:
(1) Why my iOS simulator crashes?
(2) How to troubleshoot it here?
(3) So is there any way to say "fi (NOT RUNNING ON SIMULATOR)"
IMHO, it would be better to investigate (1) and (2) before making use of (3). Assuming the line of code highlighted is where the exception is being raised - what would your app do if that line of code threw an exception (perhaps for a different reason) on a physical device? If it happened in development, how would you troubleshoot it? If it happened in production, how would you troubleshoot it? By jumping to (3) before answering (1) and (2), you have technical debt building up.
@nadjib - The most stylish way of advising somebody to use Google that I have seen so far :-)