Cocoapods use_frameworks! question

I found out that the way to solve the problem in the library that I am using is to add use_frameworks! in podfile. When I run pod install on the terminal, I get the following error:

[!] Invalid Podfile file: undefined method `use_frameworks! 'for #.
Updating CocoaPods may fix the problem.

I use Cocoapods, so I do not understand this problem. This tag is needed for projects using swift, I use objective-c.

+6
source share
2 answers

It seems to me that the second part of this error message is:

Updating CocoaPods may fix the problem.

Is your problem. use_frameworks! was added in CocoaPods 0.36.0, which was recently released.

Use pod --version to find out what you are currently using. Assuming this is earlier than 0.36.0 , you need to update it with

 [sudo] gem install cocoapods 

This is exactly the same as you originally installed it.

+9
source

I had the same problem when trying to run pod install on my mac. Thus, any user is faced with this problem, which worked for me by changing the current version of ruby ​​using rvm .

On the console, use rvm list to find out which versions you installed: enter image description here

So the ruby ​​version that was running on my mac was ruby-2.1.2. I changed it with:

rvm use ruby-2.2.2
and ran pod install again and it worked.

+2
source

Source: https://habr.com/ru/post/984141/


All Articles