skip to Main Content

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)

2

Answers


  1. 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

    Login or Signup to reply.
  2. Yes, Payhere required a higher deployment target. Uncomment the platform line in podfile (its located in the ios folder)
    and change like this

    platform :ios, '11.0'
    

    then try again. it’s should work.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search