0

I'm having an issue: I built my app using expo eas, first time the app crashed, so I found that I need to wait for the font to load, so I've changed my app entry like this:

  const [appIsReady, setAppIsReady] = useState(false);

  let [fontsLoaded] = useFonts({
    Lato_100Thin,
    Lato_100Thin_Italic,
    Lato_300Light,
    Lato_300Light_Italic,
    Lato_400Regular,
    Lato_400Regular_Italic,
    Lato_700Bold,
    Lato_700Bold_Italic,
    Lato_900Black,
    Lato_900Black_Italic,
    Mermaid: require("./assets/fonts/Mermaid1001.ttf"),
  });

  useEffect(() => {

    async function prepare() {
      try {
        if (fontsLoaded) {
          await SplashScreen.hideAsync();
          setAppIsReady(true);
        }
      } catch (e) {
        console.warn(e);
      }
    }
    prepare();

    
  }, [fontsLoaded])

But now my app works well in expo go but inTestflight is stuck on splashcreen...

red
  • 1,529
  • 1
  • 12
  • 33
  • I found that useFonts in expo go became true, in Testflight stay false, so: - or the hooks are not working in Testflight - or the fonts are not working in Testflight – red Jul 28 '23 at 12:43
  • I tried to do as described here: https://stackoverflow.com/a/66094348/11368483 Still no luck, still stuck on splash screen – red Jul 28 '23 at 13:59

0 Answers0