简体   繁体   中英

CocoaPods could not find compatible versions for pod "PackageA"

I am new to Swift and iOS. I get the following error, when I run pod install

I tried every solution here could not find compatible versions for pod but none works. I always get the same error

CocoaPods could not find compatible versions for pod "PackageA":
  In snapshot (Podfile.lock):
    PackageA (= 2.3.0, ~> 2.3.0)

  In Podfile:
    PackageB (= 3.12.0) was resolved to 3.12.0, which depends on
      PackageA (~> 2.3.0)

None of your spec sources contain a spec satisfying the dependencies: `PackageA (= 2.3.0, ~> 2.3.0), PackageA (~> 2.3.0)`.

What does ~> mean?

What is a spec and where to edit it?

What does (= 2.3.0, ~> 2.3.0)

How does the snapshot and podfile work together?

What else can I try to fix my issue? Any workaround?

(I cannot post my entire file here because the packages are private and belong to a paid provider)

Delete Podfile.lock and then try

 pod repo update 

This will most probably fix your issue.

If this doesn't work you can do

 pod deintegrate
 pod install
 pod update

For other queries you can read the answer here and here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM