0

I am trying to implementing an in-app-purchase mechanism in my React Native app for iOS. But I couldn't found official supported modules about it, and I don't want to use any third party modules.

So I found this article How do you add an in-app purchase to an iOS application? on Stack overflow. Those answers were written in Swift or Objective-C, and I know little about Swift.

After I read about this article https://reactnative.dev/docs/native-modules-ios. I am thinking about making a method to request a purchase using Swift or Objective-C, and expose it to my React native project as a Native Module. After sending a request from a Button inside React Native View, I want to send the result to my React Native project using RCTEventEmitter from the Swift or Objective-C code.

Is it a good idea and how I can implement this?

Ko7
  • 127
  • 1
  • 8
  • Why u won't use a third-party module? – Oliver D Aug 22 '20 at 08:27
  • 1
    I want to understand how it's work and maintain it for myself. And I don't want to give any security credentials like password when verifying a receipt to a third party module in my production app. – Ko7 Aug 22 '20 at 14:47
  • Actually, I'm using before [react-native-iap](https://github.com/dooboolab/react-native-iap) you can see how it works, Anyway if you found anything useful tell me, please! – Oliver D Aug 22 '20 at 15:10

0 Answers0