How do I integrate Firebase.Crashlytics on my Xamarin.Forms Project - c#

Can any one help me with integrating Firebase.Crashlytics on a Xamarin.Forms project for iOS.
It is working fine for me on Android but on iOS I am facing issues.
Note that I have performed the following steps on iOS :-
Added Xamarin.Firebase.iOS.Crashlytics Nuget package to my iOS project.
Added GoogleService.plist file
Made a dependency service for iOS
Added the following code to initialize the nuget :-
Firebase.Core.App.Configure();
Crashlytics.Configure();
Fabric.Fabric.SharedSdk.Debug = true;
Crashlytics.SharedInstance.Crash();
Update
I have followed all the steps in the below mentioned link :-
https://keithbeattyblog.wordpress.com/2019/06/16/xamarin-forms-adding-google-firebase-crashylitics/
Still nothing works.
When I follow the steps written in the above article I face issues where I am unable to build my project due to the 'Xamarin.Build.Download' NuGet package. Also I face issues where I am unable to deploy the solution to my Simulators because it doesn't allow me select a simulator to run the App.
Any help would be appreciated. Thanks!

Are you sure you want still go with the old Fabric implementation?
You must be aware that the Fabric Crashlytics version is deprecated, right?
All of us have received a mail from Google informing that:
We are writing to let you know that the Fabric Crashlytics SDK is now deprecated and will continue reporting your app's crashes until
November 15, 2020. After this date, the Fabric Crashlytics SDK and
beta versions of the Firebase Crashlytics SDK will stop sending crash
reports for your app.What happened?
We are replacing Fabric Crashlytics SDKs and beta versions of the Firebase Crashlytics SDKs with the generally available Firebase
Crashlytics SDKs.What's Next?
To continue getting crash reports in the Firebase console, make sure to upgrade your apps to the Firebase Crashlytics SDK versions
17.0.0+ for Android, 4.0.0+ for iOS, and 6.15.0+ for Unity before November 15, 2020.Android
So everything is going to change soon, and you shouldn't use the Fabric solution anymore, especially for new projects.
You can find the new official NuGet package here, but it is still in preview:
https://www.nuget.org/packages/Xamarin.Firebase.Crashlytics/117.0.0-preview02
This is the official repository issue to add comments:
https://github.com/xamarin/XamarinComponents/issues/956
When you'll add this new package and the google-services.json you will need to change the following in your old code:
Every CrashLytics.Crashlytics reference will be just FirebaseCrashlytics.
No initialization is needed, you can get the FirebaseCrashlytics.Instance anywhere
To log an exception you will need to use the RecordException method instead of the old LogException
SetUserIdentifier is changed to SetUserId, and SetUserName is no longer there
There is no method to crash on purpose anymore, so now you have to simply throw any exception you want if you wanna test your implementation
Maybe I'm missing something, but basically, that's all.

Update Xamarin.Firebase.iOS.Crashlytics to version 4.0.0-beta.7
and in your app delegate just call
Firebase.Core.App.Configure();
Firebase.Analytics.Analytics.LogEvent(Firebase.Analytics.EventNamesConstants.SelectContent, new Dictionary<object, object> {
{ Firebase.Analytics.ParameterNamesConstants.ItemId, "hokisit-ios" },
{ Firebase.Analytics.ParameterNamesConstants.ItemName, "Hokisit iOS" }
});

Related

Why my UWP package is being rejected?

I've created a pretty simple app that uses banner ads.
App works great with debuging mode with ads test ads showing up. But when I'm creating a appxupload and uploading it to store I'm getting error.
Your package Microsoft.Advertising.Xaml specifies version 10.1707.2.0, but 10.0.0.0 is the minimum available version.
What exactly is the problem, why package is getting rejected and how can it be resolved?
According to the description of the error, you have installed Microsoft.Advertising.Xaml package which can't work on the Windows version below 10.1707.2.0 (which hasn't even been released to the general public). Your app declares that it can work on every version of Windows 10. This is in a collision.
Had the EXACT same problem. Finally got mine to work by uninstalling the MSI from https://marketplace.visualstudio.com/items?itemName=AdMediator.MicrosoftAdvertisingSDK and installing the Microsoft.Advertising.XAML from NUGET package manager. It was only 1 version earlier, but let me publish my app to the store.

Xamarin Forms - Plugins.BLE - MvvmCross.Plugins.BLE

