Xamarin app crashes after launch screen on iOS 12 - ios

So I made an app using Xamarin.Forms v3.4.0 tested an android device and on my iPhone (SE, iOS 13.3) and it works perfect.
Just as a test I ran it on an older device (iPhone 6, iOS 12.4) and it crashes just after the blue launch screen.
The problem is that it doesn't even starts the debugger. Crashes so early that the debugger doesn't even start yet, so I have no idea how to identify what is causing the crash. Tried putting breakpoints on Main.cs and AppDelegate.cs first line's and, again, debugger doesn't stops there.
After that I thought it may have something to do with the device's processor so I set up a simulator for an iPhone SE with iOS 12.4 (same device, older OS) and it crashes just the same. So yeah, it has to be something about the OS version.
Other of my ideas is that maybe it's something dark mode - related (I'm sorry I'm just throwing ideas). I implemented Dark mode using this guide
I have no idea where to begin with this, any help it's appreciated.
Edit:
Just updated Xamarin.Forms to 4.4.x and I still have the exact same problem.

The problem was actually in the custom page renderer I use to handle the Dark Mode. Apparently, the previousTraitCollection argument of TraitCollectionDidChange() is null in iOS 12.
So it was just a NullReferenceExceptionvery easily fixed:
if (previousTraitCollection == null)
return;
I have no idea why the debugger didn't start in time to identify the error, but by mere luck, I discovered it by modifying the Linker Behavior to Link Framework SDKs Only

Related

My application shows me black screen on real device but runs perfectly on simulator

I'm coding an application with SwiftUI and Firebase.
My application works very well on simulators, but as soon as I put it on a real device (like the iPhone X that I own) the application shows me a black screen.
Additionally when I put the application on my phone, 2 errors in the code appear. This does not prevent the application from building and launching, but it always shows a black screen.
[]
[]
Here is the proof that there are no bugs with simulators:
Does anyone have an idea what is going on and how to solve this problem? Thanks a lot for your help.
The compiler is warning that in two places the code is using a String that could contain a nil i.e. be undefined for whatever reason. If it is a nil would that cause the Firestore query to lock-up? Check what is with the debugger.
In terms of the simulator vs real device - dirty install state from previous testing might be hiding problem - do a full reset on the simulator to eliminate.

iOS App works fine with Simulator but Crashes with a real iOS device

I know there are already similar problems on StackOverflow, but mine is a little different. So when I launch my app on the simulator, it works just fine, however, when I launch it on a device, it loads everything and launches the app but as soon as it does that, both my Xcode and the app on my phone crash.
I have no code to post as my Xcode crashes but if you know why this is happening or any code that may be useful to you, please let me know.
I think you should follow the orders to figure out what the problem is:
1、Make sure your device type and iOS Version is right. Some newer apis do may cause crash on old iOS version. If your device's iOS version is not the same as the version of your simulator, maybe it's the reason.
2、If you're using iPhone 5 or iPhone 5c. That means your device does not support 64 bit calculation. Check it out.
3、Add Global Exception from exception panel. Switch to exception panel -> click plus button on the left bottom of the panel -> Choose one or more global Breakpoint you want to add. Then you should get where is wrong before it crash.

Unity app crashes on iPhone 6 ONLY?

I have deployed a game made in Unity via TestFlight and do not know what to make of this issue - the game runs perfectly on all iPhone 6s and above. On iPhone 6 however and an iPad, it crashes right after the splash screen.
Crash report said initially it had to do with the Metal graphics settings - since (this is another problem) I haven't been able to get the crash reports from the last 2 builds, I am led to think it is still a graphics problem.
I've googled everything and found a few threads saying it was a Unity 5.5.0 problem and also that older devices do not support Metal. So today I updated to Unity 5.5.2f1 and removed Metal from the Graphics settings as
various links have said this has been an issue - https://forum.unity3d.com/threads/crash-on-startup-5-5-0f1-ios-10.446813/
https://issuetracker.unity3d.com/issues/ios-crash-on-presentrenderbuffer-gl-renderbuffer-in-presentgles-when-loading-a-scene-on-iphone-6s
but even with OpenGLES2 and 3 both in the options with Metal removed, it still crashes on just these older devices.
What is happening here? How can I fix this?
I am on the most updated Xcode, etc.

Keyboard Extensions Xcode 6.3?

Everything was working perfectly when debugging my keyboard on Xcode 6.2 running iOS 8.2. After updating to Xcode 6.3 and iOS 8.3, I seem to be having difficulty getting the debugger to work. Has anyone experience similar problems? I've tried cleaning my build, uninstalling/installing my app, but nothing seems to work.
What happens is I build and run, and when I switch between keyboards to get to mine it just never pops up, instead it jumps to the default one. Upon ending the task, and doing it again it works perfectly, just not when I'm attempting to debug.
Some of the information from this answer is a bit outdated, but it was useful to me. I am still convinced that extension debugging on devices is 90% broken with XCode 6.3.2 and iOS 8.3. I've been debugging successfully from the simulator, though, and occasionally I'll get the device process to attach correctly from within XCode, but more often than not it just quits on me.

XCode's Instruments for Core Animation keeps showing null

I am trying to see the fps of several UITableView in my iOS application.
Though following Apple's documentation, the core animation template keeps showing null. Other instruments seems working as expected. Is there any configuration I missed?
Thanks in advance.
ps. The environment is xCode 6.2 running iPhone 6 Simulator on iOS8.2
See here: https://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Instrument-CoreAnimation.html
Core Animation template
Library pane (only appears when an iOS device is connected)
I feel like this is Apple's way of saying this instrument only works on device. I tested it myself and it has only worked on device so far for me.
If you look here:
https://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Instrument-TimeProfiler.html
the time profiler, which does work on the simulator, does not have the same line about only appearing in the library pane when an iOS device is connected. So I think it is safe to say that Core Animation (and a few others like the Energy Usage Instrument) only will work with a device.

Resources