Right now, I am building a signed release .apk in Android Studio and sending my phone the .apk for install. It works, but…
I can’t figure out how the .env variables are supposed to work on a detached application. I’m using Windows for Android only right now - just to get one of them working to figure it all out.
I changed minor Android settings in app.json just to see if my changes get picked up. They do. I changed the androidStatusBar settings and I do see those changes.
My thought is that I can have an apk on my phone, run “exp publish” in Windows and restart the app on my phone to see those changes. Is that correct? Do I need to do something to reset the cache of the bundle? I feel like my phone wants to keep looking at the previous bundle (everything else is the same except for env variables values).
I do not change the version number of the bundle. Does that cause issues? I eventually will but I don’t need versioning to get it up and running.
The actual issue here is that I have a .env file, a .env.build.dev file, a .env.build.prod file and an env.production file. I have a script commands in the package.json that I am using to deploy:
"deploy:dev": "copy .env.build.DEV .env.production && exp publish --release-channel dev", "deploy:prod": "copy .env.build.PROD .env.production && exp publish"
I thought something might have been messed up with my .env files. So, I set all of the files to my prod env variables (AWS). I run exp publish and restart the app. None of my data exists, so I think it works (since I should be pointing at a different database). I log out of the app, close it, restart it, and I log in. I should be hitting the prod AWS environment. But I’m not. I log in to my dev AWS account but my data isn’t saving. So, I know something changed but I’m not pointing to prod.
Does the app.json detach scheme or adnroidExpoViewUrl matter?
I’ve even tried closing and restarting the app a couple of times and deleting the app data/cache on the phone.