Has anyone successfully adopted IAP with EAS Build for their Managed app?

Config Plugins (beta) were released in SDK 41 making it possible to bundle native libraries. Now that SDK 42 is here and Config Plugins are stable (I think?) I’m curious if anyone has successfully integrated IAP using the Managed workflow yet. And if so, I’d love to hear a breakdown of how it went!

I’m also curious if an official guide will be eventually be published by Expo since this is likely one of (if not the most) top-requested package integrations for Managed apps.

5 Likes

I recently added IAP (one-time purchase) into a Managed Workflow app with SDK41 and released it on the store (iOS and Android). So far, it’s working without any problems.

The expo-in-app-purchase works without Config Plugin because it doesn’t require any particular native-specific configs (as far as I know). So, all I had to do was add expo-in-app-purchase to package.json and implement it as usual.

The one notable thing I did was avoid importing the “expo-in-app-purchase” when env is development because Expo Go Client doesn’t support it (but we can use Custom Development Client now). As tests were not possible in the development env, we did them on the standalone app built by EAS build.

Currently, the purchase process for users on production seems working fine. We’ll have to see a little while because it hasn’t been long since the release. But I was surprised at how easy it was to implement.

4 Likes

good to hear you’ve had success with it! we have been more focused on the infrastructure side recently to make this sort of thing possible, but we do plan at some point to circle back and make the expo-iap library and end to end experience as good as possible. there’s a lot that can be done to improve it :slight_smile:

1 Like

I look forward to seeing more improvements to IAP in the future.

I want to thank the Expo Team for making it possible to incorporate IAP in Managed Workflow :sparkles: I’ve been waiting for this for about a year, instead of ejecting it :grinning_face_with_smiling_eyes:

@gaishimo-omoidasu Are you able to just build with expo build, or is EAS build required to get this to work?

@richardwu We need to use EAS Build because Classic Build (expo build) doesn’t support IAP.

@gaishimo-omoidasu thanks for the reply and insight.

Did you guys look into a more fully managed IAP service like RevenueCat? It requires ejecting, which I’m hesitant with since I’d like to continue using Expo Go and a seamless dev experience. Seems like EAS build supports ejected apps as well, and has a custom development client now.

@richardwu I messaged RevCat about this a few months ago then we exchanged a few emails. I suggested they work with Expo on a comprehensive guide since it would likely yield them thousands of new customers, they said their roadmap is full but they would discuss it internally.

https://docs.revenuecat.com/discuss/5c49baa6c8f5b9004320539a

Haha right, I ran into that thread while searching for IAP solutions.

I would imagine Expo’s team is swamped ATM, so I’m not sure how much time they’d be willing to put in to partner up with a specific IAP provider like RevenueCat. Would be great to get something like the Sentry plugin for managed workflows going though.

@frankiejarrett are you currently running expo IAP or RevenueCat in an ejected app?

If all a RevCat integration needs is a config plugin (which I assume it does), then it shouldn’t be a problem to just create one as a community package, you don’t need RevCat nor Expo to do that for you.

Hello! Confirming here that expo-in-app-purchase is now available in the managed workflow. The docs say differently for bare workflow only. However a few times mentioned in this thread says managed. Hope it’s the latter :grinning_face_with_smiling_eyes:

2 Likes

@feldmanz66 thanks for pointing this out, that’s exactly why I started the thread since more is now possible in the managed workflow with EAS than the docs indicate. I assume that Expo will eventually update the docs with an official guide for managed apps, but we haven’t heard an ETA on that yet.

1 Like

these features are still in preview so we haven’t updated all of the documentation to reflect their existence yet – notice that expo dev client docs all live under the “Feature Preview” section. as we get closer to promoting these tools we will start to update the rest of the documentation accordingly :slight_smile:

1 Like

@frankiejarrett from reading the docs it looks to me like you will need a config plugin for iOS for the following:

You also need to enable the In-App Purchases capability for your app in Xcode.

For Android it does not look like you need any extra config.

EDIT: See also: iOS Capabilities - Expo Documentation

I’m really looking forward to using the managed workflow in EAS Build. But we can’t pay for the Feature Preview, as we’re not making a profit yet (IAP would definately help). Do you have an expected release date for EAS Build? Just fishing here :smile:

@frankiejarrett and others who are interested: I just tried installing react-native-purchases (RevenueCat’s react native SDK) and it seems to be working with sandbox purchases.

I simply expo installed the package (equivalent to yarn install) and used EAS Build, which seems to pick up on the RNPurchases pod fine during the cocoapods install.

Will confirm once it’s rolled out to prod and (hopefully) my first purchase!

1 Like

Hi @richardwu

I am very interested in doing the same with my managed expo app (without eject). Could you share with us a more complete guide ?

It was pretty straightforward. I upgraded my SDK from 41 to 42 and built it without any native modules with EAS build and made sure my app still worked on my devices.

Then I ran expo install react-native-purchases, committed the changes to VCS, then re-ran EAS build. It’s working fine as far as I can tell.

3 Likes

Awesome, glad you got RevenueCat working! To highlight why this works in EAS, and how that differs from the normal “managed” workflow, here is a short summary:

Almost any React Native library, without a custom native code setup, should be working on EAS. This applies to both managed and bare Expo projects. If it does require native configuration, an expo config plugin might help. (some libraries have one already, like react-native-firebase).

Be aware that if you add custom native code, Expo Go might be harder to use. That won’t include the native modules and will just crash when using that bundle. That’s where dev clients can help you to get the same development flow like a managed app, but with custom native code.

4 Likes

Thanks to @bycedric and @richardwu

I was successful using expo-dev-client / react-native-purchases (lot of step to configure it on both store, but it work) !

1 Like