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!
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.
$ 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).
cocoapods-repo-update is a CocoaPods plugin that checks your dependencies when you run pod install and updates the local specs repositories if needed.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With