pod构建的ios版本引发 react-native-safe-area-context RN项目的pod-install构建异常

丰智
2023-12-01

RN 使用react navigation的案例时运行pod-install报错

Auto-linking React Native modules for target `Entry_task_ts`: RNScreens and react-native-safe-area-context
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
[!] CocoaPods could not find compatible versions for pod "react-native-safe-area-context":
  In Podfile:
    react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)

Specs satisfying the `react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)` dependency were found, but they required a higher minimum deployment target.
Couldn't install Pods. Updating the Pods project and trying again...

看问题描述好像是react-native-safe-area-context这个包应用的问题,我在node_modules已经安装了这个包但是一直报错。
通过一番查找,发现是podfile配置的ios版本太低,react-native-safe-area-context最低版本是支持ios11.0。
但是我构建的版本是ios10.0,修改版本之后就可以正常构建了

解决问题地址:

react-native-safe-area-context/issues/246

 类似资料: