Customizing phonegap build

0
Hi, I wanted to customize my PhoneGap build so It would recieve push notifications from OneSignal. source 1: https://documentation.onesignal.com/docs/cordova-sdk-setup source 2: https://documentation.onesignal.com/docs/phonegap-sdk-setup 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
asked
2 answers
1

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

answered
1

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 https://docs.mendix.com/refguide/customizing-phonegap-build-packages

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?

answered