cordova-plugin-radar
cordova-plugin-radar copied to clipboard
Use config.xml to add and configure the plugin
The plugin installation requires manual modifications of Info.plist, android.manifest, AppDelegate.m, MainApplication.java etc.
However, the plugin might use the app config.xml to omit the manual modifications of platforms' code.
We already can add the required changes to Info.plist like this: (Official documentation is misleading in this part)
<platform name="ios">
<edit-config file="*-Info.plist" mode="overwrite" target="UIBackgroundModes">
<array>
<string>fetch</string>
<string>location</string>
</array>
</edit-config>
<edit-config target="NSLocationAlwaysAndWhenInUseUsageDescription" file="*-Info.plist" mode="overwrite">
<string>Map requires your current location. Mind to share?</string>
</edit-config>
...
</platform>
It would be great to pass publishableKey using plugin variable.
So we haven't to touch AppDelegate.m and MainApplication.java:
<plugin name="cordova-plugin-radar">
<variable name="publishableKey" value="your-key-goes-here" />
</plugin>
Can it be implemented?
Great idea, should be possible. Want to try to implement it yourself and open a PR? If not, we can add it to our backlog. Thanks!
@nickpatrick , thank you for your reply,
It's really possible, some other plugins have implemented this feature.
Unfortunately, I'm not familiar enough with java/Obj-C (that's why I'm using cordova). So it would be great if someone more experienced did this.
Thanks!
Cool, we'll try to get to this soon! Thanks again.
Please provide an ETA on this issue, as we have to plan our work too. Thanks.
#25 added the ability to set the publishable key dynamically.