firebase pod was installed less version than the latest version exists - ios

I try to install the latest version of Firebase pod. I know that the latest version of this pod is 4.1.1 from cocoa pods official site https://cocoapods.org/pods/Firebase
But when I call pod update command from iOS terminal, I see that this pod was installed as 3.17.0.
This is what I see in iOS terminal after pod update command execution:
Downloading dependencies
Using Alamofire (4.5.0)
Using Bolts (1.8.4)
Using Crashlytics (3.8.5)
Using Digits (3.0.2)
Using FBSDKCoreKit (4.26.0)
Using FBSDKLoginKit (4.26.0)
Using FBSDKMessengerShareKit (1.3.2)
Using FBSDKShareKit (4.26.0)
Using Fabric (1.6.12)
Using Firebase (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 FirebaseDynamicLinks (1.4.0)
Using FirebaseInstanceID (1.0.10)
Using FirebaseInvites (1.3.0)
Using FirebaseMessaging (1.2.3)
Using FirebaseStorage (1.1.0)
Using FirebaseUI (4.1.1)
Using GTMOAuth2 (1.1.4)
Using GTMSessionFetcher (1.1.11)
Using Google (3.1.0)
Using GoogleAPIClientForREST (1.3.0)
Using GoogleSignIn (4.0.2)
Using GoogleToolboxForMac (2.1.1)
Using IQKeyboardManagerSwift (4.0.13)
Using MBProgressHUD (1.0.0)
Using Protobuf (3.4.0)
Using SwiftyStoreKit (0.10.7)
Using TwitterCore (3.0.0)
Using TwitterKit (3.1.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 23 dependencies from the Podfile and 33 total pods installed.
This is content of my Podfile in project:
use_frameworks!
target 'PrayerDeck' do
pod 'Firebase'
pod 'Firebase/Auth'
pod 'Firebase/Crash'
pod 'FirebaseUI/Database'
pod 'Fabric'
pod 'Crashlytics'
pod 'Digits'
pod 'TwitterCore'
pod 'Firebase/Database'
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'IQKeyboardManagerSwift'
pod 'Firebase/Storage'
pod 'MBProgressHUD'
pod 'Google/SignIn'
pod 'Firebase/Invites'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'
pod 'FBSDKMessengerShareKit'
pod 'Alamofire', '~> 4.0'
pod 'TwitterKit'
pod 'SwiftyStoreKit'
end
target 'PrayerDeckTests' do
end
target 'PrayerDeckUITests' do
end
UPDATE:
When I try to update Podfile and set more specific version like this pod 'Firebase', '~> 4.0' I get next error in iOS terminal:
- `FirebaseAnalytics (= 4.0.3)` required by `Firebase/Core (4.1.1)`
- `FirebaseAnalytics (~> 3.2)` required by `Google/Core (3.0.3)`
- `GoogleSignIn (~> 3.0)` required by `Google/SignIn (2.0.4)`
- `GoogleSignIn (~> 4.0)` required by `FirebaseInvites (2.0.1)`
- `Firebase/Invites` required by `Podfile`

Your Podfile is using the deprecated 'Google/SignIn' which forces the Firebase 3.x dependencies.
Change it to
pod 'GoogleSignIn'

Related

CocoaPods could not find compatible versions for pod FirebaseCore In snapshot (Podfile.lock):

I am getting below error for command pod install, not resolved by this
[!] CocoaPods could not find compatible versions for pod "FirebaseCore":
In snapshot (Podfile.lock):
FirebaseCore (= 3.6.0, ~> 3.6)
In Podfile:
Firebase/Crashlytics was resolved to 6.15.0, which depends on
FirebaseCrashlytics (~> 4.0.0-beta.1) was resolved to 4.0.0-beta.1, which depends on
FirebaseCore (>= 6.3.2, ~> 6.3)
Google/Analytics was resolved to 3.1.0, which depends on
Google/Core (= 3.1.0) was resolved to 3.1.0, which depends on
FirebaseAnalytics (~> 3.2) was resolved to 3.9.0, which depends on
FirebaseCore (~> 3.6)
Here is my Podfile,
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
target 'MyProject' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
pod 'FBSDKCoreKit', '~>5.15.1'
pod 'FBSDKShareKit', '~>5.15.1'
pod 'FBSDKLoginKit', '~>5.15.1'
pod 'Google/Analytics'
pod 'GoogleMaps'
pod 'CocoaLumberjack'
pod 'Firebase/Crashlytics'
pod 'Firebase/Analytics'
target 'MyProjectTests' do
inherit! :search_paths
end
target 'MyProjectUITests' do
inherit! :search_paths
end
end
How can I resolve this issue?
You can understand why CocoaPods chooses which dependencies by examining the generated Podfile.lock file.
I suspect the issue is related to using the deprecated Google pod. Likely, you should use GoogleAnalytics without the slash instead.

CocoaPods not updating Firebase SDK to Version 4.0.0

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>

Duplicate interface definition of class Parse

I just updated my cocoa pods library and when I compile the project I am getting the error.
Duplicate interface definition of class Parse
Here is my Podfile
platform :ios, '7.0'
use_frameworks!
target 'Alfred' do
pod 'Stripe'
pod 'SDWebImage', '~>3.7'
pod 'Parse'
pod 'ParseFacebookUtils'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'CMMapLauncher'
pod 'Fabric'
pod 'Crashlytics'
pod 'SinchVerification', '0.9-beta1'
pod 'TWMessageBarManager'
pod 'MaterialControls', '~> 1.0.2'
pod 'PubNub/Fabric'
end
Any clue on this?
Update
This are the version of each library
Using Bolts (1.7.0)
Using CMMapLauncher (1.1.0)
Using CocoaLumberjack (2.2.0)
Using Crashlytics (3.7.0)
Using FBSDKCoreKit (4.10.1)
Using FBSDKLoginKit (4.10.1)
Using Fabric (1.6.7)
Using Facebook-iOS-SDK (3.24.4)
Using MaterialControls (1.0.2)
Using Parse (1.13.0)
Using ParseFacebookUtils (1.10.0)
Using PubNub (4.3.0)
Using SDWebImage (3.7.5)
Using SinchVerification (0.9-beta1)
Using Stripe (6.2.0)
Using TWMessageBarManager (1.8.1)
Ok I fixed it this way:
for objC
just remove use_frameworks! or comment it #use_frameworks!
then clean, build, and run..

Pod install not updating pods in XCWorkspace

My podfile has:
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'CoChat' do
pod 'Firebase', '>= 2.5.0'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'
pod 'AFNetworking', '~> 3.0'
#pod 'MobileDeepLinking-iOS'
end
I run pod install and get:
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Using AFNetworking (3.0.4)
Using Bolts (1.6.0)
Using FBSDKCoreKit (4.10.0)
Using FBSDKLoginKit (4.10.0)
Using FBSDKShareKit (4.10.0)
Using Firebase (2.5.1)
Installing FirebaseUI (0.3.2)
Installing Google (1.3.2)
Installing GoogleAppUtilities (1.0.0)
Installing GoogleAuthUtilities (1.0.1)
Installing GoogleInterchangeUtilities (1.1.0)
Installing GoogleNetworkingUtilities (1.0.0)
Installing GoogleSignIn (2.4.0)
Installing GoogleSymbolUtilities (1.0.3)
Installing GoogleUtilities (1.1.0)
[!] The 'Pods-CoChat' target has transitive dependencies that include static binaries: (/Users/Nathan/Library/Mobile Documents/com~apple~CloudDocs/Desktop/CoChat/Pods/Google/Libraries/libGGLCore.a and /Users/Nathan/Library/Mobile Documents/com~apple~CloudDocs/Desktop/CoChat/Pods/Google/Libraries/libGGLSignIn.a)
When you open the XCWorkspace, nothing has changed. The FirebaseUI pod/framework is not there. Not a clue why this isn't installing.
I'm facing the same problem. The problem is with FirebaseUI/Auth and Google Sign in.
Solution
comment out use_frameworks!
Use bridging headers files by creating
a cocoa touch file, remember to check the box for 'Create a bridging
header file' and then after creation only deleting the .m .h files
as you want the bridging header file. Manually call out the headers
files from there.
If you read the posts on https://github.com/firebase/FirebaseUI-iOS/issues?q=is%3Aissue+is%3Aclosed, some seem to have similar issue. One possible fix is to get the 0.2.6 version of FirebaseUI by including '~>0.2.6' beside the firebaseUI pod
Hope this helps and hopefully this bug is fixed.

Google Analytics v3 Pod with other Swift Pods

I'm developing an swift iOS app and at this "final" stage I'll add Google Analytics.
I'm following their Guide
But it failed at pod install command...
Error Log
Downloading dependencies
Using Alamofire (1.2.2)
Using Bolts (1.2.0)
Using CryptoSwift (0.0.10)
Using FBSDKCoreKit (4.2.0)
Using FBSDKLoginKit (4.2.0)
Using FBSDKShareKit (4.2.0)
Installing Google (1.0.7)
Installing GoogleAnalytics (3.13.0)
Using GoogleMaps (1.10.1)
Installing GoogleNetworkingUtilities (1.0.0)
Installing GoogleSymbolUtilities (1.0.0)
Installing GoogleUtilities (1.0.1)
Using ImageLoader (0.3.2)
Using SQLite.swift (0.1.0.pre)
Using SwiftyJSON (2.2.0)
[!] The 'Pods-<My-Project>' target has transitive dependencies that include static binaries: (<path-to-project-dir>/Pods/Google/Libraries/libGGLAnalytics.a, <path-to-project-dir>/iOS/Pods/Google/Libraries/libGGLCore.a, <path-to-project-dir>/iOS/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a, (...)
As stated in this tutorial, "pods written in Swift must be created as dynamic frameworks" (and that's why the use_frameworks! in the Podfile).
As it seems, this new Google Analytics pod is a static binary.
I tried to change the pod the same as this answer but the pod install command warned me that (obviously) [!] GoogleAnalytics-iOS-SDK has been deprecated in favor of GoogleAnalytics. And I'm not sure it's a good idea to add an already deprecated library to a new project instead of getting the right one to work.
My project has a target dependecy to iOS 8.0+ and the podfile is:
```
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target 'MyProject' do
pod 'Alamofire', '~> 1.2'
pod 'SwiftyJSON', '~> 2.2.0'
pod 'GoogleMaps'
pod 'ImageLoader', '~> 0.3.0'
pod 'SQLite.swift', git: 'https://github.com/stephencelis/SQLite.swift.git'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
pod 'CryptoSwift'
pod 'GoogleAnalytics', '~> 3.13'
end
target 'MyProjectTests' do
end
```
Is anyone having the same problem or know how to solve this using the v3 GA pod?
Replace the line
pod 'GoogleAnalytics-iOS-SDK', '~> 3.10'
in your Podfile with
pod 'GoogleAnalytics', '~> 3.13'
Clean project and run pod install again. The pod you're currently using is the one that is deprecated.

Resources