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

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?

Related

How can you use iOS 16's UIPasteControl with React Native?

iOS 16 introduces UIPasteControl as a way of avoiding the paste permission dialog appearing when an app programmatically accesses the clipboard contents.
To enable UIPasteControl, its target needs to be set to an object that conforms to UIPasteConfigurationSupporting, so typically a UIResponder like UIViewController or UIView. Then you would ensure the object's pasteConfiguration is set to allow the types you want to paste.
I've got a React Native app so there are no native iOS UIView etc. type objects being used directly.
If, for example, a paste button was to be added to a React Native view, then how can that be hooked up so that its using UIPasteControl?
If we consider the latest version of react native, there might we not see the functionality for UIPasteControl as per new iOS versions.
for this, I guess we should create our implementation and export the functionality to react-native to accomplish this requirement.
If you have hands-on experience with iOS native development and custom native UI views implementation in React Native then you can check out the following blog about the UIPasteControl implementation in native, to implement it natively and export it to React Native.
UIPasteControl(Native) demo : https://blog.kylelanchman.com/how-to-use-uipastecontrol-in-ios-16/

Allow user to change App Icon in React Native

Apple specifies that users can change their icon to give a more personalised experience. See docs here:
https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/app-icon/#user-selectable-app-icons
My question is regarding using this functionality in React Native. Building an app in React Native is it possible to access this setAlternateIconName method and provide the user with alternate app icons? Does React Native provide a nice way to interact with this IOS method?
I am currently trying to build this out. This package seems designed to do what we both are looking for, but I haven't tried on anything that I have actually deployed yet.
https://github.com/skb1129/react-native-change-icon
use can use this module react-native-alternate-icons, it allows to access to setAlternateIconName method

How to integrate WebRTC with ios app swift?

I need to create an app that holds audio and video calling functionality. Does anyone have idea about which is a free library for this functionality ? And how to manage it properly in my app ?
I used AppRTC in my projects
You should implement ARDAppClientDelegate and RTCEAGLVideoViewDelegate protocols on ViewController on order to use this library.
You can find Swift examples on Github

How can I call with native Swift methods from Electron app using javascript?

I am looking to add in-app subscriptions to the mac desktop app so I can submit to app store.
I have the code written for iOS using the cordova plugin: https://github.com/AlexDisler/cordova-plugin-inapppurchase
But for electron there exists no such plugin.
So I can use the native swift code from the plugin, but need a way to write a custom plugin so I can call swift methods from javascript running the Electron app.
Please let me know how to approach this, or point me to the correct resources.
Thanks You

React Native Ad network wrappers

Are there any ad network wrappers besides Google's Admob for React Native? Like Chartboost, Flurry or...well anything else in fact. I haven't found anything else in my searches so does that mean we can only use Admob?
Appodeal provides a react native integration now. You can choose react native framework when registering your app on appodeal
EDIT:
Appodeal now discontinues the support of their react-native wrapper
See here
I’ve been looking around on this topic too. And here is my take so far. Probably late for the original post. But it might be helpful for people who find this via search in the future (like me).
AdMob: Supported and verified
I managed to make this work. In terms of dependency, AdMob needs FireBase. But FireBase does not support React Native out of box. I used React-Native-Firebase to make it work.
https://rnfirebase.io/
https://firebase.google.com/
https://dev-yakuza.github.io/en/react-native/react-native-admob/
FB Ads: Supported
I haven’t verified it myself. But it seems to be well documented. (And React Native being related to Facebook, I’d be surprised if it weren’t supported.)
https://www.npmjs.com/package/react-native-fbads
Flurry: NOT supported
Flurry Analytics supports React Native but Flurry Ads do not. Below is message from their support team when I asked them about this.
"Thank you for contacting Flurry Technical Support. We offer a React Native wrapper, however it does not currently support ads, only analytics. You can read more about it here:
https://developer.yahoo.com/flurry/docs/integrateflurry/react-native/ "
MoPub: Not really
I’ve found two React Native wrappers. One is old and no longer updated. (The authors seem to be actively monitoring the discussions and replying to queries. But they are no longer providing tech support.) And the other is very new and doesn’t seem to have enough documentation or evidence that it actually works.
https://www.npmjs.com/package/react-native-mopub
https://www.npmjs.com/package/react-native-mopub-sdk
as far as i know appodeal supports react native. + it provides access to facebook, avocarrot, inmobi, smaato, mopub and startapp alongside with openx and flurry for native ads.

Resources