有人try 使用本 map 标吗?我遵循以下步骤:
- npm安装react 本机-icons@latest——救命
- 在XCode中,在项目导航器中右键单击库➜ 将文件添加到[项目名称]
- 转到 node _模块➜ react 本机图标➜ ios和添加ReactNativeIcons.xcodeproj
- 添加LibReactNativeCons.a(从ReactNativeIcons.xcodeproj下的"产品"到项目的构建阶段)➜ 将二进制文件链接到库阶段
- 将要使用的字体文件添加到项目的复制包资源构建阶段(单击"+"并单击"添加其他…",然后从 node _modules/react native icons/ios/Libraries/FontAwesomeKit中 Select 字体文件).
我的密码
var React = require('react-native');
var Icon = require('FAKIconImage');
var { AppRegistry, StyleSheet, Text, View} = React;
class BringgersApp extends React.Component {
constructor(props) {
super(props);
}
render() {
return(
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to Bringgers!
</Text>
<Icon
name='ion|beer'
size={150}
color='#887700'
style={styles.beer} />
</View>
)
}
}
var styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});
React.AppRegistry.registerComponent('BringgersApp', function() { return BringgersApp });
我建立后,他说文件不存在...
Font file doesn't exist
我清理衍生数据并多次try 构建,但都不起作用.