example-onesignal-cordova-5.0.0

An example Cordova app with the OneSignal plugin version 5.0.0-beta1 intergated showing how to use each of its functions.

Trying the Example Out!

  1. To build the example first run cordova platform add android and/or cordova platform add ios.
  2. Open www\js\index.js and replace "b098f904-b0ee-4bc2-8e30-0de3ee24023c" with your OneSignal App Id.
  3. Build and run the app on your device with cordova run android or cordova run ios.

Installing in Your Own Project

To add the OneSignal to your Cordova project run the following. cordova plugin add onesignal-cordova-plugin --save

See the OneSignal Cordova SDK Setup Guide for the full installation guide.

Setup Cordova-OneSignal 5.0.0

Take a look to our OneSignal Cordova SDK Migration Guide to learn more about the Cordova 3.x to 5.0.0 upgrade.

Using Ionic instead?