ReactNative 在Xcode 中注意事项。(重点)
来源:互联网 发布:数据库相关期刊 编辑:程序博客网 时间:2024/05/21 10:22
今天尝试打包及在真机上离线运行,还是出现『RCTRootView.h file not found』的问题,后来发现需要把 Building Setting 里的Header Search Paths属性的值 "${PODS_ROOT}/Headers/Public/React" - not-recursive 改为 recursive 就可以了,由于Pods里的React结构改变了,但配置没有改过来,所以出现找不到文件的问题。
在Seach Paths 中Header Search Paths配置
$(inherited) /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include $(SRCROOT)/../node_modules/react-native/React/**
官方文档更新不及时的坑啊!!!
另一个问题就是需要把js资源打包成离线的bundle。
react-native bundle --entry-file index.ios.js --bundle-output ./ios/main.jsbundle --platform ios --assets-dest ./ios --dev false
生成即可。
在Seach Paths 中Header Search Paths配置
$(inherited) /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include $(SRCROOT)/../node_modules/react-native/React/**
官方文档更新不及时的坑啊!!!
另一个问题就是需要把js资源打包成离线的bundle。
react-native bundle --entry-file index.ios.js --bundle-output ./ios/main.jsbundle --platform ios --assets-dest ./ios --dev false
生成即可。
0 0
- ReactNative 在Xcode 中注意事项。(重点)
- 如何在原有Xcode项目中集成ReactNative模块
- html中重点注意事项
- ReactNative之在iOS项目中手动加入ReactNative
- reactnative LayoutAnimation 在android中没效果
- (重点)多文件开发注意事项
- 6.做项目重点注意事项(原创)
- ReactNative(一)—— Android环境搭建以及注意事项
- xcode中ineligible devices的注意事项
- Xcode注意事项
- 在XCode中运用CPPUnit
- 在XCode中使用SVN
- 在xcode中调用unity3d
- 在XCode中使用SVN
- 在XCode中使用SVN
- 在XCode中使用SVN
- 在xcode中使用instruments
- 在XCode中使用SVN
- iOS开发知识总结(一)
- Vue.js系列之项目结构说明(2)
- 第五章 我的租房网
- wince使用微软雅黑字体
- 【Python】文件的读写
- ReactNative 在Xcode 中注意事项。(重点)
- 打印直角三角形
- jvm类加载机制
- 第一篇博客
- LintCode_2_尾部的零
- UVA-11388 GCD LCM
- 一天浓缩学习webpack经过
- Junit学习资料(转2)
- ORACLE多表关联UPDATE 语句