My Xamarin Forms App works fine in Android devices, but when trying do deploy on a real iOS device it crashes after the splash screen, I said real because I can run without any problem on the simulator.
I try to debug the App on a real iOS device, and I found that the crash happen when the App try to load the XAML file on:
private void InitializeComponent() {
global::Xamarin.Forms.Xaml.Extensions.LoadFromXaml(this, typeof(LoginPage));
Please take a look at the debug steps:
Regards,
Pedro
I found the problem. The [XamlCompilation(XamlCompilationOptions.Compile)] was missing on the code behind C# file, and because of that some methods used by click events of controls on the XAML were not available. But still can't find explanation for this not happening on the simulator!
In case it is a help to anyone, I had the same symptom for a different reason. I am using single page simple navigation in the app in question setting MainPage to the current page in the app. After few days of troubleshooting, happened to notice the checkbox in Application section of info.plist, "Supports Multiple Windows" was checked. Unchecking this restored my app to working condition. There were no diagnostic messages that seemed related, just a crash after splash in release mode, and a black screen in debug mode.
Related
I have 6-7 properties in ViewModel. When page load first, values's of some properties not appear. but when I do Hot reload on xaml while debugging, that propertie's value does appear. Issue is happening on release version also. But in emulator, it working fine. This issue comes in Real android device only.
All that properties is made with Inotifypropertychanged. I don't know why this happening. I don't need iOS app so not tested on iOS
I have a Xamarin.Forms Android app on the Google Play store. An overwhelming amount of users are leaving 1 star app reviews of my app saying that the app is "Freezing." They say that nothing happens when they click on a button in the apps UI. I have made doubly sure that no processes are running on the UI Thread that might hold up the UI. I have not been able to recreate this "Freezing" behavior personally. There are also no crash or ANR reports in the Google Play Console (at least not enough to make up for the amount of negative reviews I'm receiving). Has anyone else faced this problem?
Useful Info:
Xamarin.Forms Version: 4.8.0.1560
There is no discrimination between the Freezing behavior and users' Android API Version
The issue is not happening (or is not being reported) on the iOS app.
Do you have a physical Android device to deploy to? Take the apk and side load it, or download from the store, don't use VS to deploy the app on your device.
I had a similar issue and it was the code shrinker in VS. The released version with the code shrinker enabled, caused the app to freeze immediately after the splash screen.
You can disable it by selecting 'nothing' in the code shrinker box in VS.
I recently upgraded some Firebase packages in my iOS Xamarin app, and now the thing refuses to work. The app opens (shows a splash screen) and immediately closes without producing an error.
While I want to fix the package problem, I have no clue where to start. I set a breakpoint on the App.xaml.cs constructor, but this never gets hit when I run the iOS version. So my next idea was to read the output like I do on Android.
I've been Googling around for a few hours, and everyone seems to say 'Go to Debug > Open System Log...', but this is absolutely rubbish! The system log seems to show everything except for my app running... (E.g. I run the app in the simulator, reload the system logs, and the freshest thing is from 10 minutes ago...)
I'm at my wits end here. Does anyone know a trick for viewing my app output in the simulator? Even just an exit code would be useful 😥
You could view the logs in these locations:
Mac – ~/Library/Logs/Xamarin/Simulator.Server
Windows – %LOCALAPPDATA%\Xamarin\Logs\Xamarin.Simulator
I am trying to launch a simple application with some labels and images on the content page, but when the android emulator starts it opens the application and shows only a white page with nothing on it. However, if I run the iOS simulator it shows the label and images. So I wonder if there is something that is preventing the page from loading? I am using Xamarin Forms in Studio on Mac.
Can you try it in a fisical device ?
Just to know if your emulator has an error...
Are you sure you have an StackLayout or another container for the label and entry ?
Hope you solve it...
A very wired thing has happen,
After updating to the latest Xamarin, I can't run my project on simulator in Debug mode. Xamarin will simply not let my choose as the destination for debug. (see in screen shot attached).
Also added a screen shot from Release mode where you can see I have an option to choose a simulator. I worked with Xamarin for more than a year. Never had something like that.