appcenter-sdk-cordova/sample
Patrick Nikoletich 0a75d9d2d1 Merge branch 'master' of github.com:Microsoft/appcenter-sdk-cordova 2017-12-13 15:13:01 -08:00
..
res Commit initial SDK files 2017-10-13 09:33:49 +03:00
www Commit initial SDK files 2017-10-13 09:33:49 +03:00
.gitignore Commit initial SDK files 2017-10-13 09:33:49 +03:00
.npmignore Commit initial SDK files 2017-10-13 09:33:49 +03:00
README.md Merge branch 'master' of github.com:Microsoft/appcenter-sdk-cordova 2017-12-13 15:13:01 -08:00
config.xml Merge branch 'master' of github.com:Microsoft/appcenter-sdk-cordova 2017-12-13 15:13:01 -08:00
package-lock.json Commit initial SDK files 2017-10-13 09:33:49 +03:00
package.json Renaming folders and updating documentation. 2017-12-13 14:53:02 -08:00

README.md

Sample application

This is a sample application that demonstrates some of capabilities of App Center for Cordova

To run application and test those capabilities please follow the instructions below:

  1. Configure Application Secrets for bot iOS and Android

    In config.xml find APP_SECRET preference for both iOS and Android platforms and set it's value to application secret as displayed in App Center portal

  2. Change other plugins preferences if required

    Change APPCENTER_ANALYTICS_ENABLE_IN_JS and APPCENTER_CRASHES_ALWAYS_SEND values if you want. By default application is configured to not send analytics automatically to demonstrate/test scenario with programmatic switching App Center Analytics functionality on and off; Crashes plugin is also configured to process crashes in JS rather than send them automatically to demonstrate crashes processing and reports events handling.

  3. Configure Google FCM

    Download google-services.json from Firebase portal and put it near config.xml to enable receiving push notifications on Android and then find and uncomment the following section in config.xml:

    <!-- <resource-file src="google-services.json" target="google-services.json" /> -->
    

    For iOS no additional configuration is required.

  4. Install dependencies

    Run npm install in console to install Cordova CLI locally

  5. Run app on Android/iOS

    In console type npm run android or npm run ios to launch application on either Android of iOS device or emulator. The command will run application on device if connected or start an emulator and launch app on emulator.

    Hint: If you want to pass some additional arguments to underlying cordova command, add them after double dash --, for example to run application on iPhone 7 simulator use npm run ios -- --target=iPhone-7