Customizing phonegap build

Hi, I wanted to customize my PhoneGap build so It would recieve push notifications from OneSignal. source 1: source 2: I’ve read that you can customize your PhoneGap build with either PhoneGap plugins or Cordova plugins. Is this correct? I’ve tried to follow the OneSignal documentation for Cordova but there is no index.js in the dist folder, so I just create one? Or do I put the js code in the bundle.js ? At this point, I’m not really sure how to add this plugin to my build. If you can help me out, would be greatly appreciated! Thank you
2 answers

Hi Vincent,

if I remember correctly you should place custom code in the entry.js file. I can’t say if this will work for OneSignal though.

regards, Fabian


Hi Vincent, you can customize the phonegap build by downloading the phonegap package and changing the config.xml. i.e. add the onesignal plugin. After that you need to rebuild your app, see

I dont have experience with onesignal, but you might initialize it with a HTML/javascript widget, and add this snippet to the phone layout in your project. This is how it's done with the default Mendix push connector using FCM.

Whats the main reason for you to use onesignal over the default?