説明:
アンドロイドでは、統合は成功しました。 ただし、iOSではpodfileに以下の行を追加した後
ポッド 'react-native-onesignal'、
:path => "../node_modules/react-native-onesignal/react-native-onesignal.podspec"、
:inhibit_warnings => true
ポッドのインストール後にこのエラーが発生します
[!] CocoaPodsは、ポッド「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
を実行する必要はありませんか? CIビルドツールの構成にはpod install
で十分でしょうか?
最も参考になるコメント
@cfmitrah
cd
を/ios
ディレクトリに入れて、pod repo update
を実行してみてください。それでも問題が解決しない場合は、Podfileを投稿してください