0

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)

TSR
  • 17,242
  • 27
  • 93
  • 197

2 Answers2

1

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.

Mathulan
  • 196
  • 6
-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

Romit Kumar
  • 2,442
  • 6
  • 21
  • 34
  • This is part of the answer https://stackoverflow.com/questions/48638059/could-not-find-compatible-versions-for-pod which I mentioned in my question saying that I already tried everything. Can you suggest something else please ? – TSR Feb 02 '22 at 18:38
  • 1
    @TSR try reisntalling pod -> pod repo remove master -> pod setup -> pod install – Romit Kumar Feb 02 '22 at 18:43