Migration Guide
Since v2.0.0, the RN SDK changed all Usage behaviour. Follow these steps to migrate without issues.
Removing dependencies
Prior to v2.0.0, the SDK depended on on react-native-webview
and react-native-svg
. But now, these aren't needed. So you can remove them:
yarn remove react-native-webview
yarn remove react-native-svg
npm uninstall react-native-webview
npm uninstall react-native-svg
You may need to rerun
pod install
to cleanup the /ios/Pods dir.
Showing the Offerwall
Initially, the right way to show the Offerwall was to add the component BitLabsOfferWall
to a new screen that you create. This complicated the handling of navigation, as it was served by you.
Now, the handling is operated by a module of several functions. Please refer to this section called BitLabsOfferwall.
Get and Check Surveys
These two were functions getSurveys
and checkSurveys
that you used to import directly. They used to get callbacks for handling their results.
Now they are served by a module and are Promises that you can handle asynchronously in your code. Please refer to the section called BitLabsAPI
Updated about 15 hours ago