OkCollect React Native
The OkCollect React Native library enables you to launch OkHi from your app and collect accurate addresses from your users.
Get Started
The project is intended to work with a bare workflow installation of React Native. i.e projects created using npx react-native init MyAwesomeProject.
The OkCollect React Native library only works on Android devices. iOS support coming soon!
Installation
Link native dependancies
From react-native >=0.60 autolinking will take care of the link step but don't forget to run pod install
React Native modules that include native Objective-C, Swift, Java, or Kotlin code have to be "linked" so that the compiler knows to include them in the app.
iOS
If using cocoapods
For iOS, while you can manually link the old way using react-native own tutorial, we find it easier to use cocoapods. If you wish to use cocoapods and haven't set it up yet, please instead refer to that article.
Android:
This module does not require any extra step after running the link command 🎉
Please make sure AndroidX is enabled in your project by modifying android/gradle.properties
and adding 2 lines:
For Android manual installation, please refer to this article where you can find detailed step on how to link any react-native project.
Usage
Whenever a user's OkHi address is created or used an SMS is sent to them notifying them of this usage
Whereas OkCollect does provide ways to customise the look and feel of the address creation process as well as alter some of the in built functionality. Due to accessibility concerns, the product will work with select brand colours that provide enough contrast to the text being rendered.
Next steps
Checkout the API Reference for more customisation options
See a working integration example.
Integrate the OkCollect Webhook
Last updated