I’m new to React Native, Expo, and RevenueCat so this is likely very basic but can’t find an answer to this anywhere. I’m following this guide.
I’m not familiar with the lingo yet but I’m pretty sure I’m using the “managed workflow” version of Expo. In terms of development and testing, the only setup I’m currently familiar with is Expo Go -- in other words, running “npm start” on my dev machine, opening Expo Go on my device and connecting, then updating/editing code. This is the only way I know how to write code for my app. Then when I’m ready for full testing on a device, I run an EAS build and download it to my device, but at this point I have absolutely no more visibility into the code, it’s a complete black box -- it’s just a standalone running app on my phone.
My understanding is that the RevenueCat modules do not work with Expo Go. If I try to include them I get a “Invariant Violation: Your JavaScript code tried to access a native module that doesn't exist
” error. First question is -- is this expected? I believe so but just want to confirm.
So assuming that’s correct, I assume I would need to disable/remove all such code when developing/testing with Expo Go. So now let’s say I want to actually add in the RevenueCat code and start developing with it. Do I understand correctly that I would have to add the code to my app, run a full development build using eas build --profile development
, and download it to my device in order to see the new RevenueCat SDK code running in the app?
I’m not sure how this could possibly work in practice. I would be adding the code completely “blind” without any ability to know whether it even runs without basic errors, then running a build which takes about half an hour, downloading it to my device, and then running it on the device as a standalone app with no development environment around it, no way of viewing logs, debugging, or anything like that. It can’t be that this is how folks are developing with RevenueCat & Expo, so I’m sure I’m missing some very basic development workflow here, but it’s not spelled out anywhere that I can find. Is there some other fundamental way to write and test code that I’m not aware of??
TL;DR How do you actually write new RevenueCat SDK code and test it in an Expo managed workflow app without having to rebuild and run the standalone app every time?