I installed latest version of Visual Studio 2022 (17.0.2).
Created a brand new Xamarin.Forms project.
Wanted to test AppCenter Analytics and Crashes.
Added following line of code in OnStart event of App.Xaml.cs
AppCenter.Start("android={android key};" +
"ios={iOS key}",
typeof(Analytics), typeof(Crashes));
Installed Microsoft.AppCenter.Analytics and Microsoft.AppCenter.Crashes nuget packages in all three (shared, android, iOS) projects.
Works fine in Android..
Crashes on this line in iOS. I am trying to debug in iPhone physical device using hot restart. When I remove the above line it works just fine.
I tried this on multiple computers but no luck.
Thanks
Related
I used to distribute an iOS Xamarin Form Application on testflight.
I had to update my Windows Visual Studio to v16.11.6
Since this new version, the app il not working fine on iOS: all custom fonts are not loaded when the app is opened from testflight
But the problem is not there when using the simulator or deploying the app from visual studio on my iPhone
Could you help me
When I targeted Android 9.0 (Pie) in Android part of Xamarin.Forms app the Preview of UI produces an error and show nothing.
Open a new Xamarin.Forms App in VS For Mac then update all of the Android Packages. After that, target your app to Android 9.0 as I described above. Finally you should run one time your app in an Android Emulator and you will see the error in Preview Tool in VS for Mac. The problem isn't in app. App is running well but I can't see preview of the UI to change things immediately.
(Error: android/view/View.OnUnhandledKeyEventListener)
I created a vanilla PCL project in xamarin forms. I tried to run on Android and it works fine.
But when I change de target to IOS and select my real device (Ipad with IOS 11.4.1), Visual studio only allows me to build solution, I wanna to run application on it but I can't.
The target IOS is 8.0, and I already authenticated with my apple account and created a provisioning profile.
I already done this on another project before and works fine.
I really don't know why Visual Studio don't allow me to debug, when I open my oldest project with this device it allows me to debug.
What OS are you running Visual Studio on? IOS requires MAC, whereas Android is compatible with all OS. It's been a while, but I know there's an option to wirelessly connect to a MAC OS so that you can run your IOS Xamarin Forms application anywhere.
I found the solution.
I was trying to use "Debug", and it works fine on the emulator, but to real device I need to use "Debug | Iphone" or otherwise it only builds.
Even when I try to use "Release" it's the same trick.
I'm working on a multi OS app in Xamarin Forms, for Android and iOS.
Everything's fine with android compilation and deploy, but it's not that easy on iOS.
Visual Studio still deploy the same version again and again, like it's stuck somewhere in past.
Is there a cache to clean somewhere? The iOS app is displaying labels which are no more in my code, so it's probably a cache issue.
I tryied to clean the whole solution, in vain.
I deploy on a macOS virtual machine, hosted with VMware workstation. VS and xcode are installed on it.
There is an example of same page displayed in ios and android..
my existing xamarin forms project works fine without any error using vs 2017 professional. I opened same project with VS2017 preview enterprise to use live player etc. But same project doesnt compile on it. It returns error as
C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1789,3): error XA4210: You need to add a reference to Mono.Android.Export.dll when you use ExportAttribute or ExportFieldAttribute.
I am already having a reference on android project as shown below. Could it a bug in preview version? Because same project works fine in VS 2017 stable version