I am making a cocoapods. I am using pod lib create MyLibrary
to create a new cocoapods. After it's done, I added two files into MyLibrary/Pod/Classes/. And I commit and add a tag and then push to origin master. and the MyLibrary.podspec passed validation. So, I go into the Example folder which created when I do pod lib create MyLibrary
. and do a pod install
in the terminal. But I am getting error:
Analyzing dependencies
Fetching podspec for `MyLibrary` from `../`
[!] Unable to satisfy the following requirements:
- `MyLibrary (from `../`)` required by `Podfile`
The podspec settings are all correct, like this one s.source_files = 'Pod/Classes/*.{h,m}'
, and it passed the validation. So I think there is no problem with pod spec file. It seems the pod installation can't find the Pod folder. But it is right there.
I am new to this making cocoapods. So if there is anything that not clear, please let me know. I don't know what I am doing wrong here.
Podfile. lock is used to make sure that every members of the team has the same versions of pods installed on the project. This file is generated after you run the command: pod install. It gets updated when you run pod install or pod update.
The Podfile is located in the root of the Pods project. An easy way to open it is via "Open Quickly" (Shift Cmd O) typing Podfile.
I had the same problem and I have been able to solve it following this steps:
Commands:
$> sudo gem install cocoapods --pre
$> rm Podfile.lock
$> pod install
Maybe some are not necessary, but it worked for me (I think that the most important is to remove the Podfile.lock). I hope you can solve it too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With