I want to develop an app with Xamarin Forms which detects devices and interacts with them by bluetooth connection.
The plugin "Plugins.BLE" seems good to me for my request. I found this plugin here : https://github.com/xabre/xamarin-bluetooth-le
I did not find the plugin "Plugins.BLE" when I wanted to install it in Xamarin Studio, so I tried to use the MvvmCross.Plugins.BLE plugin. So I downloaded it and installed it in my project. A reference to MvvmCross.Platform has been installed in the same time. I set the permissions for bluetooth in the AndroidManifest.xml.
I have many problems with this plugin. In the first place, I initialized an adapter like this :
var adapter = Mvx.Resolve<IAdapter>();
I put this code in my App.xaml.cs but I got a NullReferenceException when I build.
Otherwise, when I put
var ble = Mvx.Resolve<IBluetoothLE>();
Xamarin Studio does not recognize the IBluetoothLE interface.
Maybe errors come from MvvmCross using. I don't want to use MvvmCross so if the plugin "Plugin.BLE" is available I would like to use it but I did not find it.
You have to search for pre release. Currently we haven't released a "stable" 1.0 without the "-beta" postfix. Every package thats version have "-foo" postix are recognized as prerelease by nuget.
The null reference exception is a typical error if you haven't referenced the platform specific package in your iOS or Android app. Running the package on a simulator can cause some problems, too. We are working on this.

Azure compute emulator stopped working after upgrade to version 2.8, prerequisite error

I upgraded my azure sdk to version 2.8 from 2.5 today and have not been able to get the compute emulator going ever since.
I receive a popup indicating
"The system is missing a prerequisite to execute the service."
When I look at the output screen, i see the following message scrolling down the screen:
"Microsoft Azure Tools: Error: The installed Microsoft Azure Compute
Emulator does not support the role binaries. Please install the latest
Microsoft Azure Compute Emulator and try again. Microsoft Azure Tools:
Warning: The role binaries in your package are using an older version
of the Microsoft Azure SDK. Please consider upgrading."
As I have several role instances I am having a problem determining which one(s) could be the culprit or what is the problem.
The weird thing is that I updated all of the referenced using nuget. One thing I noticed was that the Microsoft.WindowsAzure.ServiceRuntime.dll seems to have a version of 2.7.0.0 even though it is in a directory called v2.8. The other two dll's tied to azure, Microsoft.WindowsAzure.Diagnostics(2.8.0.0) and Microsoft.WindowsAzure.Storage(6.2.0.0) seem to point to other versions.
I am not sure if the problem is that I have to repoint these dll's or if there is a deeper issue going on?
You still need to perform the tool upgrade on your Azure publishing project. Right click on your Azure publish project (*.ccproj type?) and select Properties.
From this screen, select Application and click the Upgrade button. I have attached a screen shot showing I have a project I need to upgrade from 2.7 to 2.8. The red circle on the far right is the project you should perform the right click on (I don't know the actual project type name).

Azure media service for shared app

I've been trying to use the Azure Media Service for a shared native app in Visual Studio 2015.. But whenever i try to install the windowazure.mediaservices.extensions package, i get an error because apparently it isn't cross platform compatible on all three OS. However i can add another nuget Microsoft.windowsAzure.Managment.MediaServices - but it does not give me the same namespace as the one i get with the media services samples i downloaded earlier.
Does anyone have experince with the two nugets - and can tell me the difference? And if so - could provide me with a link to a sample that uses the last mentioned nuget.
An additional remark/question - i cannot get it to work on xamarin.forms either - not on shared or portable project.

Mono For Android MapsAndLocationDemo

I have Mono for Android trial version and am having some trouble with the MapsAndLocation demo.
I start up the emulator, yet when I select 'Run->Start Without Debuggin', I get the following error:
C:\Users\Simon\Documents\Xamarin\MapsAndLocationDemo\xamarin-monodroid-samples-d76baf3\MapsAndLocationDemo\obj\Debug\android\src\mapsandlocationdemo\MapWithOverlayActivity.java(33,33): Error: package com.google.android.maps does not exist
extends com.google.android.maps.MapActivity
As well as another 20 errors.
What do I need to fix this situation. Do I need to install an additional package? If so, what is it, and where can I find it?
thanks
Please ensure you are deploying to an emulator that targets Google APIs.
To do this create a new emulator in the Android Virtual Device Manager and change the target from "Android 2.2 - API Level 8" to Google API eg. "Google APIs (Google Inc.) - API Level 16".
If you cannot see any Google API targets you will need to install one by using the Android SDK manager.

Categories