简体   繁体   English

XCODE:Pod更新

[英]XCODE : Pod Update

I am using reachability, SwiftJSON, crashlytics pod files in my projects which is baselined to iOS9. 我在基线为iOS9的项目中使用可达性,SwiftJSON,crashlytics pod文件。 currently I'm XCODE 7 to run my project. 目前,我使用XCODE 7来运行我的项目。 now i need to migrate my code to swift 3.0. 现在我需要将代码迁移到Swift 3.0。 My question is how to update the pod files. 我的问题是如何更新Pod文件。 Currently the versions of pod file is 2.3. 当前pod文件的版本是2.3。 How can i migrate it to 3.0. 我如何将其迁移到3.0。

If you haven't updated cocoapod itself, I recommend you to do a gem install cocoapods to get the latest version, working with Xcode 8.x 如果您尚未更新cocoapods本身,建议您使用Xcode 8.x进行gem install cocoapods以获得最新版本。

If your pods are not tagged with any version restriction like pod 'ReachabilitySwift', '~> 2' you just need to run pod update , otherwise you need to check yourself first which version you need/want for swift 3. 如果您的pod没有标记任何版本限制,例如pod 'ReachabilitySwift', '~> 2' ,则只需要运行pod update ,否则就需要先检查一下自己需要/想要使用swift 3的哪个版本。

For pod update : type pod update in terminal For migration of your project, open it up in Xcode 8+ and there will an option of automatic conversion. 对于pod更新:在终端中键入pod update要移植项目,请在Xcode 8+中将其打开,然后会有一个自动转换选项。 Check this one out if issues arises. 如果出现问题, 请检查此一项。

NOTE: Keep backup of your old project somewhere. 注意:将旧项目的备份保存在某个地方。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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