Integrate Crashlytics in visual studio? - visual-studio

I am new at VisualStudio.I am using xamarin for both iOS and Android application.
Now, If i want to integrate Crashlytics in my application then what should i do or how should i do?
Suggestions please.

There are two easy and widely use option for xamarin Crashlytics:
Hockey App
Firebase
Also if you need within the premises you can write some code.

You can use Fabric to add Crashlytics to your app.
Drungrin has built a fabulous NuGet package to connect your Xamarin iOS & Android apps to Fabric & Crashlytics (GitHub Link).
Getting it hooked up to your app is a massive hastle because Fabric don't natively support Xamarin however.. (forgive the shameless plug) I have written up a complete guide on implementing it on both platforms, link here. The long and the short of this is:
iOS (you need a mac for this)
Create a new native ios app (through xcode) with the same bundle id as your xamarin app & install it using the fabric mac app.
Forget about the xcode project (you only need to register the bundle id), add api key from sample to xamarin info.plist
add fabric & crashlytics nugets (follow github docs)
build your xamarin app for release & then archive for publishing. Open the fabric mac app and you will have your build in archives. Dysms can be automated to upload but for now you can upload them manually
Android
Create a new native Android app (using android studio), Make sure build & version numbers are the same as your xamarin app. Let the fabric plugin build & connect the sample to fabric. (once again the app need the same name)
Copy the fabric api key from sample to xam app manifest (edit the xml).
Give the android app internet permissions (if yours somehow doesnt)
Copy the crashlytics.build.properties file (found $ProjectFolder -> app -> build -> intermediates -> assets -> debug) into your xamarin app's resources, set build action to AndroidAsset.
Copy the crashlytics build number into string.xml: <string name="com.crashlytics.android.build_id">APP_BUILD_NUMBER</string>
add fabric & crashlytics nugets (follow github docs).
Archive app & publish apk
Drag apk into fabric plugin (android studio).

As of 2022 and Visual Studio 2019 for MacOS, there is now a NuGet package that handles the Firebase Crashlytics API. If you add the Xamarin.Firebase.IOS.Crashlytics package, and your GoogleService-Info.plist into the project, you can then add the updated Initialization code.

Related

Publish my project from Android Studio to App Store - Section Build

I use Android Studio on my MacOS M1.
My project is finished and everything works, either with Android simulators or iOS simulators via Xcode.
I would now like to publish my project on App Store.
I already have my subscription on App Store Connect, and I have already prepared my program submission with screenshots, title and description.
What I don't understand is how to upload my build to the App Store? How do I create my Build?
Do I have to import my project to XCode? If yes, how ?
I saw that in the Build section, there are 3 tools, the first one is called “Upload your app binary with Xcode”, how to go about it?
I'm lost, please help me.
CB

how to develop tvOS app using nativescript

I'm trying to build a tvOS and roku app with nativescript.
I was about to start working on the tvOS app after I read this article https://www.nativescript.org/blog/running-the-nativescript-runtime-for-ios-on-apple-tv but I'm not sure where the nativescript ios runtime or the metadata generator are in my project. Also, would this mean that my provisioning file and certificates should be for an appletv app instead of ios?
The iOS runtime is generally downloaded from NPM for your project. But it includes support for only iOS. For tvOS, you will have to checkout the open source iOS runtime project from Github and update the config scripts as described in the blog post,
set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator;-appletvos;-appletvsimulator")
set(CMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS "iphoneos iphonesimulator appletvos appletvsimulator")
and build your custom version of iOS runtime with CMake.

How to integrate Native ios and android sdk in Xamarin

I have to integrate one third party sdk in xamarin project.
They are providing the native sdk's for android and ios. I need to use them in Xamarin project to develop app for ios and android.
Xamarin offers in depth documentation for linking native libraries.
Linking native library iOS here and Binding a java Library here.
If you want to go further and use these sdk's in Xamarin.Forms you can make a wrapper in each platform dependent project and link them to your Forms project using Xamarin.Forms.DependencyService.
To use Firebase Crashlytics in your application follow the steps:
Install packages: Xamarin.firebase.iOS.Crashlytics and Xamarin.firebase.iOS.Core
Download GoogleService-Info.Plist file and add it to your project.
Set the build action as "Bundle Resource".
Build the project and run.

How to add fast lane tools in VSTS for Xamarin iOS and Android deployment

I want to automate the release for my xamarin iOS and android apps into the stores. I was wondering, if I can use fast lane tools via VSTS to do it.
Right now I directly add the playstore step in VSTS to deploy the android app into playstore. But, I want to make use of snapshot,snap grab, spaceship, supply and various other fastlane tools. Is it possible? If yes can anyone provide steps of how to do it? I tried searching the marketplace in vsts but the fastlane tools are not available.
Thanks.
FYI, VSTS released extensions to release iOS app on App Store or test flights.
Extension
Microsoft Visual Studio Team Services (VSTS) and Team Foundation
Server (TFS) use fastlane in their Apple App Store extension.
Getting Started
Once you have created or retrieved credentials for
your App Store account, then perform the following steps to automate
releasing updates from a VSTS build or release definition:
Install the App Store extension from the VSTS Marketplace
Go to your VSTS or TFS project, click on the Build tab, and create a new build
definition (the "+" icon) that is hooked up to your project's appropriate
source repo
Click Add build step... and select the
necessary tasks to generate your release assets (e.g. Gulp, Cordova
Build)
Click Add build step... and select App Store Release from the
Deploy category
Configure the App Store Release task with the desired
authentication method, the generated IPA file path, and the desired
release track.
Now when you build, your app will automatically be
published to iTunes Connect!
Fastlane Docs

Creating NativeScript app with Teleriks AppBuilder

I am writing hello world on nativeScript at AppBuilder platform. I created new project from template. It works perfetct with companion app (Run->Build->NativeScript) but i can't:
1) run it on iOS or android emulator
2) build app package (Run->Build->App Package)
Thanks much
From the browser you can't run on native emulators, but you can deploy to the NativeScript companion app for Android/iOS, and you can also build app packages for Android/iOS.
To build iOS app packages you need to register for the iOS developer program and register your provisioning profiles and certificates with AppBuilder before you can create app packages. If you have any other questions related to this let me know.

Resources