RevenueCat - Ionic React - CocoaPods could not find compatible versions for pod "PurchasesHybridCommon":
Asked Answered
B

3

5

I'm currently trying to implement the RevenueCat SDK with Ionic React (Capacitor) and whilst building the app using Ionic Appflow I get the following error

[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
Berky answered 12/8, 2020 at 22:16 Comment(2)
Have you tried running pod install --repo-update?Neurocoele
Cheers, thought I wouldn't be able to run that due to being on Windows. But I managed to get around it by adding it to "scripts" "build" in package.json.. which made Ionic Appflow run it for me. Problem sorted:)Berky
B
14

The comment from @enc_life worked for me (on a Flutter app, not React, but I guess the iOS part works the same either way):

pod install --repo-update

After that everything worked like a charm.

The error message I had was

[!] 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)`.

Bronnie answered 11/12, 2020 at 20:27 Comment(3)
This did not work for me. :(Repetend
Maybe helpful for others: I needed to run a 'pod update' first. Afterwards the 'pod install' worked perfectly.Dolly
It worked for me in Flutter, since I ran pod update first. @Berky if it worked for you, would it be useful for others if you mark this answer as valid.Croatian
A
0

try to clean your podfile and reinstall; move to ios/App folder:

pod cache clean --all
rm -rf Podfile.lock
pod install
Annamaeannamaria answered 24/9, 2024 at 7:52 Comment(0)
D
0

For those of you that find this article, since this issue still happens, here is what I did to fix the issue. First, this did not work: pod install --repo-update

It just kept generating the error: CocoaPods could not find compatible versions for pod "PurchaseHybridCommon"

I reinstalled CocoaPods, updated the dependencies, and still no luck. This simple fix worked. Reinstall RevenueCat plugin. It will install the correct version of the PurchaseHybridCommon pod:

npm uninstall @revenuecat/purchases-capacitor
npx cap sync
npm install @revenuecat/purchases-capacitor@latest
npx cap sync
Demurrer answered 11/10, 2024 at 20:3 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.