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:

Enable background modes and Push notifications in capabilities:

Build iOS app:

cordova build ios

Run the app on your device.

Did this answer your question?