美文网首页
reactNative创建成功之后注意事项

reactNative创建成功之后注意事项

作者: 杨二哥 | 来源:发表于2018-08-05 11:44 被阅读13次

    1.用xcode打开项目时,需要先配置一些路径问题:

    (1)把 Building Setting 里的Header Search Paths属性的值 "${PODS_ROOT}/Headers/Public/React"  - not-recursive 改为 recursive 

    (2)在Seach Paths 中Header Search Paths配置

    $(inherited) /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include $(SRCROOT)/../node_modules/react-native/React/**

    (3)另一个问题就是需要把js资源打包成离线的bundle。

    react-native bundle --entry-file index.ios.js --bundle-output ./ios/main.jsbundle --platform ios --assets-dest ./ios --dev false

    生成即可。

    相关文章

      网友评论

          本文标题:reactNative创建成功之后注意事项

          本文链接:https://www.haomeiwen.com/subject/pecbvftx.html