Cocoapods is installing old Pod version - ios

I'm using RxSwift and other Rx-pods in my app, according to my Podfile.lock I use RxSwift (3.2.0), but now I want to update the Pods to the latest versions.
So I remove the 4 Rx..-pods that I use from my Podfile, and run pod install, this removed the pods from the project and the Podfile.lock. The I re-add the 4 Rx..-pods and run pod instalagain. This installs RxSwift 2.6.1... Why? - I'm expecting it to install the newest stable version of RxSwift, something like 3.6.1..
I tried removing everything listed by: gem list --local | grep cocoapods and reinstalling cocoapods by running: gem install cocoapods
I also tried running pod repo update without success.
I also tried just running pod update, without uninstalling the Pods first, also same outcome.
I suspect this to be an issue with my cocoapods-gem, not The Rx-pods..
Edit added Podfile:
source 'https://github.com/CocoaPods/Specs.git'
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'MyApp' do
pod 'BrightFutures'
pod 'Alamofire'
pod 'MBProgressHUD'
pod 'Fabric'
pod 'Crashlytics'
pod 'Analytics', '~> 3.0'
pod 'SwiftyJSON'
pod 'Eureka', '~> 2.0.0-beta.1'
pod 'RxCocoa'
pod 'RxSwift'
pod 'INTULocationManager'
pod 'ReachabilitySwift', '~> 3'
pod 'RxSwiftExt'
pod 'RxMKMapView'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
Edit Added pod outdateddump:
Analyzing dependencies
The following pod updates are available:
- Alamofire 4.3.0 -> 4.5.0 (latest version 4.5.0)
- Analytics 3.5.7 -> 3.6.4 (latest version 3.6.4)
- BrightFutures 5.1.0 -> 5.2.0 (latest version 6.0.0-beta.1)
- Crashlytics 3.8.3 -> 3.8.5 (latest version 3.8.5)
- Eureka 2.0.0-beta.1 -> 2.0.1 (latest version 3.1.0)
- Fabric 1.6.11 -> 1.6.12 (latest version 1.6.12)
- Result 3.1.0 -> 3.2.3 (latest version 3.2.3)
- RxCocoa 3.2.0 -> 3.6.1 (latest version 3.6.1)
- RxSwift 3.2.0 -> 3.6.1 (latest version 3.6.1)

