Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

How to create an in-app-purchase Native Module in React Native

$
0
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?


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>