Reputation: 297
Here is my Podfile:
source 'https://github.com/CocoaPods/Specs'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
target 'Unity-iPhone' do
pod 'Google-Mobile-Ads-SDK', '7.3.1'
pod 'Firebase/Core'
end
It works well when I run 'pod install'
output:
Analyzing dependencies
Downloading dependencies
Using Firebase (4.13.0)
Using FirebaseAnalytics (4.2.0)
Using FirebaseCore (4.0.20)
Using FirebaseInstanceID (2.0.10)
Using Google-Mobile-Ads-SDK (7.3.1)
Using GoogleToolboxForMac (2.1.4)
Using nanopb (0.3.901)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 7 total pods installed.
Perfect, everything is fine,But if I add a specific version with FirebaseCore,like below code:
pod 'Firebase/Core','4.0.20'
and 'pod install' again
output:
[!] CocoaPods could not find compatible versions for pod "Firebase/Core":
In Podfile:
Firebase/Core (= 4.0.20)
None of your spec sources contain a spec satisfying the dependency: `Firebase/Core (= 4.0.20)`.
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --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.
Actually,FirebaseCore with 4.0.20 is exist,So how should I fix it?
Upvotes: 2
Views: 8072
Reputation: 666
Run the following commands in your project/ios folder in the order:
pod update Firebase/Core
pod install --repo-update
Upvotes: 1
Reputation: 650
The podspec versioning for Firebase
and FirebaseCore
are separate, so you shouldn't use them interchangeably. The Firebase
pod is a parent for the subspecs Firebase/Core
, Firebase/Analytics
, etc., but FirebaseCore
is not using the same versioning because FirebaseCore
is not a subspec of Firebase
, whereas Firebase/Core
is.
For reference, the Firebase
podspec is here: https://github.com/CocoaPods/Specs/blob/980d013a857e7ef973531f1cf85ddb5b8a56d1b0/Specs/0/3/5/Firebase/5.10.0/Firebase.podspec.json
Upvotes: 1
Reputation: 297
I fixed it right now, just change Firebase/Core to FirebaseCore (I was checked FirebaseCore.podspec file in GitHub.)
Upvotes: 3