TvOS failed to find font
stdiodavid opened this issue · 2 comments
- Review the documentation: https://github.com/oblador/react-native-vector-icons
- Search for existing issues (including closed issues): https://github.com/oblador/react-native-vector-icons/issues
Environment
MacOS 14.3.1
Xcode 15.4
TvOS 17.5
Description
I created the project from https://github.com/react-native-tvos/react-native-tvos
yarn create react-native-app TestApp --template https://github.com/react-native-tvos/react-native-template-typescript-tv/tree/tv-release-0.74.0 --template-path template
And try to use the monorepo branch to handle the icon
npm install --save @react-native-vector-icons/common
npm install --save @react-native-vector-icons/fontawesome
npm install --save @react-native-vector-icons/fontawesome6
then cd ios && pod update
add code
import Icon from '@react-native-vector-icons/fontawesome';
......
<SafeAreaView style={backgroundStyle}>
<StatusBar
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
backgroundColor={backgroundStyle.backgroundColor}
/>
<ScrollView
contentInsetAdjustmentBehavior="automatic"
style={backgroundStyle}>
<Header />
<View
style={{
backgroundColor: isDarkMode ? Colors.black : Colors.white,
}}>
<Icon name="rocket" size={30} color="#900" />
</View>
</ScrollView>
</SafeAreaView>
......
run
npx expo run:ios --scheme TestApp-tvOS --device "Apple TV"
but something went wrong in console
[TestApp-tvOS] RNVI: failed to find font react-native-vector-icons/FontAwesome.ttf
PS: Tried replace fontawesome to fontawesome6 but get error
PS again: Tried main branch ,add Fonts and info.plist,but get error expofontloader error
[TestApp-tvOS] RNVI: failed to find font react-native-vector-icons/FontAwesome6_Regular.ttf
[TestApp-tvOS] RNVI: failed to find font react-native-vector-icons/FontAwesome6_Solid.ttf
[TestApp-tvOS] RNVI: failed to find font react-native-vector-icons/FontAwesome6_Brands.ttf
Reproducible Demo
Let us know how to reproduce the issue. Include a code sample, share a project, or share an app that reproduces the issue using https://snack.expo.io/. Please follow the guidelines for providing a MCVE: https://stackoverflow.com/help/mcve
I'm not sure how I missed this in all my testing, but the fonts weren't in the font packages!
Fixed in latest release