OneSignal-Cordova-SDK icon indicating copy to clipboard operation
OneSignal-Cordova-SDK copied to clipboard

fix: use applicationId instead of PACKAGE_NAME

Open jcesarmobile opened this issue 4 years ago • 0 comments

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


This change is Reviewable

jcesarmobile avatar Jun 10 '20 12:06 jcesarmobile