Skip to content

Chrobyte/appcenter-sdk-capacitor

 
 

Repository files navigation

App Center SDK for Capacitor

GitHub Workflow Status lerna

App Center is mission control for mobile apps. Get faster release cycles, higher-quality apps, and the insights to build what users want.

Plugins

The Capacitor App Center SDK consists of a several plugins so you can use any or all of the supported App Center services. This SDK uses a modular approach, where you just add the modules for App Center services that you want to use. appcenter-analytics and appcenter-crashes make sense to add to almost every app, as they provide value with no additional setup required. appcenter provides general purpose App Center APIs, useful for multiple services.

Package Source Version Downloads
@capacitor-community/appcenter ./appcenter npm badge npm badge
@capacitor-community/appcenter-analytics ./appcenter-analytics npm badge npm badge
@capacitor-community/appcenter-crashes ./appcenter-crashes npm badge npm badge

📱 Example Mobile App

You can get familiar with SDK quickly by cloning this repository and running the sample app in example directory. For further instructions please refer to example's README

1. 📦 Installation

Add the App Center plugin(s) that fit your needs directly from the CLI:

npm i @capacitor-community/appcenter @capacitor-community/appcenter-analytics @capacitor-community/appcenter-crashes --save-exact
npx cap sync

2. 🛠 Configure the SDK

You must configure the project with your App Center project app secret before you can use the App Center SDK in your Capacitor project. There are other values that can also be added, but they are optional.

Notice that it's likely that Android and iOS platforms will be associated with different applications on App Center portal so you would need to add the APP_SECRET twice - one for Android and another for iOS.

iOS

Create a new file with the name AppCenter-Config.plist with the following content and replace {APP_SECRET_VALUE} with your app secret value. Don't forget to add this file to the Xcode project (right-click the app in Xcode and click Add files to ...).

Example:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>AppSecret</key>
    <string>{APP_SECRET_VALUE}</string>
    <!-- below are optional -->
    <key>LogLevel</key>
    <integer>2</integer>
    <key>AnalyticsEnableInJs</key>
    <false/>
    <key>AnalyticsTransmissionInterval</key>
    <integer>3</integer>
    <key>CrashesEnableInJs</key>
    <false/>
    <key>CrashesAlwaysSend</key>
    <false/>
</dict>
</plist>

Android

Create a new file with the name appcenter-config.json in android/app/src/main/assets/ with the following content and replace {APP_SECRET_VALUE} with your app secret value.

{
    "app_secret": "{APP_SECRET_VALUE}",
    "start_automatically": true
}

Contributors ✨

Thanks goes to these wonderful people (emoji key):


John Borges

💻

Hrafnkell Baldursson

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

About

Capacitor Plugin for Microsoft's Visual Studio App Center SDK.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 36.1%
  • Swift 27.2%
  • Java 25.5%
  • Ruby 4.8%
  • Objective-C 3.0%
  • JavaScript 1.2%
  • Other 2.2%