This demo project is an example to demonstrate the features of the AGC Crash Xamarin iOS Plugin.
In the Solution Explorer panel, right click on the solution name and select Manage NuGet Packages. Search for Huawei.Agconnect.iOS.Crash and install the package into your Xamarin.Android projects.
Before using the Xamarin SDK code, ensure that the below environments are set:
- Visual Studio for Mac or Visual Studio - The latest version of Visual Studio for Mac or Visual Studio should be installed and configured on the development computer.
- A Mac with macOS High Sierra 10.13 or above required for developing a Xamarin.iOS application, and when using Visual Studio you must be connected to a Xamarin.iOS build host.
- Xcode and iOS SDK - Apple's Xcode and the latest iOS API need to be installed and configured on the developer's computer. The latest stable version is usually recommended.
- An Apple ID. If you don't have an Apple ID already you can create a new one at https://appleid.apple.com. It's necessary to have an Apple ID for installing and signing into Xcode.
Step 1: Sign in to AppGallery Connect and select your project from My Projects. Then go to Quality > Crash. On the page that is displayed, click Enable now in the upper right corner.
Step 2: To use the Crash service, you need to enable HUAWEI Analytics first. If you have not enabled HUAWEI Analytics, click Enable now, or go to HUAWEI Analytics to enable the service. For details, please refer to Enabling HUAWEI Analytics.
Step 1: Sign in to AppGallery Connect and select your project from My Projects.
Then go to Project Settings tab. On the page that is displayed, click agconnect-services.plist
button.
Step 2: Once you download your agconnect-services.plist
file, place it under the root of the demo project. And set the build action as "BundleResource".
Step 3: Bundle identifier in the agconnect-services.plist
and the Info.plist file should be the same.
To use free provisioning to deploy an app to a device and to use specific entitlements follow these steps:
Step 1. Use Xcode to create the necessary signing identity (developer certificate and private key) and provisioning profile (containing an explicit App ID and the UDID of a connected iOS device).
Step 2. Use the signing identity and provisioning profile created by Xcode in Visual Studio for Mac or Visual Studio 2019 to deploy your Xamarin.iOS application.
Step 2. Open the Properties of the demo application. Select iOS Bundle Signing and select your profile.
You need to enable the Keychain Sharing capability in Visual Studio or Crash Service failed to send reports to the App Gallery Console.
Step 1: Click and open the Entitlements.plist file.
Step 2: Select the Entitlements tab below and check Enable Keychain in the Keychain section.
Note: A free or paid provisioning profile is required to use entitlements.
You can now run your application and it should automatically start up on your mobile device.
AGC Crash Xamarin iOS Plugin - Demo uses the Apache 2.0 license.