React Native 0.50.0 集成遇到的问题

官方文档地址: Integration with Existing Apps - React Native
中文文档:React Native 中文网
React-Native 开源App项目:GitHub - ReactNativeNews/React-Native-Apps: Curated List of Open Source React Native Apps

安卓按着官方文档基本没有问题,主要记录iOS遇到的问题,文档没有写,主要靠在 issue 里面搜索

react-native init 方式创建项目遇到的问题

问题描述:react-navtive run-ios 卡在 Running script 'Install Third Party'

集成到已有iOS项目

问题描述 :‘fishhook/fishhook.h’ file not found

  • 在package.json scripts 中添加
    "fishhookinstall": "sed -i '' 's#<fishhook/fishhook.h>#\"fishhook.h\"#g' ./node_modules/react-native/Libraries/WebSocket/RCTReconnectingWebSocket.m",
  • 运行: npm run fishhookinstall
  • 返回 Podfile 目录 pod install

问题描述 :'RCTAnimation/RCTValueAnimatedNode.h' file not found

  • 在package.json scripts 中添加
    "nodeinstall": "sed -i '' 's\/#import <RCTAnimation\\/RCTValueAnimatedNode.h>\/#import \"RCTValueAnimatedNode.h\"\/' ./node_modules/react-native/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h",
  • 运行: npm run nodeinstall
  • 返回 Podfile 目录 pod install

问题描述:"_JSNoBytecodeFileFormatVersion", referenced from:

  • Add BatchedBridge React subspec in Podfile
  • 返回 Podfile 目录 pod install
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。