几个月的工作之后,我的React Native项目才停止构建。
我在Cocoapods(和Xcode)中收到此错误消息:
ios % pod update
Update all pods
Updating local specs repositories
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "React":
In Podfile:
RNDeviceInfo (from `../node_modules/react-native-device-info`) was resolved to 2.3.2, which depends on
React
react-native-onesignal (from `../node_modules/react-native-onesignal/react-native-onesignal.podspec`) was resolved to 3.5.0, which depends on
React (< 1.0.0, >= 0.13.0)
Specs satisfying the `React, React (< 1.0.0, >= 0.13.0)` dependency were found, but they required a higher minimum deployment target.
以下是我使用的版本:
% cat package.json | grep \"react\"
"react": "16.8.3",
% cat package.json | grep \"react-native\"
"react-native": "0.59.5",
% cat package.json | grep \"react-native-onesignal\"
"react-native-onesignal": "^3.5.0",
在Xcode中,对于我的NotificationServiceExtension(对于OneSignal),我的项目的部署目标是11.0和10.2。错误消息表明此部署目标现在应该更高,但是什么?
我的Podfile的重要部分如下:
ios % cat Podfile
# Uncomment the next line to define a global platform for your project
platform :ios, '10.3'
target 'NotificationServiceExtension' do
# Comment the next line if you don't want to use dynamic frameworks
# use_frameworks!
# Pods for NotificationServiceExtension
pod 'OneSignal', '>= 2.7.1', '< 3.0'
end
target 'myproject' do
# Comment the next line if you don't want to use dynamic frameworks
# use_frameworks!
pod 'OneSignal', '>= 2.7.1', '< 3.0'
我不确定如何解决此问题以及与之相关的问题,但是在上次iOS / Xcode更新后,这一切都出错了。