简体   繁体   中英

CocoaPods install an old version of framework

CocoaPods - 1.1.1

My pod file looks like this:

target 'MyNewProject' do

pod 'XLPagerTabStrip', '~> 5.0'

pod 'AFNetworking', '~> 3.0'

end

use_frameworks!

XLPagerTabStrip library is installed with an old swift version and xcode propose me convert it up to 2.3 or 3.0. This issue is noticed with other swift libraries eg Reactive Cocoa

Thank you!

As mintioned in XLPagerTabStrip - Change Log :

6.0.0

Swift 3 support

So updating its pod to the latest version should let it supports Swift 3 by default.

You can add it as pod 'XLPagerTabStrip' without specifying the version number, which causes to get latest version (it's the default behavior if you are not specifying the version number).

Change: pod 'XLPagerTabStrip', '~> 5.0' to pod 'XLPagerTabStrip'

As mentioned, you should get version 6.0.0 (latest version).

Finally, your pod file should look like:

target 'MyNewProject' do

pod 'XLPagerTabStrip'

pod 'AFNetworking', '~> 3.0'

end

use_frameworks!

Recap : After making sure that the latest version of a library has been released to support -for example- Swift 3, install it without specifying the version number; Each time you'll update the podfile, it will automatically install the latest version of the pod.

For more information, you can check Podfile Syntax Reference .

Hope this helped.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM