-
-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In app purchase in expo #174
Comments
Simply:
import { NativeModules } from 'react-native';
const { RNIapModule } = NativeModules;
function hasIAP() {
return !!NativeModules.RNIapModule;
}
The general idea here being |
The question is why would you start with Expo in the first place. |
At least for me, Expo development environment is much easier to work with than having to create native builds. Also, having a free multi-platform push notification service with a singular interface is also super convenient. |
@KevinColemanInc Yes. I understand because I've been heavy expo user earlier. I really want expo to integrate the |
As others have proposed, I'd be cool if it was just stubbed out for testing. I just like expo for the dev experience. I am considering breaking it out into its own branch in git and keep the dev branch expo friendly. Once its time for deployment, I could merge in the ejected code, test it, and them deploy the app. |
@ImArtur the question is "In app purchase in expo". You can read about the pros and cons of Expo here: https://docs.expo.io/versions/latest/introduction/why-not-expo |
Hello and thanks for this writeup! I'm wondering if ( after detaching ) you're supposed to continue to build with exp, or with xcode, in the "detached" branch? Thanks! |
@EvanBacon also, how are you testing this on iOS? Do you push a new build and then test it there or is there a way to test iaps locally before? |
If I know I will need in-app purchases at some point of the development, should I still use CRNA? or go directly to RN native from the start? Unless of course, expo devs implements expo in-app purchase very soon. |
@edoantonioco I’ve gotten this working with expo. I just make a page with iap buttons for purchasing items and only press those buttons when I’m testing purchases and building with Xcode. Otherwise I build with expo. Works great! |
Sorry for the delay. When you detach, you add native code and build it onto your device. You then use that build like the expo client (except only for your singular app). I would still recommend sticking with Expo. CRNA is maintained by Expo and our focus is mostly on making the libraries work in that environment. Vanilla React Native will require a lot of unneeded setup and will require that you know a lot more about the inner workings of modules. |
Hello, now that you bring up the subject. If in app purchases is kind of "hard" to handle by Expo. What are the suggested roadmaps to monetize an App without detaching it from Expo, since for me, like many others, I make use of Expo for the fact that the overall experience is much friendlier than RN and far less complex than going native on both platforms. So, can you just use a subscription plan with PayPal or receive payments through credit cards? Is that allowed by Google and Apple to be built in, inside your Expo App by using a web view for example? Thanks. |
If its worth anything, we ended up dumping expo because we got tired of waiting for issues like this to be resolved. It definitely adds friction to testing and to supporting some features (like notifications), but at least my dev can stop telling me, "that is impossible because expo doesn't support it". |
Expo has announced this recently about the future plan in 2019. You will be able to link |
I have been trying to make @EvanBacon's code above work but my NativeModules is empty and as a result RNIapModule is undefined. (on iOS at least) Have others encountered this issue? Does this mean I am not correctly linked? FWIW, react-native link appears to have worked....
but I suspect I may need to link manually which thus far I haven't been able to do. I can't find a libraries folder. |
@EvanBacon Hi Sir, |
@cellis can you tell me more how you made the inapp work i am trying for 1 week now can you show the code please? |
do all the same stuff you would normally do |
Hi Evan,
Do you know what could be the issue? (Or anyone reading this) |
According to the docs, https://docs.expo.io/versions/v32.0.0/sdk/payments/, have you set up payments on your device? (simulator wouldn't make sense to test this with) |
Like a previous user on this post, it is Expo's best intention for this first quarter to implement a way to build apps and also to be able to import native React Native libraries. Right now it shows a Beta when starting a new project with the CLI. Hope this is fixed soon. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
Please keep it open and help us find a way to make this a reality starting Expo SDK versión 33.0 |
Has anyone any updates on this issue? |
https://docs.expo.io/versions/latest/sdk/in-app-purchases/ Update: Sorry, missed the following:
|
@kkarkos Using Expo's own in-app-purchase module, you’d still have to eject your Expo app (for the foreseeable future), so it doesn't really solve the issue. If anyone can give a more thorough guide as to how to trick that @EvanBacon us describing, then please share. Maybe even a demo app? |
@TheInternet I'm running into the same issue with the missing "Libraries" folder. Did you find out how to install this properly on iOS? |
@inglesuniversal |
Can we use e-payments with webView? Is it legal? |
As far as I know you can use 3rd party solutions as a web app (like stripe or PayPal) but inside the AppStore or PlayStore you can’t. Otherwise your app may be kicked out or removed until you do it the right way through the API we’ve all been waiting for since I started using Expo. |
You can use Stripe or Paypal in your app as long as you are purchasing external goods and services (like when you buy a product on amazon or pay in the Uber app), but you can't use Stripe for unlocking app software features (like selling game tokens or premium features) |
Thanks KevinColemanInc for the comment... Do you happen to know if selling memberships or recurring payments for movie rentals, cloud storage, online courses... Can that be paid externally using Stripe or PayPal within an App -> (PlayStore or AppStore) ? Thanks for your feedback! |
These are the guidelines by Apple: I think most of what you described would fall under "premium content." Netflix is required to pay the apple tax. It looks like Dropbox also pays the apple tax if you signup with them on mobile. I would checkout Udemy's app to see if they also use IAP. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
Sorry to be so dense, but does this mean that you add the IAP code to each branch separately (if you have to ‘wrap’ it for the expo branch) & then just re-eject on a new branch every time you’ve added expo code to the master or are you merging branches at any point??! And is this still the best way to add IAP’s to a managed expo app? I’m just finishing up my first big app and need to add this functionality somehow & doing it in a branch seems a good safe option maybe - I just want to make sure I understand the workflow! I also have to say I love expo! It’s been a brilliant way to get into react native and without it I would never have got this far so thank you and keep up the good work!!! |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
Hi! Did you find the answer? How did you implement it? |
Hello,
We are using Expo to create our project. In our project one important topic is in-app purchase. Could you help me
how to implement in-app purchase using expo and what are necessary steps we need to follow to implement this.
The text was updated successfully, but these errors were encountered: