An example Cordova app with the OneSignal plugin intergated showing how to use each of its functions.
- To build the example first run
cordova platform add android
and/orcordova platform add ios
. - Open
www\js\index.js
and replace"3beb3078-e0f1-4629-af17-fde833b9f716"
with your OneSignal App Id. - Build and run the app on your device with
cordova run android
orcordova run ios
.
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.