Fonts are not working on IOS builds - Expo bug?

Hey,
I’ve been trying to add some custom fonts to my app and even though they seem to load fine on an Android APK and on the Expo Client, when building an iOS bundle with expo build:ios and installing the ipa on an iPhone, fonts aren’t loading.

I tried loading the fonts with useFonts and loadAsync, and once these didn’t work, I tried to use the official examples and even the new Google Fonts solution.
Neither of them worked.

Examples of snippets that didn’t work:

Loading the Inter Black font (snippet mostly copied from the Expo Docs)

    import { Inter_900Black } from '@expo-google-fonts/inter';
    const [fontsLoaded] = Font.useFonts({
        Inter_900Black
    })
    return fontsLoaded ? <View style={{flex: 1, alignContent: 'center', justifyContent: 'center'}}>
        <Text style={{fontFamily: 'Inter_900Black'}}>Inter_900Black</Text>
    </View> : <AppLoading/>;

I’ve also thought that my project was faulty, so I tried to do the above on a blank new project created with the Expo CLI.
Another thing I tried to do was to try out Expo Vector Icons which is also supposed to import ttf files into the project, so in the blank new project I did this (completely copied from the Expo docs)

import { Ionicons } from '@expo/vector-icons';

export default function App() {
  return (
    <View style={styles.container}>
      <Ionicons name="md-checkmark-circle" size={32} color="green" />
      <Text>Open up App.tsx to start working on your app!</Text>
      <StatusBar style="auto" />
    </View>
  );
}

And well, same result.
I will add that after opening the iOS project with XCode and building it from there - fonts loaded properly, the problem only seems to happen when building with expo build:ios

I’d really appreciate any help with this.
Thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.