Reputation: 139
I'm building an iOS app with react native and need to add an in-app purchase from the App Store. How can I link up my (JS) react code with existing libraries for handling such functionality?
Upvotes: 2
Views: 1649
Reputation: 1323
Refer to this http://facebook.github.io/react-native/docs/nativemodulesios.html#content
In short, you can create a (native iOS) class that implements the react-specific "bridge" protocol (RCTBridgeModule
), add in a few lines of code to the methods, and it will essentially be callable from JS.
Upvotes: 3