OneSignal-Cordova-SDK
OneSignal-Cordova-SDK copied to clipboard
fix: use applicationId instead of PACKAGE_NAME
if the cordova app has flavors (like debug and release version with different applicationId value), the PACKAGE_NAME value remains fixed to the value of the id
in config.xml
, and that causes problems when you try to install a different flavor of the app as there is another app (the other flavor) that already declared a push permission for that package name.
By using the applicationId variable, each flavor will have it's own permission matching the application Id.
This was fixed in other push plugins long ago, check https://github.com/phonegap/phonegap-plugin-push/blob/master/plugin.xml#L31 https://github.com/Azure/azure-mobile-engagement-cordova/blob/master/plugin.xml#L140