Xamarin Firebase iOS Analytics throwing AOT MTOUCH ERROR MT3001 - Firebase.Analytics.dll - firebase

I'm trying to integrate Firebase Analytics to my xamarin forms application. For Xamarin.IOS I'm using Xamarin.Firebase.iOS.Analytics version 5.0.1
And getting the below error while building.
./iOS/MTOUCH: Error MT3001: Could not AOT the assembly '/iOS/obj/iPhone/Debug/mtouch-cache/Build/Firebase.Analytics.dll' (MT3001)
Not able to understand what could go wrong. Is there any configuration changed I have to do.?

Firstly ,make sure that your VS and Xcode are up-to-date. If the issue continue, you can right
click your project ->options->iOS build ->Linker Behavior
set the value as Don’t Link. In addition, delete the folder obj and bin and rebuild your project again.

Related

How to fix Xamarin Forms pipeline Target Framework error

Locally, I can build and run my Xamarin Forms application with no issues. In my Azure build pipelines I have my master branch failing because of my target framework version. It says it is 9.0 when it should be at least 10.0.
In my Android project file I have the framework version set to 10.0. I have made sure it is also v10 in the properties tab for the project. Yet I still get the below error.
##[error]C:\Users\VssAdministrator\.nuget\packages\xamarin.forms\5.0.0.2012\build\Xamarin.Forms.targets(188,5): Error XF005: The $(TargetFrameworkVersion) for MyApp.Android (v9.0) is less than the minimum required $(TargetFrameworkVersion) for Xamarin.Forms (10.0). You need to increase the $(TargetFrameworkVersion) for MyApp.Android.
Try to open your .csproj file,and manually modify its targetFrameworkVersion.
<TargetFrameworkVersion>v10.0</TargetFrameworkVersion>
Verify that BOTH of the following project properties are set to 10.0:
Application / Compile using Android version (Target Framework).
Android Manifest / Target Android version.
https://learn.microsoft.com/en-us/xamarin/android/app-fundamentals/android-api-levels
If those are already both 10.0, then make sure the Azure build pipeline has up-to-date versions of Android SDKs and tools.
Another way to fix:
If you are able to create a new sample solution, and successfully build that via Azure, then start a new solution, and add all your files to it.

Cannot get Firebase working for Xamarin Forms iOS

I am using Visual Studio 2019 on Windows, developing an App using Xamarin Forms, for Android and iOS. Everything is the latest version.
I am trying to use Firebase to add Push Notification functionality. I have been able to get this functioning for the Android App, but whatever I do seems to fail / not work for iOS.
I have tried using both Xamarin.Firebase.iOS.CloudMessaging and Plugin.FirebasePushNotification with the same result. Starting from a basic app created in Visual Studio, as soon as I add the basic code for the iOS project, the app stops working and just times out after 17 seconds with running any of the project code (no breakpoints are hit).
I also tried downloading this demo app https://github.com/jfversluis/XFFCMPushNotificationsSample. I created my versions of google-services.json (Android) and GoogleService-Info.plist (iOS). The Android app runs but the iOS app does not (times out after 17 seconds).
Having tried so many different samples, examples, options, etc - I am at a complete loss as to what the issue might be. The situation is not helped by me being new to App development & Xamarin Forms!
I appreciate that I haven't added any "I tried this" code, but I'm hoping someone can help me with debugging this. Visual Studio doesn't appear to show anything, can I get more helpful info from the iPhone?
Edit:
For iOS,
I have created a Key and enabled Apple Push Notifications.
I have uploaded the key to the iOS project in Firebase (Cloud Messaging).
I have downloaded the GoogleService-Info.plist file and added it to the iOS project in Visual Studio, and set it to BundleResource
I have enabled Push Notifications in Entitlements.plist
I have enabled Background Modes & Remote Notifications in Info.plist
I am using Automatic Provisioning
I have checked that Bundle Identifier is correct
I have added FirebaseAppDelegateProxyEnabled to info.plist
EDIT 2:
I have manged to get an error message, which happens during the call to
FirebasePushNotificationManager.Initialize(options, true);
{System.NullReferenceException: Object reference not set to an instance of an object.
at Plugin.FirebasePushNotification.FirebasePushNotificationManager.Initialize (Foundation.NSDictionary options, System.Boolean autoRegistration) [0x00029] in /Users/runner/runners/2.169.1/work/1/s/Plugin.FirebasePushNotification/FirebasePushNotificationManager.ios.cs:141
at MyApp.iOS.AppDelegate.FinishedLaunching (UIKit.UIApplication app, Foundation.NSDictionary options) [0x00014] in \MyKRing.iOS\AppDelegate.cs:34 }

Xamarin.Android Build Error for Xamarin Forms 4 Solution

I am trying to compile a newly created Xamarin.Forms solution using Visual Studio Pro 2019 version 16.1.3. I use the stable Xamarin.Forms version 4.0.0.425677. The solution contains an iOS, Android and UWP project.
When I try to compile I get the following Android compilation error even without having made any code changes.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3326,2): error : A part of the path "AccessibilityManagerCompat_AccessibilityStateChangeListenerImplementor.class" could not be found
The only related post I found was here which recommends to delete bin and obj folders in the Android project. This does not apply since I start with an new solution in the first place. Any ideas what the cause could be?
Well, it turns out that I only get this issue when I have the term "Xamarin" in my Android project name. This seems to confuse the Android compiler.

Where is properties menu in Visual Studio 2017 Xamarin

I am getting an error in Xamarin when building a release version. I actually have never released code before, and i have no idea what im doing. if you could tell me, i am getting this error but i do not know how to follow the instructions because my Visual Studio doesnt have a menu called properties
Debug is not enabled in the current configuration. Please Start
Without Debugging or change it in Properties -> iOS Build.
Right click to IOS project--> open Proprieties page and enabled debug for IOS

error with auth implementation with unity3d and firebase

I'm having a little problem. When I try to deploy an unity3d app with the auth sample project from firebase I'm getting this error "error building Player: iOS framework addition failed due to a CocoaPods installation failure" but I have installed cocoapods correctly, I even uninstalled it and reinstalled it. I only get this error with the auth project, not with the database. I tried adding the cocoapods to the project with the terminal using pod init instead of having unity do it but nothing seems to work
From https://github.com/firebase/firebase-ios-sdk/issues/1845#issuecomment-425184012:
We're working on patching the Firebase C++ and Unity releases to migrate them to the 5.9.0 iOS SDK. In the meantime, under Assets/Firebase/Editor/ there are a set of files matching *Dependencies.xml files (e.g AnalyticsDependencies.xml) that reference the iOS SDK version. You'll need to modify the section of each file to reference iOS SDK 5.9.0 rather than 5.6.0.
More details at https://github.com/firebase/firebase-ios-sdk/issues/1845#issuecomment-425184012

Resources