I followed this expo doc on installing multiple app variants on my device, and it works; a separate app is made with a different name.
However, when I run expo start
, the QR code generated opens my production app rather than my dev app.
After messing around with the configs for many days, I realised that the scheme (exp+sotravelapp
) in the url generated (exp+sotravelapp://expo-development-client/?url=http%3A%2F%2F<IP ADDRESS>
) can be modified by modifying the slug
field in the app.config.js
file (and subsequently deleting the ios folder (or just Info.plist) and re-building the app).
So this was my workaround:
slug: IS_DEV ? "sotravelapp-dev" : "sotravelapp",
I set my dev variant to have a different slug as well, then re-builded the app with expo run
. Now, when running expo start
, I include the --scheme exp+sotravelapp-dev
option so that the url generated becomes exp+sotravelapp-dev://expo-development-client/?url=http%3A%2F%2F<IP ADDRESS>
and the correct app is opened when scanning the QR code.
However, this conflicts with EAS build, as the slug is tagged to each EAS project, so I got this error:
Project config: Slug for project identified by "extra.eas.projectId" (sotravelapp) does not match the "slug" field (sotravelapp-dev).
How can I get this to work even with builds generated with EAS build? What’s the recommended method? Why isn’t this documented?
Thanks.