[R/N] react-native-vector-icons 오류 해결

장동현·2021년 8월 8일
1

ReactNative

목록 보기
2/12
post-thumbnail

react-native-vector-icons

아이콘 페이지로 이동

  • ios 6.0 부터는 link를 이용한 수동적인 방법이 다음 R/N release 에서는 더 이상 지원하지 않는다고 나온다.

npx react-native link react-native-vector-icons

npx react-native unlink react-native-vector-icons

  • 결론적으로 열심히 구글링...

해결법

1. Podfile을 열고 코드 추가

cd ios && code Podfile && cd ..

pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

  • 8번째 줄에 추가

2. info.plist 열고 코드 추가

cmd + p >> info.plist 검색(프로젝트명 dir)

	<key>UIAppFonts</key>
	<array>
		<string>AntDesign.ttf</string>
		<string>Entypo.ttf</string>
		<string>EvilIcons.ttf</string>
		<string>Feather.ttf</string>
		<string>FontAwesome.ttf</string>
		<string>FontAwesome5_Brands.ttf</string>
		<string>FontAwesome5_Regular.ttf</string>
		<string>FontAwesome5_Solid.ttf</string>
		<string>Foundation.ttf</string>
		<string>Ionicons.ttf</string>
		<string>MaterialIcons.ttf</string>
		<string>MaterialCommunityIcons.ttf</string>
		<string>SimpleLineIcons.ttf</string>
		<string>Octicons.ttf</string>
		<string>Zocial.ttf</string>
	</array>
  • 맨마지막에 copy/paste 하기

3. yarn ios || npm run ios

  • 명령어 실행하면 잘된다!!!
profile
FE 개발자 장동현 입니다 😃

0개의 댓글