Skip to main content
Solved

Update documentation to use react-native-purchases with Expo EAS


Forum|alt.badge.img+3

Hi ! 
With EAS build we can now use react-native-purchases without eject according to this discussion : 
https://forums.expo.dev/t/has-anyone-successfully-adopted-iap-with-eas-build-for-their-managed-app/54047/17

Can you update your documentation ?
regards,
Sephyre

Best answer by jazmine

Hi @Sephyre :wave: ,

Thank you for bringing this to our attention. We will update our documentation to reflect this! 

View original
Did this post help you find an answer to your question?

10 replies

jazmine
Forum|alt.badge.img+7
  • Dedicated Contributor
  • 122 replies
  • Answer
  • August 11, 2021

Hi @Sephyre :wave: ,

Thank you for bringing this to our attention. We will update our documentation to reflect this! 


Forum|alt.badge.img+3
  • Author
  • Helper
  • 2 replies
  • September 8, 2021

Documentation is still not update ?

Lots of people asked me for a guide so I did: https://medium.com/@jonathan.payet/expo-in-app-purchase-for-managed-app-cdcd643de28d


Forum|alt.badge.img+1
  • New Member
  • 1 reply
  • October 8, 2021
Sephyre wrote:

Hi ! 
With EAS build we can now use react-native-purchases without eject according to this discussion : 
https://forums.expo.dev/t/has-anyone-successfully-adopted-iap-with-eas-build-for-their-managed-app/54047/17

Can you update your documentation ?
regards,
Sephyre

Hi sephyre, I saw your post on Expo forums and wondered if you could answer some questions for me?

It would be awesome if you could contact me in anyway. @mercpls on twitter.

I was wondering how you got around the linking required for revenue cats react native install.

Thanks!


Forum|alt.badge.img+1
  • New Member
  • 1 reply
  • November 21, 2021

Hi @Marcus Lee, I successfully installed react-native-purchases in an Expo managed project (ie. not ejected), linking is not required, I just installed it with npm as any package.

 

You will need however to build using EAS and use the custom Expo dev client instead of the default Expo app (Expo Go), more info on that here => https://blog.expo.dev/introducing-custom-development-clients-5a2c79a9ddf8

 

I followed the guide from Jonathan Payet mentioned above and there is nothing special to do on react-native-purchases side. The hardest part for me was to understand the Expo ecosystem as they are so many options (what is EAS, what is custom Expo client...).


Forum|alt.badge.img
  • New Member
  • 1 reply
  • January 17, 2022
jazmine wrote:

Hi @Sephyre :wave: ,

Thank you for bringing this to our attention. We will update our documentation to reflect this! 

The documentation is still very out of date. I would be happy to help update it. 


Thomas
Forum|alt.badge.img+5
  • Member
  • 5 replies
  • February 9, 2022

I’ve installed `react-native-purchases` in the same way, however I can’t see any debug logs. Did you get debug logs to work with expo? I have set `await Purchases.setDebugLogsEnabled(true)`.


Forum|alt.badge.img+2
  • Member
  • 9 replies
  • February 15, 2022

@Thomas I’m not sure this is the best way but the only way I’ve figured out to view the debug logs is to connect my device to my computer via usb. Open up the ‘Instruments’ app that comes with Xcode (https://g.co/kgs/GJ2FsV), choose “Logging”  and then connect it to the running app process on your phone.

 

 

Tap the red circle top left, to start recording and then interact with your app as normal. Logs should appear there.


Thomas
Forum|alt.badge.img+5
  • Member
  • 5 replies
  • February 15, 2022

Hi Nizza, thanks for the help! I actually figured out the same and am now using Console.app (filter set to my app) to view the iOS logs and `adb shell logcat | grep Purchases` on Android.

It would be great if RevenueCat would also display the messages in the Javascript logs for React Native.

 


Andy
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 237 replies
  • February 15, 2022

@Sephyre Thanks so much for creating that guide!

 

I’m sorry that we still haven’t had a chance to update docs for this specific workflow. I’ve raised this up with the team, and I don’t have an ETA to give you but we’ll try to get it updated soon. 

 

Thanks again for bringing this into our attention in the first place and for the guide! 


Forum|alt.badge.img+2
  • Member
  • 9 replies
  • February 17, 2022

@Thomas thanks for sharing the Console.app tip, much easier than using the Instruments app :sweat_smile:


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings