Is there a way to find the updated pod when we do pod update in post_install - cocoapods

when we run
pod update podname
Wanted to catch the pod/pods(or related targets) updated in post_install
Is this possible?

Related

Pod install taking a very long time

I'm running pod install on terminal for the first time and it's been taking a very long time (longer than 20 minutes). When i ran pod install --verbose it's getting stuck on this. Not sure if it should be taking this long, any ideas on how to fix it? enter image description here
// Podfile
use_frameworks!
source 'https://github.com/CocoaPods/Specs.git'
target 'UberEATS' do
pod 'GoogleMaps'
pod 'GooglePlaces'
pod 'SwiftyJSON', '~> 4.0'
pod 'Alamofire', '~> 4.7'
pod 'SDWebImage', '~> 4.0'
pod 'Fabric'
pod 'Crashlytics'
end
Delete source 'https://github.com/CocoaPods/Specs.git' from the Podfile.
Recent versions of CocoaPods use a much faster cdn as the default source location.

Cocapods -Can't Update pod ObjectMapper to version 3.3 error [!] Unknown command: `ObjectMapper,`

I just updated to Xcode 10.1 Swift version 4.2.1 and I have several build errors of:
Invalid redeclaration of '<~'
I followed this GitHub q&A and this one that says I need to update the ObjectMapper pod to version 3.3
I didn't see the ObjectMapper inside the regular Podfile however I saw it inside the Podfile.Lock and the version is - ObjectMapper (2.2.9)
I then went to terminal and tried all of these to update to 3.3 but none of them worked:
$ pod repo update
$ pod update
$ pod update ObjectMapper
$ pod 'ObjectMapper', '~> 3.3'
$ pod 'ObjectMapper', '3.3'
In terminal I keep getting:
Why do I keep getting this error?
Here is the regular podfile:
# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
target 'MyProject' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for MyProject
pod 'Stripe'
pod 'AFNetworking'
pod 'Alamofire'
pod 'SwiftyJSON'
pod 'SDWebImage'
pod 'Fabric'
pod 'Crashlytics'
pod 'KeychainSwift'
pod 'IQKeyboardManagerSwift'
pod 'DLRadioButton', '~> 1.4'
pod 'GoogleInterchangeUtilities'
pod 'GoogleNetworkingUtilities'
pod 'GoogleParsingUtilities'
pod 'GoogleSymbolUtilities'
pod 'GoogleUtilities'
pod 'Firebase'
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/DynamicLinks'
pod 'Firebase/Storage'
pod 'Firebase/Crash'
pod 'Firebase/Messaging'
pod 'FirebaseInstanceID', '3.2.0'
pod 'GeoFire', :git => 'https://github.com/firebase/geofire-objc.git'
pod 'GooglePlacesAPI'
pod ‘GoogleMaps’
pod 'GooglePlaces'
pod 'GooglePlacePicker'
pod 'ReachabilitySwift'
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.2'
end
end
end
end
I had to remove all the pods from my project then reinstall them.
First run the below code because you have to install the cocoapods-clean plugin to run pod clean.
$ sudo gem install cocoapods-clean
Second I copied all the pods from my podfile and placed them in a temporary different file then I ran the below 3 commands to remove all the pods:
$ pod deintegrate
$ pod clean
$ rm Podfile
After it was clean using the above 3 commands I then ran pod init to create a new Podfile, opened it, and pasted the saved pods from the temporary file. I also added the below ObjectMapper pod to the Podfile:
$ pod 'ObjectMapper'
Then I ran pod install to install everything
After everything was done I ran $ vim Podfile.lock and the ObjectMapper now had a version of:
- ObjectMapper (3.4.1)

Google/CloudMessaging' and Firebase/Messaging' fail with erro duplicate symbol

I am using Firebase in my project as well as Google sing-in.
For that I am using pod library.
pod 'SVProgressHUD'
pod 'SDWebImage'
pod 'AlamofireObjectMapper', '~> 4.0'
pod 'Google/SignIn'
pod 'IQKeyboardManagerSwift'
pod 'FBSDKLoginKit'
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'Firebase/Auth'
pod 'Google/CloudMessaging'
This are my pod which I am using in project.
Now I am remove pod 'Google/CloudMessaging' then app build successfully but GGLContext.sharedInstance().configureWithError(&configureError)
giving error like below
You have enabled the CloudMessaging service in Developer Console, but it appears as though your Podfile is missing the line: 'pod "Google/CloudMessaging" or you may need to run pod update in your project directory.
If I am adding pod "Google/CloudMessaging pod and then build project XCode fail with duplicate symbols.
How can I add two and also avoid this error.
It seems you cant use GCM and FCM at the same time as FCM is the new improved GCM and you're certainly going to run into those kind of errors. You can see that question addressed in this SO post

Cocospod how to ignore single pod when use pod update?

When we use pod update, cocospod will update all pod of podfile.Also we can use pod update frameworkname1 to update only frameworkname1.However, if i want to also dont update framework1,I have to use pod update framework2,framework3,framework4,...... Any way can do like pod update -ignore framework1 this?

How to update all but one pod

Is it possible to leave one pod untouched during pod install and pod update?
pod update <POD> is not an option.
You actually can use pod update [NAMES...] to update specific pods. You can see this in pod update --help

Resources