Bad start-up navigation with expo prebuild
Scr3nt opened this issue · comments
Which package manager are you using? (Yarn is recommended)
yarn
Summary
I use the authentication flow : https://docs.expo.dev/router/reference/authentication/
When I'm with Expo Go I don't have any problems browsing, if I'm logged in I go straight to the home page and if not I go to the login page.
But if I do npx expo prebuild
then I have a problem
If I'm logged in I go straight to the home page (no problems there)
But if I'm not logged in, I'll first briefly see the home page and then be redirected to the login page (see video to understand).
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-08-17.at.10.38.29.mp4
Minimal reproducible example
To reproduce you can run npx create-expo-app@latest --template tabs@49
then integrate the authentication system and then do an npx expo prebuild
.
nothing works for me either with expo prebuild
From what I have been discovering, it seems to first show your app/index.tsx
page before the page you want to show.
From what I have been discovering, it seems to first show your
app/index.tsx
page before the page you want to show.
Yes, that's it
The only solution I've found so far is to use a 1500ms setTimeout before masking the splashscreen to allow time for the redirection to take place
The problem is that this adds 1500ms to the app's startup time.