You could try the following:
Clearing CocoaPods' cache:
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/" (while in your project's dir)
Finally pod update
If you are using 0.38.0.beta1, you can just use pod cache clean
Regenerate everything:
rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods; rm -rf ~/Library/Developer/Xcode/DerivedData/*
pod deintegrate; pod setup; pod install
Set the version
pod 'RxSwift', '~> 3.0' # last version is 3.6.1

The latest release of RxMKMapView needs RxCocoa 2.x.x. Apparently they need to update the Podspec, to allow RxCocoa 3.x.x. They did this in a commit, but it was never uploaded to cocoapods (or however that works). So I solved the problem by getting the pod from that commit. Because the pod RxCocoadidn’t have a minimum version requirement, cocoapods would just get latest version of RxCocoa that satisfied pod RxMKMapView, which was an old version (2.x.x). This was why I though something was wrong with my Cocoapod install, turns out it’s important to declare minimum versions of the wanted pods.. This solved the problem:
pod ‘RxCocoa’, ‘~> 3’
pod ‘RxSwift’, ‘~> 3’
pod ‘RxMKMapView’, :git => ‘https://github.com/RxSwiftCommunity/RxMKMapView.git', :commit => ‘6b86c6a’

Related

Unable to add iOS platform to Cordova project with cordova-plugin-firebasex

The firebasex Cordova plugin is driving me up the walls! My project has worked fine for months until I updated the cordova-plugin-firebasex from 11.0.3-cli to 14.1.0. This is the error I am getting now after running Cordova platform add ios:
Failed to install 'cordova-plugin-firebasex': Error: pod: Command failed with exit code 31
at ChildProcess.whenDone (/Users/mmhayes/Documents/MyQCWeb/MyQC_v6_7/node_modules/cordova-common/src/superspawn.js:136:25)
at ChildProcess.emit (node:events:390:28)
at maybeClose (node:internal/child_process:1064:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
My environment:
Cordova -v
11.0.0
Cordova platform ls
Installed platforms:
ios 6.2.0
Available platforms:
android ^10.1.1
browser ^6.0.0
electron ^3.0.0
osx ^6.0.0
Cordova plugin ls
cordova-plugin-firebase-analytics 6.1.0 "FirebaseAnalyticsPlugin"
cordova-plugin-firebase-dynamiclinks 6.1.3 "FirebaseDynamicLinksPlugin"
cordova-plugin-firebasex 14.1.0 "Google Firebase Plugin"
I believe the issue has something to do with the pod versions but I'm not sure. There isn't much on the web about the "exit code 31" error. What little there was, I tried their suggested solutions with no luck. This included running
Cordova clean
Cordova plugin rm cordova-plugin-firebasex
Cordova plugin add cordova-plugin-firebasex
pod repo update
sudo gem install cocoa pods
I know this goes without saying, but any help is much appreciated! I can provide more info about my environment if it would be helpful.
Edit 10/25 4:22PM
My project's Podfile:
source 'https://cdn.cocoapods.org/'
platform :ios, '11.0'
use_frameworks!
target 'My Quickcharge' do
project 'My Quickcharge.xcodeproj'
pod 'Firebase/Analytics', '~> 8.8.0'
pod 'Firebase/DynamicLinks', '~> 8.8.0'
pod 'Firebase/Core', '9.1.0'
pod 'Firebase/Auth', '9.1.0'
pod 'Firebase/Messaging', '9.1.0'
pod 'Firebase/Performance', '9.1.0'
pod 'Firebase/RemoteConfig', '9.1.0'
pod 'Firebase/InAppMessaging', '9.1.0'
pod 'FirebaseFirestore', :tag => '9.1.0', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git'
pod 'Firebase/Crashlytics', '9.1.0'
pod 'Firebase/Functions', '9.1.0'
pod 'Firebase/Installations', '9.1.0'
pod 'GoogleSignIn', '6.2.1'
pod 'GoogleTagManager', '7.4.1'
end
Also, when I try to run pod install --repo-update I get this error:
pod install --repo-update
Updating local specs repositories
CocoaPods 1.11.3 is available.
To update use: `gem install cocoapods`
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.11.3
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Firebase/DynamicLinks":
In Podfile:
Firebase/DynamicLinks (= 6.33.0)
None of your spec sources contain a spec satisfying the dependency: `Firebase/DynamicLinks (= 6.33.0)`.
You have either:
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
It is literally in the documentation of the plugin.
sudo gem install cocoapods-dependencies
cd platforms/ios/
pod dependencies
If you receive a build error such as this:
None of your spec sources contain a spec satisfying the dependencies: Firebase/Analytics (~> 6.1.0), Firebase/Analytics (= 6.1.0, ~> 6.1.0).
Make sure your local Cocoapods repo is up-to-date by running pod repo update then run pod install in /your_project/platforms/ios/.
https://github.com/dpa99c/cordova-plugin-firebasex#cocoapods

failed to pod install 'PayPal-iOS-SDK' , keep Installing CardIO (5.3.2)

When I update PayPal-iOS-SDK with Cocoapods(1.0.1),
cmd logs below, and it has been installing CardIO for a long time.
Never changing the state.
Analyzing dependencies
Downloading dependencies
Using AFNetworking (3.1.0)
Installing CardIO (5.3.2)
podfile like this (Thanks #AMAN77)
platform :ios, '7.0'
inhibit_all_warnings!
target 'IOS_CLIENT'
pod 'SDWebImage', '3.8'
pod 'MagicalRecord','2.3.0'
pod 'Masonry','0.6.4'
pod 'UMengAnalytics-NO-IDFA', '4.0.5'
pod 'AFNetworking','3.1.0'
pod 'MJRefresh','3.1.12'
pod 'PayPal-iOS-SDK'
I don't know how to figure it out. Any help will be appreciated!
If you want the PayPal SDK without CardIO (and it is over 100 Mb!), add the pod to your podfile as:
# Cocoapods v 1.1.1
pod 'PayPal-iOS-SDK/Core'
I have tested it successfully on my current project.

Cocoapods "pod update" installs old pods

I am trying to set up CI on Xcode Server by creating a bot for an iOS app. I use CocoaPods so I'm using the script below to install the pods:
export LANG=en_US.UTF-8
#!/bin/bash
cd "$XCS_SOURCE_DIR/{PROJECTNAME}"
if [ -e "Pods" ]
then
/usr/local/bin/pod update
else
/usr/local/bin/pod install
fi
The current version of CocoaPods 0.39.0 is installed on the server. When I run "pod update" on the server everything is alright and the newest pods are installed.
Using FBAudienceNetwork (4.7.0)
Using FBSDKCoreKit (4.8.0)
Using Fabric (1.6.1)
Using FyberSDK (8.1.2)
Using Google-Mobile-Ads-SDK (7.6.0)
Using GoogleAnalytics (3.14.0)
When I use the script above however something strange happens.
Installing FBAudienceNetwork (4.1.0)
Installing FBSDKCoreKit (4.4.0)
Installing Fabric (1.2.8)
Installing FyberSDK (7.2.4)
Installing Google-Mobile-Ads-SDK (7.3.1)
Installing GoogleAnalytics (3.13.0)
Anyone has any idea why old versions are installed with the script? I use OS X Server 5.0.15 and Xcode 7.2.
The podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, "8.0"
use_frameworks!
target "{PROJECTNAME}" do
inhibit_all_warnings!
pod 'AFNetworking'
pod 'Branch'
pod 'SwrveSDK'
pod 'RealmSwift'
pod 'MZTimerLabel'
pod 'pop'
pod 'Adjust'
pod 'JSQMessagesViewController'
pod 'Fabric'
pod 'Crashlytics'
pod 'GoogleAnalytics'
pod 'FBSDKCoreKit'
pod 'FyberSDK'
pod 'AdColony'
pod 'Google-Mobile-Ads-SDK'
pod 'ChartboostSDK'
pod 'FBAudienceNetwork'
pod 'VungleSDK-iOS'
end
target "{PROJECTNAME}Tests" do
inhibit_all_warnings!
pod 'AFNetworking'
pod 'Branch'
pod 'SwrveSDK'
pod 'RealmSwift'
pod 'MZTimerLabel'
pod 'pop'
pod 'Adjust'
pod 'JSQMessagesViewController'
pod 'Fabric'
pod 'Crashlytics'
pod 'GoogleAnalytics'
pod 'FBSDKCoreKit'
pod 'FyberSDK'
pod 'AdColony'
pod 'Google-Mobile-Ads-SDK'
pod 'ChartboostSDK'
pod 'FBAudienceNetwork'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
I've got it working now! I didn't know about the _xcsbuildd user which does the builds. I found more about this here: https://honzadvorsky.com/articles/2015-08-17-17-30-xcode_server_tutorials_3_prebuild__postbuild_scripts/
So after logging in as this user I saw the same problem in the terminal on the server. Old versions of the pods were downloaded. The master repository of CocoaPods has some error, so I did
rm -rf ~/.cocoapods/repos/master
Then I ran
pod setup --verbose
And the master repository with the Cocoapods specs was installed again. Now it works!
For those of you encountering this issue with newer libraries like:
Facebook login
'FBSDKLoginKit'
'FBSDKShareKit'
'FBSDKCoreKit'
you need to update your cocoapods to the latest version ( currently 1.2)
I did the following which worked:
(Warning Cocoapods seems to sit idling for ages but I guess its doing something. )
Follow the first two steps from #youritrg above in terminal:
rm -rf ~/.cocoapods/repos/master
pod setup --verbose
You should now have an refreshed installation.
I then updated by doing:
sudo gem install cocoapods
After installation the Facebook Cocoapods installed perfectly.
Running pod repo update fixed this error for me
For me uninstalling everything then removing the master repo worked
gem list --local | grep cocoapods
sudo gem uninstall cocoapods
sudo gem uninstall cocoapods-core
sudo gem uninstall cocoapods-deintegrate
sudo gem uninstall cocoapods-downloader
sudo gem uninstall cocoapods-plugins
sudo gem uninstall cocoapods-search
sudo gem uninstall cocoapods-stats
sudo gem uninstall cocoapods-trunk
sudo gem uninstall cocoapods-try
then
rm -rf ~/.cocoapods/repos/master
sudo gem install cocoapods
then
pod setup --verbose
Sorry for digging up an old thread, but I had a similar problem with Firebase/Admob not updating. I got the same error as others have mentioned above. I tried everything mentioned above, but for me, the only way I could get the pods to update correctly was to comment out the line
use_frameworks!
I know that this should be included as I am using Swift, but it seems to work fine now. If anyone has any thoughts on why, I would love to know what is going on!

`pod update` command doesn't update the installed pod

I'm using CocoaPods version 0.39.0 and I have 'TwitterKit' pod version 1.12.0 installed.
My Podfile doesn't specify any version for this pod...
pod 'ReactiveCocoa', '~> 2.5'
pod 'Fabric'
pod 'TwitterKit'
pod 'TwitterCore'
pod 'Mantle', '~> 2.0'
pod 'MTLManagedObjectAdapter', '~> 1.0.0.1'
pod 'NPReachability', '~> 0.2.0'
Now I want to update it to version 1.13.1 so I run pod update 'TwitterKit'. But it still says Using TwitterKit (1.12.0).
pod search TwitterKit tells me version 1.13.1 is available.
-> TwitterKit (1.13.1)
Increase user engagement and app growth.
pod 'TwitterKit', '~> 1.13.1'
- Homepage: https://fabric.io/kits/ios/twitterkit
- Source:
https://kit-downloads.fabric.io/ios/com.twitter.sdk.ios/1.13.1/com.twitter.sdk.ios-default.zip
- Versions: 1.13.1, 1.13.0, 1.12.1, 1.12.0, 1.11.4, 1.11.3, 1.11.2, 1.11.1,
1.11.0, 1.10.1, 1.10.0, 1.9.0, 1.8.1 [master repo]
Did I do something wrong???
It turns out it is a dependency issue. I have to do pod update 'TwitterCore' first, then do pod update 'TwitterKit' in order to update TwitterKit's version.
For the curious ones, here is the TwitterKit.podspec.json :)
updating one by one starting from TwitterCore didn't work for me. Solution was: comment Twitter pods in Podfile -> run pod install to remove those pods -> uncomment Twitter pods and run pod install again

Headers are not found after updating CocoaPods

I updated CocoaPods today (sudo gem install cocoapods). After performing pod install the project won't compile anymore. It seems that headers from the pod are not longer found by the project.
Did something change in the recent cocoa pods version(s)?
The following is my pod file:
source 'https://github.com/artsy/Specs.git'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
inhibit_all_warnings!
pod 'CocoaLumberjack'
pod 'RestKit', '~> 0.20.0'
pod 'RestKit/Testing'
pod 'NLTHTTPStubServer'
pod 'Appsee'
pod 'google-plus-ios-sdk', '1.7.0'
Fix is simple and the error tells what to do. Add this to the top of your Podfile:
source 'https://github.com/artsy/Specs.git'
source 'https://github.com/CocoaPods/Specs.git'
Here's the Github issue with more details - https://github.com/CocoaPods/CocoaPods/issues/2515
Update
Make sure you create the Podfile in the root of your Xcode project directory. Here's what your Podfile should look like -
source 'https://github.com/artsy/Specs.git'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
inhibit_all_warnings!
# Pods
pod 'RestKit', :head
pod 'RestKit/Testing', :head
pod 'CocoaLumberjack', :head
pod 'NLTHTTPStubServer', :head
pod 'Appsee', '~> 2.1'
pod 'google-plus-ios-sdk', '~> 1.7.0'
In your terminal -
Update RubyGems - sudo gem update
Update Cocoa Pods - sudo gem install cocoapods
In your project directory -
Remove pods - rm -rf Pods/
Install pods - pod install
I was in the same position as you, and finally decided to roll back the CocoaPods version I had installed (which solved my problem)
Luckily my Podfile.lock file was under version control, so I pulled up the file to see what the last version of Cocoapods I had used. The last line of my Podfile.lock was:
COCOAPODS: 0.33.1
So here is how I solved my issue
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 0.33.1
rm -rf Pods
pod install

Resources