Step 1: Import PushBots Plugin:
The plugin requires phonegap/cordova CLI 7.1.0+
cordova plugin add pushbots-cordova-plugin --save
Step 2: Add Required code:
Add this line to your www/js/index.js to intialize Pushbots in onDeviceReady section:
window.plugins.PushbotsPlugin.initialize("PUSHBOTS_APPLICATION_ID", {"android":{"sender_id":"GOOGLE_SENDER_ID"}});
Prepare the app
cordova prepare ios
Step 3: Enable Push notifications:
Now open the xcode workspace file in xcode:
platforms/ios/APP_TITLE.xcworkspace
Make sure Automatic manage signing is enabled:
![](../https/downloadsintercomcdncom/i/o/67817460/914728941c99395ecebe9fe3/44_341341565.png)
Enable background modes and Push notifications in capabilities:
![](../https/downloadsintercomcdncom/i/o/67817890/c6555589c62df9734d8cc2c9/66_1330651770.png)
![](../https/downloadsintercomcdncom/i/o/67817892/100102e3e810471fb2ec0599/77_1230994219.png)
Build iOS app:
cordova build ios
Run the app on your device.