ReactNative 0.60 集成到iOS原生的坑,持续更新

2019-08-26  本文已影响0人  peaktan
1、pod install报错
[!] CocoaPods could not find compatible versions for pod "React/Core":
  In Podfile:
    React/Core (from `../node_modules/react-native`)

None of your spec sources contain a spec satisfying the dependency: `React/Core (from `../node_modules/react-native`)`.

You have either:
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.

解决办法:https://github.com/facebook/react-native/blob/v0.60.0/template/ios/Podfile

2、podfile使用use_frameworks! 导致 #include <double-conversion/double-conversion.h>报错
❌/Users/james/src/tmp/AwesomeProject/ios/Pods/Folly/folly/Conv.h:38:10: 'double-conversion/double-conversion.h' file not found

解决办法:https://github.com/facebook/react-native/issues/25349,目前作者打算在0.61.0-rc.0中修复此问题,再此之前有两种解决办法

上一篇下一篇

猜你喜欢

热点阅读