描述:
在android中集成成功。 但是在 podfile 中添加以下行后在 iOS 中
pod 'react-native-onesignal',
:path => "../node_modules/react-native-onesignal/react-native-onesignal.podspec",
:inhibit_warnings => 真
安装 pod 后出现此错误
[!] CocoaPods 找不到 pod "OneSignal" 的兼容版本:
在 Podfile 中:
react-native-onesignal(来自../node_modules/react-native-onesignal/react-native-onesignal.podspec
)已解析为 3.2.12,这取决于
OneSignal (= 2.9.4)
您的规范来源都不包含满足依赖项的规范: OneSignal (= 2.9.4)
。
环境
重现问题的步骤:
1.npm install --save react-native-onesignal
还要别的吗:
(崩溃堆栈跟踪,以及此处的任何其他信息)
@cfmitrah请尝试将cd
放入/ios
目录并运行pod repo update
。
如果这不起作用,请发布您的 Podfile
因无响应关闭
对于任何同行的旅客,
-->> https://github.com/OneSignal/OneSignal-Flutter-SDK/issues/55#issuecomment -459369818
@Nightsd01 ,
我收到此错误:
[!] CocoaPods could not find compatible versions for pod "OneSignal":
In Podfile:
react-native-onesignal (from `../node_modules/react-native-onesignal`) was resolved to 3.4.2, which depends on
OneSignal (= 2.11.2)
/bin/bash failed with return code: 31
return code: 1
None of your spec sources contain a spec satisfying the dependency: `OneSignal (= 2.11.2)`.
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* 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.
当我在 Azure DevOps 中运行以下命令时:
cd ios && rm Podfile.lock && pod deintegrate && cd .. && rm -rf node_modules && rm package-lock.json && npm install && cd ios/ && pod install && pod repo update
这是不是太激进了? 我不需要运行rm Podfile.lock && pod deintegrate
吗? pod install
是否足以用于 CI 构建工具配置?
最有用的评论
@cfmitrah请尝试将
cd
放入/ios
目录并运行pod repo update
。如果这不起作用,请发布您的 Podfile