I've installed Firebase/Analytics into an iOS Project yesterday (as I've done many times before) and today I wanted to add Firebase/Crashlytics and suddenly both of them don't work anymore.
I get the following error message:
[!] CocoaPods could not find compatible versions for pod "Firebase/Crashlytics":
In Podfile:
Firebase/Crashlytics (= 4.0.0)
There are other pods (e.g. GoogleMaps, Resolver, Alamofire, etc) which work fine. Just the Firebase/* stuff doesn't work.
If I remove the / and try to install FirebaseAnalytics and FirebaseCrashlytics it works (the pod install does at least) but then xCode tells me it cannot find the Firebase module.
Here is my pod env
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Stack
CocoaPods : 1.9.1
Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
RubyGems : 3.0.3
Host : Mac OS X 10.15.4 (19E287)
Xcode : ()
Git : git version 2.24.2 (Apple Git-127)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : cocoapods - git - https://github.com/CocoaPods/Specs.git # 8fd5e2704f3952940bbdb6fcc7dc6c138594e6ff
trunk - CDN - https://cdn.cocoapods.org/
Installation Source
Executable Path: /usr/local/bin/pod
Plugins
cocoapods-deintegrate : 1.0.4
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.1.0
cocoapods-trunk : 1.4.1
cocoapods-try : 1.2.0
Podfile
# workspace 'project.xcworkspace'
platform :ios, '11.0'
use_frameworks!
# Pods for project
pod 'Resolver', '1.1.2'
pod 'GoogleMaps', '3.8.0'
pod 'GooglePlaces', '3.8.0'
pod 'Alamofire', '5.0.0-rc.2'
pod 'AlamofireObjectMapper', '6.2'
pod 'AlamofireNetworkActivityLogger', '3.0'
pod 'Firebase/Crashlytics', '4.0.0'
pod 'Firebase/Analytics', '6.4.2'
target 'project' do
# any project specific pods
end
I'm at a bit of a loss here and any hints would be greatly appreciated.
Remove the slashes from Firebase/Crashlytics and Firebase/Analytics.
The slash indicates a subspec of the Firebase pod.
You could also leave the slash and specify the version of the last Firebase pod - 6.23.0.
It's because of version conflict.
use pod 'Firebase/Crashlytics' with slash and without version. (or newest version)
and run pod update Firebase/Crashlytics Firebase/Analytics
if you have other version conflict, run pod update Firebase/Crashlytics Firebase/Analytics GoogleXXX(s)
Related
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
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’
I am trying to install Alamofire 4.4 in my swift project with pod i am following the step from the given link (https://github.com/Alamofire/Alamofire)
but i am facing this issue:-
[!] Unable to satisfy the following requirements:
- `Alamofire (~> 4.4)` required by `Podfile`
None of your spec sources contain a spec satisfying the dependency: `Alamofire (~> 4.4)`.
You have either:
* out-of-date source repos which you can update with `pod repo update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
I have in in my System :
Mac os : 10.12.2
x_code version : 8.2.1
swift version : 3.0.2
pod File configuration :
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'testAlarmofireAndswiftyJson' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for testAlarmofireAndswiftyJson
pod 'Alamofire', '~> 4.4'
end
I am stucking here please help.
Execute the follwoing on your terminal
sudo gem install cocoapods --pre
Then change pod file configuration to '9.0' to '10.0'
platform :ios, '10.0'
target 'project_name' do
pod 'Alamofire', '~> 4.4'
end
After changing the podfile configuration open terminal and go to project path.
Then execute following
'pod install'
You need to add a source statement to your Podfile so CocoaPods knows where to search for the pods you're referencing. You likely want this at the top of your Podfile:
source 'https://github.com/CocoaPods/Specs.git'
CocoaPods 1.1.0+ is required to build Alamofire 4.0.0+.
To update CocoaPods you simply install the gem again
$ [sudo] gem install cocoapods
Or for a pre-release version
$ [sudo] gem install cocoapods --pre
And then try again
Podfile:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target '02-Weibo' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for 02-Weibo
pod 'Alamofire', '~> 4.4'
pod 'SnapKit', '~> 3.2.0'
end
bash command:
appledeMacBook-Pro:Weibo apple$ pod install
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (3.1.0)
Installing Alamofire (4.4.0)
Installing SDWebImage (4.0.0)
Installing SVProgressHUD (2.1.2)
Installing SnapKit (3.2.0)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use `Weibo.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There are 6 dependencies from the Podfile and 5 total pods installed.
[!] There are duplicate dependencies on `SnapKit` in `Podfile`:
- SnapKit (~> 3.2.0)
- SnapKit
you can try bash command :
appledeMacBook-Pro:Weibo apple$ pod update
Update all pods
Updating local specs repositories
CocoaPods 1.2.1 is available.
To update use: `sudo 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.2.1
Analyzing dependencies
Downloading dependencies
Using AFNetworking (3.1.0)
Using Alamofire (4.4.0)
Using SDWebImage (4.0.0)
Using SVProgressHUD (2.1.2)
Using SnapKit (3.2.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 5 dependencies from the Podfile and 5 total pods installed.
appledeMacBook-Pro:Weibo apple$
I am trying to update Firebase with Cocoapods to 3.0.2
On my first step I commented out the pod 'Firebase'
Then I added it back and ran pod install
Then it installed Firebase 2.5.1, so i ran pod update in order to get Firebase 3.0.2 as other questions on stack overflow imply.
But i always get this as a result:
So my question is what I have to do in order to get the update?
In my Podfile I have also uncommented the use_frameworks! But it didn't change anything.
I changed the Podfile to:
but still get an error message
According to Firebase documents, as of version 3.x the Firebase pod has separate subspecs for each API.
To include Firebase using CocoaPods, you should write the following into your Podfile:
pod 'Firebase/Core'
pod 'Firebase/Database'
Edit:
I failed to see that you didn't implement source 'https://github.com/CocoaPods/Specs.git' into your Podfile, by adding that line at the top of your Podfile it should work.
I tested this Podfile and it works perfectly:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
target 'MyTarget' do
pod 'Firebase/Core'
pod 'Firebase/Database'
end
If this isn't working for you, update to the latest CocoaPods and try again.
Upgrading from Firebase.com
CocoaPods
I remove the podfile.lock.
Then pod install.
this works for me
use pod search firebase
you can see:
-> Firebase (2.5.1)
The official iOS client library for Firebase.
pod 'Firebase', '~> 2.5.1'
- Homepage: https://www.firebase.com/
- Source: https://cdn.firebase.com/ObjC/Firebase.framework-2.5.1.zip
- Versions: 2.5.1, 2.5.0, 2.4.3, 2.4.2, 2.4.1.1, 2.4.1, 2.4.0, 2.3.3, 2.3.2,
2.3.1, 2.3.0, 2.2.2, 2.2.1, 2.2.0, 2.1.2, 2.1.1, 2.1.0, 2.0.3, 2.0.2, 2.0.1,
2.0.0, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.12, 1.1.11, 1.1.10, 1.1.9, 1.1.7,
1.1.6, 1.1.5, 1.1.4, 1.1.3, 1.1.2, 1.1.1, 1.1.0, 1.0.9, 1.0.7, 1.0.5, 1.0.0
[master repo]
so use:
pod 'Firebase', '~> 2.5.1'
Here is my podfile I use in the project:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
pod 'AFNetworking', '~> 2.0'
pod 'GoogleMaps'
pod 'MONActivityIndicatorView'
pod 'NYXImagesKit'
pod 'MagicalRecord'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'
pod 'Countly'
The problem is that cocoapods 0.39 is updating AFNetworking to version 2.5.4 which is wrong. The latest version is 2.6.3 Also facebook SDK updating to 4.4 (latest is 4.8) etc.
I tried to delete Pods folder and .lock file but doesn't help
Also tried to clean the cocoapods cache but didn't help:
MACMINI:myproject myusername$ pod cache clean --all
MACMINI:myproject myusername$ pod update
Update all pods
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (2.5.4)
Installing Bolts (1.2.0)
Installing Countly (15.06.01)
Installing FBSDKCoreKit (4.4.0)
Installing FBSDKLoginKit (4.4.0)
Installing FBSDKShareKit (4.4.0)
Installing GoogleMaps (1.10.1)
Installing MONActivityIndicatorView (0.0.3)
Installing MagicalRecord (2.3.0)
Installing NYXImagesKit (2.3)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use `myproject.xcworkspace` for this project from now on.
Sending stats
Sending stats
Pod installation complete! There are 9 dependencies from the Podfile and 10 total pods installed.
In my case, Neon wouldn't update for me. It turns out it was because of the deployment target.
Changed
platform :ios, '8.0'
to
platform :ios, '10.0'
And update worked normally.
One of the reasons CocoaPods won't pick up the latest version of the pod could be another dependency that required an earlier version.
For example, suppose the latest version of PodA is 2.6 and you have this in your Podfile:
pod 'PodA', '~> 2.0'
pod 'PodB'
Unbeknown to you, PodB has the following dependency:
"PodA": "~> 2.5.4"
When CocoaPods tries to satisfy the dependencies, it will reject version 2.6 of PodA because it fails to satisfy the stronger dependency constraint on PodB.
One way to troubleshoot this is to ask CocoaPods to print the internal dependency graph debugging information by setting the following environment variable prior to running "pod update"
export MOLINILLO_DEBUG=1
Installing latest cocoapods worked for me.
sudo gem install cocoapods
I tried a new pod and it get me the latest
Update all pods
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (2.6.3)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use `AfnetworkingPodFic.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
Try clearing the cache of Cocoapods
you can find how to from below
https://gist.github.com/mbinna/4202236
Hope it helps :)
$ pod update
in terminal type this command, call update all pod to new version
Clean the pods cache in below paths and do pod install again.
~/Library/Caches/CocoaPods/
~/.cocoapods/repos/ibm-cocoapods-specs
Removing and reinstalling of cocoapods solved the problem:
MACMINI:myproject myusername$ sudo rm -fr ~/.cocoapods/repos/master
Password:
MACMINI:myproject myusername$ pod setup
Setting up CocoaPods master repo
Setup completed
MACMINI:myproject myusername$ cd ~/myproject/
MACMINI:myproject myusername$ pod update
Update all pods
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing AFNetworking 2.6.3 (was 2.5.4)
Installing Bolts 1.5.0 (was 1.2.0)
Using Countly (15.06.01)
Installing FBSDKCoreKit 4.8.0 (was 4.4.0)
Installing FBSDKLoginKit 4.8.0 (was 4.4.0)
Installing FBSDKShareKit 4.8.0 (was 4.4.0)
Installing GoogleMaps 1.10.5 (was 1.10.1)
Using MONActivityIndicatorView (0.0.3)
Using MagicalRecord (2.3.0)
Using NYXImagesKit (2.3)
Generating Pods project
Integrating client project
Sending stats
Sending stats
Pod installation complete! There are 9 dependencies from the Podfile and 10 total pods installed.
Please update your CocoaPods like below:
myComputer:desiredFolder Test$ pod update