RevenueCat-Ionic React-CocoaPods找不到Pod“ PurchasesHybridCommon”兼容的版本:

问题描述

我目前正在尝试使用Ionic React(电容器)实现RevenueCat SDK,并且在使用Ionic Appflow构建应用程序时遇到以下错误

[18:38:13]: ▸ [error] Error running update: Analyzing dependencies
[18:38:13]: ▸ Fetching podspec for `Capacitor` from `../../node_modules/@capacitor/ios`
[18:38:13]: ▸ Fetching podspec for `CapacitorCommunityHttp` from `../../node_modules/@capacitor-community/http`
[18:38:13]: ▸ Fetching podspec for `CapacitorCordova` from `../../node_modules/@capacitor/ios`
[18:38:13]: ▸ Fetching podspec for `CordovaPlugins` from `../capacitor-cordova-ios-plugins`
[18:38:13]: ▸ Fetching podspec for `CordovaPluginsstatic` from `../capacitor-cordova-ios-plugins`
[18:38:13]: ▸ [!] CocoaPods Could not find compatible versions for pod "PurchasesHybridCommon":
[18:38:13]: ▸ In Podfile:
[18:38:13]: ▸ CordovaPluginsstatic (from `../capacitor-cordova-ios-plugins`) was resolved to 2.4.0,which depends on
[18:38:13]: ▸ PurchasesHybridCommon (= 1.2.0)
[18:38:13]: ▸ None of your spec sources contain a spec satisfying the dependency: `PurchasesHybridCommon (= 1.2.0)`.
[18:38:13]: ▸ You have either:
[18:38:13]: ▸ * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
[18:38:13]: ▸ * mistyped the name or version.
[18:38:13]: ▸ * not added the source repo that hosts the Podspec to your Podfile.
[18:38:13]: ▸ Note: as of CocoaPods 1.0,`pod repo update` does not happen on `pod install` by default.
[18:38:13]: ▸ Sync finished in 3.219s

解决方法

@enc_life的评论对我有用(在Flutter应用程序上,不是React,但我想iOS部分的工作方式相同):

pod install --repo-update

此后,一切都变得很迷人。

我收到的错误消息是

[!] CocoaPods could not find compatible versions for pod "PurchasesHybridCommon":
    In Podfile:
        purchases_flutter (from `.symlinks/plugins/purchases_flutter/ios`) was
        resolved to 1.4.3,which depends on PurchasesHybridCommon (= 1.4.5)

None of your spec sources contain a spec satisfying the dependency: 
   `PurchasesHybridCommon (= 1.4.5)`.