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'
Related
I want to use ‘Alamofire’, ‘~> 5.0.0-beta.1’via CocoaPods in my swift project.
I am getting the following error when after pod install in command line.
[!] CocoaPods could not find compatible versions for pod "Alamofire":
In Podfile:
Alamofire (= 5.0.0-beta.1)
AlamofireObjectMapper (= 6.0.0) was resolved to 6.0.0, which depends on
Alamofire (~> 5.0.0-beta.2)
Please help.
You can tried this the current stable version.
pod 'Alamofire', '~> 5.2'
But this version need Swift 5.1+
So you can use this version for Swift 4.2
pod 'Alamofire', '~> 4.7.3'
I would like to update my AFNetworking to version pod 'AFNetworking', '~> 4.0', but I am getting the following error.
[!] CocoaPods could not find compatible versions for pod "AFNetworking":
In Podfile:
AFNetworking (~> 4.0)
AFOAuth2Manager was resolved to 2.0.0, which depends on
AFNetworking (~> 2.2)
CocoaPods could not find compatible versions for pod "AFNetworking/NSURLConnection":
In Podfile:
AFOAuth2Manager was resolved to 2.2.0, which depends on
AFNetworking/NSURLConnection (~> 2.2)
None of your spec sources contain a spec satisfying the dependency: `AFNetworking/NSURLConnection (~> 2.2)`.
I am using pod version 1.8.4 and macOS 10.15.3 with xcode11.3.1.
Could you please help me on how to solve the issue
Had a similar problem, changing to
pod 'AFNetworking', '~> 4.0.1'
and removing an outdated dependency
# pod 'AFNetworking+RetryPolicy', '~>1.0.3'
was sufficient to solve this
I have fixed this issue with help from AFNetworking contributor
Please go through the following link
https://github.com/AFNetworking/AFNetworking/issues/4567#event-3368598218
I have updated my podfile like the follwing:
pod 'AFNetworking', :source => 'https://github.com/ElfSundae/CocoaPods-Specs.git'
pod 'AFOAuth2Manager','~> 3.0'
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)
My new project using swift 4.2 has below podFile:
pod 'Moya', '12.0.1'
pod 'SwiftyJSON', '4.0'
pod 'Moya-SwiftyJSONMapper'
Intalling using pod install --verbose shows error:
[!] CocoaPods could not find compatible versions for pod "Moya":
In Podfile:
Moya (= 12.0.1)
Moya-SwiftyJSONMapper was resolved to 1.0.0, which depends on
Moya-SwiftyJSONMapper/Core (= 1.0.0) was resolved to 1.0.0, which depends on
Moya (~> 6.0.0)
CocoaPods could not find compatible versions for pod "SwiftyJSON":
In Podfile:
Moya-SwiftyJSONMapper was resolved to 1.0.3, which depends on
Moya-SwiftyJSONMapper/Core (= 1.0.3) was resolved to 1.0.3, which depends on
SwiftyJSON (~> 2.3.2)
SwiftyJSON (= 4.0)
Your pod version are not compatible with each other, this Podfile won't work.
But you can fix it.
But you have to check what podspecs of your pods to do this:
Moya-SwiftyJSONMapper: latest version of this pod is "3.0.0", and it depends on Moya, version 10.x and any version of SwiftyJSON.
So your version 4.0 of SwiftyJSON will be ok.
But you've specified that you want to install Moya version 12.0.1, which is not one of the 10.x version, so it is incompatible.
So you have to get rid of version 12.0.1 requirement, to make it all work.
pod 'Moya', '~> 10.0'
or just
pod 'Moya'
And, I think it's better to have Podfile with no version specified before first pod install. And only after auto-resolved combination of pods is installed you should freeze version requirements.
I am trying to update my Swift project to Firebase's new SDK Version 4.0.0 using CocoaPods (as suggested by the documentation) but the updated SDK does not seem to be installing even when I follow the steps in the documentation.
Can anyone help my understand why this is not working and what I can do to update to the new Firebase SDK?
My Podfile
# Uncomment this line to define a global platform for your project
platform :ios, '9.2'
# Uncomment this line if you're using Swift
use_frameworks!
target 'myProject' do
pod 'Firebase'
pod 'Firebase/Auth'
pod 'Firebase/Core'
pod 'Firebase/Storage'
pod 'Firebase/Database'
pod 'Firebase/Crash'
pod 'Firebase/Messaging'
pod 'Alamofire', '~> 4.4'
end
When I run pod install I get this seemingly promising output (except that it is not version 4 as I think it should be):
Analyzing dependencies
Downloading dependencies
Using Alamofire (4.4.0)
Installing Firebase 3.17.0 (was 3.17.0)
Using FirebaseAnalytics (3.9.0)
Using FirebaseAuth (3.1.1)
Using FirebaseCore (3.6.0)
Using FirebaseCrash (1.1.6)
Using FirebaseDatabase (3.1.2)
Using FirebaseInstanceID (1.0.10)
Using FirebaseMessaging (1.2.3)
Using FirebaseStorage (1.1.0)
Using GTMSessionFetcher (1.1.9)
Using GoogleToolboxForMac (2.1.1)
Using Protobuf (3.3.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 8 dependencies from the Podfile and 13 total pods installed.
I can tell it isn't updating to the most recent SDK as well because the new firebase documentation does not match the functions that work in my project. My project is in Swift, so for example:
Works
FIRApp.configure()
Does not work (but is suggested by documentation)
FirebaseApp.configure()
I did try these solutions as well:
https://stackoverflow.com/a/38135857/4206520
https://stackoverflow.com/a/37365721/4206520
There was nothing wrong with your original Podfile ;) You are just confusing pod install with pod update — you were running the former but you should be using the latter instead. A brief overview to clear things up:
pod install. When you run pod install, it only resolves dependencies for pods that are not already listed in the Podfile.lock. For pods in Podfile.lock, it downloads the explicit version listed there, without checking if a newer version is available — I believe this (expected) behavior was causing your issue.
pod update. If you run pod update, CocoaPods will update every pod listed in your Podfile to the latest version possible. Of course, respecting the version restrictions declared in your Podfile, if any.
For more information, be sure to check the pod install vs. pod update guide as well.
I had a similar issue and was stuck at the following output even after running the run pod repo remove master and pod install and pod update:
Using AmazonAd (2.2.15)
Using Firebase (3.17.0)
Using FirebaseAnalytics (3.9.0)
Using FirebaseCore (3.6.0)
Using FirebaseInstanceID (1.0.10)
Using Google (3.1.0)
Using Google-Mobile-Ads-SDK (7.19.1)
Using GoogleToolboxForMac (2.1.1)
I kept seeing the note in the pod update command output:
[!] Google has been deprecated
So I deleted the Google from the podfile:
pod Google
Then I re-ran:
pod update
and Received:
Using AmazonAd (2.2.15)
Installing Firebase 4.3.0 (was 3.17.0)
Installing FirebaseAnalytics 4.0.4 (was 3.9.0)
Installing FirebaseCore 4.0.8 (was 3.6.0)
Installing FirebaseInstanceID 2.0.4 (was 1.0.10)
Installing Google-Mobile-Ads-SDK 7.24.1 (was 7.19.1)
Using GoogleToolboxForMac (2.1.1)
Installing nanopb (0.3.8)
I had the same problem and just fixed it by changing the pod subsec into the full name of the pods like this:
- pod 'Firebase/Core'
- pod 'Firebase/RemoteConfig'
+ pod 'FirebaseCore', '4.0.9'
+ pod 'FirebaseRemoteConfig', '2.0.3'
Rather weird that this confusion happened in the first place but at least this fixes it.
Similarly to how Alamofire in my original podfile states the version I would like, doing so for firebase made it update to version 4.0.0 and the appropriate firebase functions work now.
For example:
Change (for each):
pod 'Firebase/Auth'
To:
pod 'Firebase/Auth', '~> 4.0.0'
A full example of my new podfile and the output after running pod install is as follows.
Correct Podfile:
# Uncomment this line to define a global platform for your project
platform :ios, '9.2'
# Uncomment this line if you're using Swift
use_frameworks!
target 'myProject' do
pod 'Firebase', '~> 4.0.0'
pod 'Firebase/Auth', '~> 4.0.0'
pod 'Firebase/Core', '~> 4.0.0'
pod 'Firebase/Storage', '~> 4.0.0'
pod 'Firebase/Database', '~> 4.0.0'
pod 'Firebase/Crash', '~> 4.0.0'
pod 'Firebase/Messaging', '~> 4.0.0'
pod 'Alamofire', '~> 4.4'
end
Output
Analyzing dependencies
Downloading dependencies
Using Alamofire (4.4.0)
Using Firebase (4.0.0)
Using FirebaseAnalytics (4.0.0)
Using FirebaseAuth (4.0.0)
Using FirebaseCore (4.0.0)
Using FirebaseCrash (2.0.0)
Using FirebaseDatabase (4.0.0)
Using FirebaseInstanceID (2.0.0)
Using FirebaseMessaging (2.0.0)
Using FirebaseStorage (2.0.0)
Using GTMSessionFetcher (1.1.10)
Using GoogleToolboxForMac (2.1.1)
Using Protobuf (3.3.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 8 dependencies from the Podfile and 13 total pods installed
Podfile
platform :ios, '10.0'
# ignore all warnings from all pods
inhibit_all_warnings!
use_frameworks!
def pods
pod 'Firebase/Core'
end
Terminal
pod --version
1.3.1
pod update
CocoaPods 1.5.3 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.5.3
sudo gem install cocoapods
Password:
Fetching: cocoapods-core-1.5.3.gem (100%)
Successfully installed cocoapods-core-1.5.3
Fetching: cocoapods-deintegrate-1.0.2.gem (100%)
Successfully installed cocoapods-deintegrate-1.0.2
Fetching: cocoapods-downloader-1.2.1.gem (100%)
Successfully installed cocoapods-downloader-1.2.1
Fetching: molinillo-0.6.6.gem (100%)
Successfully installed molinillo-0.6.6
Fetching: cocoapods-1.5.3.gem (100%)
Successfully installed cocoapods-1.5.3
Parsing documentation for cocoapods-core-1.5.3
Installing ri documentation for cocoapods-core-1.5.3
Parsing documentation for cocoapods-deintegrate-1.0.2
Installing ri documentation for cocoapods-deintegrate-1.0.2
Parsing documentation for cocoapods-downloader-1.2.1
Installing ri documentation for cocoapods-downloader-1.2.1
Parsing documentation for molinillo-0.6.6
Installing ri documentation for molinillo-0.6.6
Parsing documentation for cocoapods-1.5.3
Installing ri documentation for cocoapods-1.5.3
Done installing documentation for cocoapods-core, cocoapods-deintegrate, cocoapods-downloader, molinillo, cocoapods after 8 seconds
5 gems installed
pod install
Installing Firebase (5.5.0)
Installing FirebaseAnalytics (5.1.0)
Installing FirebaseCore (5.1.0)
Installing FirebaseInstanceID (3.2.0)
Installing GoogleAppMeasurement (5.1.0)
Installing GoogleUtilities (5.2.2)
Installing nanopb (0.3.8)
I have the same problem with Ionic and Capacitor too, from this instruction:
https://firebase.google.com/docs/dynamic-links/custom-domains
look like you are missing the FirebaseDynamicLinkCustomDomains, you should update this to your ios project:
for example, if your url is:
encodedLink = https://yourtargetlink.com (you should encode it to this https%3A%2F%2Fyourtargetlink.com)
dynamiclink = https://yourfirebasedynamiclink.com/link/?link=${encodedLink}&apn=com.example&isi=1449448875&ibi=com.example
You should add this key to your ios project
// Info.plist
<dict>
<key>FirebaseDynamicLinksCustomDomains</key>
<array>
<string>https://yourtargetlink.com</string>
<string>https://yourfirebasedynamiclink.com/link</string>
</array>
</dict>