I ran into a strange problem recently in an ExpoKit v27 project.
I started the app in debug mode with XCode on an iPhone 6 device, but the app is being run on production/release mode instead (process.env.NOV_ENV is 'production', and it’s running on JS code from exp publish rather than local code).
I’m able to run it on debug mode on iPhone simulator and Android.
Any idea what could be causing this? Were there any changes made in Expo v27 that could potentially cause this bug?
Hi, that’s odd. No, as far as I know, we didn’t change anything in SDK 27 which would change the way the project runs from a Debug Xcode scheme. You might try searching your ExpoKit dependency for #if DEBUG and breakpointing around there to see which path is getting hit. The DEBUG macro is defined by Xcode when your scheme is Debug.
Hi! I followed the steps you have here, and the app does not run successfully for me after a fresh yarn install. It does however run correctly when I ask Xcode to profile the application – which is switched around from what you’re reporting in your latest comment. Could you explain a bit more about what’s happening?
It seems like the .expo folder content (which was gitignored) must be included to reproduce it. I have cleared the .gitignore and committed the node_modules as well to help with reproducibility. Can you try the updated code again?
What’s basically happening on my machine is that app is running on production even when I select Debug mode on XCode unless i clear the .expo folder or shell-app-manifest.json.
If you still couldn’t reproduce it with the updated code, perhaps it’s some caching problem on my machine? I have already done yarn cache clean, rm -rf node_modules and restarted the OS, is there any other cache that I might need to clean?