Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update pods to Swift 3.0

Currently in the process of migrating to Swift 3.0. This is my first time doing anything like this and I am not entirely sure how to deal with the various pods I am using. For example I am using the pod SwiftDate: https://github.com/malcommac/SwiftDate. The Swift 3.0 branch isn't on the master so I assume running pod update won't pull the Swift 3.0 version. Am I correct in putting pod:

'SwiftDate', :git => 'https://github.com/malcommac/SwiftDate.git', :branch => 'feature/swift-3.0'

into my podfile and then running the update? Checking the github page seems this is the correct branch. Do branches only need to be specified like this when the Swift 3.0 version isn't on the master? Any tips and pointers on this would be greatly appreciated! Thanks!

like image 576
Kex Avatar asked Sep 21 '16 03:09

Kex


People also ask

How do I upgrade my pod?

Use pod install to install new pods in your project. Even if you already have a Podfile and ran pod install before; so even if you are just adding/removing pods to a project already using CocoaPods. Use pod update [PODNAME] only when you want to update pods to a newer version.

How do I update single pod Swift?

$ pod update When you run pod update SomePodName , CocoaPods will try to find an updated version of the pod SomePodName, without taking into account the version listed in Podfile. lock . It will update the pod to the latest version possible (as long as it matches the version restrictions in your Podfile).

What is POD install repo update?

cocoapods-repo-update is a CocoaPods plugin that checks your dependencies when you run pod install and updates the local specs repositories if needed.


1 Answers

First of all you need to update your CocaPod if you haven't done it.

Open terminal and run:

sudo gem install cocoapods --pre

Then add the update part to your pod:

pod 'SwiftDate', :git => 'https://github.com/malcommac/SwiftDate.git', :branch => 'feature/swift-3.0'

Then in terminal run pod update

like image 74
Rashwan L Avatar answered Oct 16 '22 23:10

Rashwan L