radarlabs / react-native-radar

React Native module for Radar, the leading geofencing and location tracking platform
https://radar.com
Apache License 2.0
170 stars 32 forks source link

Feature request- initializeWithPublishableKey in javascript #12

Closed ste00martin closed 6 years ago

ste00martin commented 6 years ago

Any chance of being able to set or change the initializeWithPublishableKey in ReactNative?

russellcullen commented 6 years ago

This is definitely something we're working on. But at the moment we need to initialize the SDK before any JS bundle is loaded to register for location callbacks, so calling initialize from ReactNative JS is potentially problematic

ste00martin commented 6 years ago

What if we could initialize the SDK with a key then update the key being used in ReactNative JS? Then we don't have do deal with key logic in ios and android for swapping between dev and prod keys

russellcullen commented 6 years ago

That's exactly the type of solution we're looking for. Splitting out the required native initialization from setting the public key.