https://github.com/mathieumack/mvvx.plugins.appcenter
Appcenter plugin for Mvvmcross in order to manage cross-platform apis compatibility
https://github.com/mathieumack/mvvx.plugins.appcenter
appcenter mvvmcross
Last synced: 9 months ago
JSON representation
Appcenter plugin for Mvvmcross in order to manage cross-platform apis compatibility
- Host: GitHub
- URL: https://github.com/mathieumack/mvvx.plugins.appcenter
- Owner: mathieumack
- License: mit
- Created: 2019-07-17T09:23:58.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2023-01-02T21:15:18.000Z (over 3 years ago)
- Last Synced: 2024-11-27T13:44:19.791Z (over 1 year ago)
- Topics: appcenter, mvvmcross
- Language: C#
- Homepage:
- Size: 516 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MvvX.AppCenter
Use AppCenter SDK on a MvvmCross application (https://www.mvvmcross.com/).
> Why using a plugin as AppCenter is compatible with .net standard ?
With a plugin, you can use an interface (IAppCenterClient) in order to use AppCenter functions
=========
# IC
[](https://sonarcloud.io/dashboard?id=mathieumack_MvvX.Plugins.AppCenter)
[](https://github.com/mathieumack/MvvX.Plugins.AppCenter/actions/workflows/ci.yml)
[](https://nuget.org/packages/MvvX.Plugins.AppCenter)
# Onboarding Instructions
## Installation
1. Add nuget package:
Install-Package MvvX.Plugins.AppCenter
2. In App.xaml.cs file add the following line in usage declaration section:
MvvX.Plugins.AppCenter;
3. In App.xaml.cs file add the following line in App class constructor:
```c#
var appCenterClientId = "Set AppCenter Id here";
var buildVersion = "Set your application build version here";
// ex : Assembly.GetExecutingAssembly().GetName().Version.ToString()
var appCenterClient = Mvx.Resolve();
appCenterClient.Configure(appCenterClientId,
buildVersion,
true,
true,
true,
null,
null);
```
## Attach file at each crash report
You can define a default file that will be attached to an Exception report when an exception occured in the application.
To do it, set the full file path in the Configure method
```c#
var fileToUploadSamplePath = "c:\file.log";
var appCenterClient = Mvx.Resolve();
appCenterClient.Configure(appCenterClientId,
buildVersion,
true,
true,
true,
fileToUploadSamplePath,
null);
```
In this example, when a crash occured, the file "c:\file.log" will be attached to the exception report.
## Attach additional file at each crash report
Sometimes you need to attach more than a unique log file.
For this case, you can define additional file path to the Configure method. All files defined here will be zipped and attached to an Exception report when an exception occured in the application.
```c#
var otherfile1 = "c:\temp\otherFile.log";
var otherfile2 = "c:\temp\otherFile2.log";
var appCenterClient = Mvx.Resolve();
appCenterClient.Configure(appCenterClientId,
buildVersion,
true,
true,
true,
null,
new List()
{
otherfile1,
otherfile2
});
```
In this example, when a crash occured, a zipped file (named "AdditionalContent.zip") will be attached to the exception report.
# Support / Contribute
> If you have any questions, problems or suggestions, create an issue or fork the project and create a Pull Request.