运行时
pod install
出现以下错误
[!] CocoaPods could not find compatible versions for pod "OneSignalXCFramework":
In Podfile:
onesignal_flutter (from `.symlinks/plugins/onesignal_flutter/ios`) was resolved to 3.2.7, which depends on
OneSignalXCFramework (= 3.9.1)
None of your spec sources contain a spec satisfying the dependency: `OneSignalXCFramework (= 3.9.1)`.
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.
尝试运行以下命令
cd ios/
pod repo update
rm -rf Podfile.lock Pods
pod install
如果您最近更新了 Onesignal 版本,您可能需要检查 pod 文件,以确保 onesignal 版本与您正在使用的版本的 Onesignal 文档中的内容一致。
pod 'OneSignalXCFramework', '>= 5.0.0', '< 6.0'
检查 PodFile 中上面的这一行并确保版本匹配。