I start working on an existing project and it uses Cocoapods as a dependency manager and this is my first time using it. After installation, I ran pod init
and then add dependencies one by one by hand and used pod install
to install them.
Now I have a problem with dependencies versions and I cannot change the project version. Is there a way that I can find out the project’s dependencies’ versions? and is there a way so I can automate CocoaPods installation so I don’t need to write them one by one?
There is no Pod file and also pod.framework files are red and transparent.
2
Answers
The client has forgotten to push the Podfile to the repository. I asked for the Podfile. After putting the file in my project directory I was able to build the app after running
pod install
in my terminal. For beginners, I suggest not putting Podfile in your .gitignore file.In your frameworks repo, see which versions are compatible with your version that you are working with. And then, in your
Podfile
implement the frameworks like this:Check ‘Get started’ at http://cocoapods.org
If you are using an older version of swift, it could be that the Framework you are using, uses the latest version of swift and that is why it is not working.
A tip for not installing one by one: