How to Update Version Pod Packages? - ios

This what I have now in my Pod file
platform :ios, '9.0'
use_frameworks!
target 'ListHue' do
pod 'RealmSwift'
pod 'SwipeCellKit'
pod 'ChameleonFramework/Swift', :git => 'https://github.com/ViccAlexander/Chameleon.git'
end
I want to update to this
platform :ios, '9.0'
use_frameworks!
target 'ListHue' do
pod 'RealmSwift'
pod 'SwipeCellKit','2.5.0'
pod 'ChameleonFramework/Swift', :git => 'https://github.com/ViccAlexander/Chameleon.git'
end
What is the command I need to run when I need to update my Pod package ?
pod update or pod install or both ?

Use pod install to install new pods in your project and pod update [PODNAME] (without the name if you want to update all the pods to the last version) only when you want to update pods to a newer version.
More information in this cocoapods guide.

Related

RxMoya downgrade Alamofire to 4.9.1, but i need to use Alamofire 5+

The main problem is am using currently Moya on my app, but I want to use some functions from "Moya/RxSwift" pod, the problem I am having is when i change the pod the Alamofire downgrades to 4.9.1 and produce a lot of error in the code, there is a way to edit the pod file to keep using Alamofire 5?
My PODS in the podfile:
# Uncomment this line to define a global platform for your project
# platform :ios, ’10.0’
platform :ios, '10.0'
use_frameworks!
inhibit_all_warnings!
def core_pods
#core
pod 'ZXingObjC'
pod 'Moya/RxSwift'
pod 'RxSwift'
pod 'RxCocoa'
pod 'RxViewModel'
pod 'XCGLogger', '~> 6.1.0'
pod 'SwiftyJSON'
pod 'CryptoSwift', :git => "https://github.com/krzyzanowskim/CryptoSwift", :branch => "master"
pod 'AFDateHelper'
#pod 'Fabric'
#pod 'Crashlytics'
end
def ui_pods
pod 'SVProgressHUD'
pod 'CropViewController'
pod 'lottie-ios'
end
examples of some errors i got on the code because of the downgrade:

pod not been updated, even though it shows an update available through 'pod outdated'

I'm trying to update my pods, I list the pods updates through
pod outdated
podfile ( Further more I have even tried to out 'Firebase/Auth', '6.3.1' in podfile to specify the version but no use ["-" used in place of app, NDA -_- ] )
# Uncomment the next line to define a global platform for your project
use_frameworks!
platform :ios, '9.0'
def extension_pod
# pod 'ReadabilityKit', '0.7.1'
pod 'SDWebImage', '~> 4.0'
pod 'Firebase'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'FirebaseUI/Database'
pod 'Firebase/Storage'
pod 'Firebase/Core'
end
target '-' do
extension_pod
pod 'LGSideMenuController'
pod 'Firebase/MLVision'
pod 'Firebase/MLVisionTextModel'
#pod 'FirebaseUI', '~> 5.0'
pod 'Firebase/Messaging'
pod 'TOCropViewController'
# [START google_pod]
pod 'GoogleSignIn', '4.1.2'
pod 'ARSLineProgress'
#pod 'TesseractOCRiOS', '4.0.0'
# [END google_pod]
pod 'TwitterKit'
pod 'DateTools'
pod 'Fabric'
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for -
target '-Tests' do
inherit! :search_paths
# Pods for testing
end
target '-UITests' do
inherit! :search_paths
# Pods for testing
end
target '-E' do
extension_pod
end
end
Commands that I have done so far to update my Firebase/Auth repo,
pod update 'Firebase'
pod update 'Firebase/Auth'
pod install --no-repo-update
pod repo update && pod update 'Firebase/Auth'
All of these show as follow, but does not update to the specific version shown by pod outdated, am I missing some command for update process to occur?
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There are 17 dependencies from the Podfile and 33 total pods installed.
Another dependency requires FirebaseAuth to be a lower version. See the Podfile.lock to get the details.
Note that you want to update the FirebaseAuth pod - not Firebase/Auth which is the Auth subspec in the Firebase pod.
It might be related to locking the GoogleSignIn pod to an old version.
Change platform :ios, '9.0' to platform :ios, '10.0'

How to update a Pod in iOS App Swift

I have a pod file as below -
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
source 'https://github.com/CocoaPods/Specs.git'
target 'OSLMobile' do
pod 'AFNetworking'
pod 'libPhoneNumber-iOS', '~> 0.8'
end
target 'OSLMobileTests' do
pod 'AFNetworking'
pod 'libPhoneNumber-iOS', '~> 0.8'
end
I want to update the library 'libPhoneNumber-iOS'. For this I am going in my project directory and typing
pod update libPhoneNumber-iOS.
But this is giving me the error -
[!] Unable to add a source with urlhttps://github.com/CocoaPods/Specs.gitnamed master.
You can try adding it manually in ~/.cocoapods/repos or via pod repo add.
Can some on please help me how can I update libPhoneNumber-iOS?
Other details - XCode 8.0, Swift 2.3
Thanks.
Run pod init
If you get [!] Existing Podfile found in Directory
Go to ~/.cocoapods/repos and run git clone https://github.com/CocoaPods/Specs.git master
Then run your
pod update libPhoneNumber-iOS
Reference
Go to ~/.cocoapods/repos and run
git clone https://github.com/CocoaPods/Specs.git master
Referenced from here
There is no need to specify source.
platform :ios, '8.0'
use_frameworks!
target 'OSLMobile' do
pod 'AFNetworking'
pod 'libPhoneNumber-iOS', '~> 0.8'
end
target 'OSLMobileTests' do
pod 'AFNetworking'
pod 'libPhoneNumber-iOS', '~> 0.8'
end
Also update your master repo before installing or updating the pods. You can update master repo with command in terminal.
pod repo update
iOS9:
# Uncomment this line to define a global platform for your project
# platform :ios, ‘9.0’
pod 'Alamofire'
pod 'libPhoneNumber-iOS', '~> 0.8'
target 'OSLMobile' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for OSLMobile
target 'OSLMobileTests' do
inherit! :search_paths
# Pods for testing
end
target 'OSLMobileUITests' do
inherit! :search_paths
# Pods for testing
end
end

Google-Mobile-Ads-SDK - CocoaPods won't download version 7.9.1

I've got a problem with CocoaPods and the dependency of 'Google-Mobile-Ads-SDK'.
If I run
'pod install'
with the entry
pod 'Google-Mobile-Ads-SDK'
it doesn't download the framework.
If I change it to the following:
pod 'Google-Mobile-Ads-SDK', '7.9.0'
it works.
All our computers got the same problem.
It seems that the version '7.9.1' has a bug.
EDIT:
Here is my Podfile:
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!
# here we can define globals pods that are used by all targets
def sharedPods
pod 'Mapbox-iOS-SDK'
pod 'CorePlot'
pod 'GoogleAnalytics'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'SDCAlertView'
pod 'Google-Mobile-Ads-SDK'
end
target 'serverapp' do
sharedPods
end
EDIT_2:

Cocoa Pods not updating inside of app

I have been assigned at work to update an app that hasn't been touched in a year and a half. The cocoa pods version is 0.22.
I am trying to update it to 0.35. I've run 'sudo gem update' and have .35, but when I run 'pod install' it just installs the old versions of all of the pods (i.e. AFNetworking 1.1.0).
Thanks
platform :ios, '6.0'
pod 'Facebook-iOS-SDK'
pod 'OpenCV'
pod 'RestKit'
pod 'QuickDialog'
pod 'ReactiveCocoa'
pod 'SVProgressHUD'
pod 'Mixpanel'
pod 'GVUserDefaults'
pod 'TTTAttributedLabel'
pod 'uservoice-iphone-sdk'
target :ShoeboxTests, :exclusive => true do
pod 'Kiwi', :head
end
I'm new to using cocoa pods so I'm not sure what to do with this file.
Your podfile specifies that you're targeting iOS 6, so it is possible that cocoapods is only giving you the highest version known to support iOS 6.
Try removing that line entirely, or changing it to:
platform :ios, '8.1'

Resources