Linda H
Linda H

Reputation: 139

Building support for in-app purchases into react native code

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

Answers (1)

compid
compid

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

Related Questions