13

I modified a repo on Github to integrate a swift version of my library.

https://github.com/iDevelopper/PBRevealViewController

However when in a new project I try to pod install I get the error:

[!] Unable to satisfy the following requirements:

  • PBRevealViewController/Swift (= 1.2.3) required by Podfile

None of your spec sources contain a spec satisfying the dependency: PBRevealViewController/Swift (= 1.2.3).

You have either: * out-of-date source repos which you can update with pod repo update or with pod install --repo-update. * mistyped the name or version. * not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, pod repo update does not happen on pod install by default.

Some helps are welcome!

Please see the Cocoapods issue:

https://github.com/CocoaPods/CocoaPods/issues/6970#event-1213956994

Patrick Bodet
  • 551
  • 2
  • 7
  • 17

4 Answers4

34

If you're using Macbook with M1(apple silicon)

Inside your ios Folder follow these commands in terminal

sudo arch -x86_64 gem install ffi

arch -x86_64 pod install

If this still don't fix your issue then run

 arch -x86_64 pod install --repo-update
Akaanksh K
  • 461
  • 4
  • 5
21

I am not familier this, but I also faced the same issue I followed the few steps

delete your podfile and regenerate your pod file once again use the following steps,

  • pod repo remove master

  • pod setup

  • pod install
Anbu.Karthik
  • 80,161
  • 21
  • 166
  • 138
12

You can try to delete Podfile.lock And then run pod update

PradeepKN
  • 527
  • 5
  • 10
0

Execute the following command in the terminal to fix it

rm -rf ~/.cocoapods/repos/master

Then ran

pod setup --verbose

And then updated by doing:

sudo gem install cocoapods
Paresh Mangukiya
  • 37,512
  • 17
  • 201
  • 182