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

add address validation for web, add other functions #359

Closed ShiCheng-Lu closed 2 weeks ago

ShiCheng-Lu commented 4 weeks ago

This PR adds the address validation function and other missing functions from the web version of native (mostly unimplemented but its better to have the stub).

This also exports the WebNative version for the default export on web, so the x-platform functionality works (partly)

many functions are unimplemented on web, and they will either be no-op or if RadarRNWeb.throwOnUnimplemented(true); is set, throw an error.

all the web apis are also exported via RadarRNWeb as well, so exisiting functionalities don't break. There were a few places where the argument processing in JS native needs to be added to fit the signature of the radar-sdk-js module. But existing functionalities are kept.

All calls that are implemented in web has been tested via the example app. Tested on Android + iOS as well to make sure they are still working as expected.