GeoFire on iOS with Firebase 5 - ios

The update from Firebase 4.x to Firebase 5.0.0 broke my GeoFire installation. I was installing GeoFire via "Podfile" like this:
pod 'GeoFire', :git => 'https://github.com/firebase/geofire-objc.git'
I now receive this error message:
[!] CocoaPods could not find compatible versions for pod
"Firebase/Database": In Podfile: Firebase/Database
GeoFire (from https://github.com/firebase/geofire-objc.git) was
resolved to 2.0.1, which depends on Firebase/Database (~> 4.0) Specs
satisfying the Firebase/Database, Firebase/Database (~> 4.0)
dependency were found, but they required a higher minimum deployment
target.
The deployment target in Podfile as well as in the Xcode project is iOS 11. So there really is no higher minimum deployment target.
Cloning the repo locally and changing the installation to
pod 'GeoFire', :path => '/Users/georg/Projekte/Repos/geofire-objc'
and raising the dependency to Firebase 5.0 does not seem to work either as I now receive the error message
[!] The 'Pods-poifinder' target has transitive dependencies that
include static frameworks: (FirebaseDatabase, FirebaseCore,
FirebaseAuth, FirebaseFirestore, FirebaseFunctions, and
FirebaseStorage)
Firebase has switched to source pods with v5.0.0 which might be an explanation for this.
My question is now: How do I get GeoFire to work with Firebase 5.0 in a Swift 4.1 project. Thanks!

Until this is fixed in the repository you can use this workaround:
Clone the repository locally
Edit your podfile and point to the local repository like this
pod 'GeoFire', :path => '/Users/hans/repos/geofire-objc'
In "GeoFire.podspec" in the local repository edit the dependency like this
s.ios.dependency 'Firebase/Database', '~> 5.0'
Add this line to "GeoFire.podspec":
s.static_framework = true
Run
pod update

Related

Installing GeoFire with cocoapods

I am currently trying to set up GeoFire with my Firebase project and have a podfile like this:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target '[Appname]' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for [Appname]
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'GeoFire', '~> 1.1'
end
However, running a pod install command gives this error:
[!] Unable to satisfy the following requirements:
Firebase (~> 2.1) required by GeoFire (1.1.0)
Specs satisfying the Firebase (~> 2.1) dependency were found, but they required a higher minimum deployment target.
I can't figure out how to get GeoFire installed. Isn't GeoFire compatible with the new Firebase?
Solution
pod 'GeoFire', :git => 'https://github.com/firebase/geofire-objc.git'

Using Google Places API with Alamofire 4.0 and iOS 10 and Swift 3

My project is currently built in Xcode 8 and in Swift 3 with Alamofire 4.0. I use CocoaPods to implement Alamofire.
My podfile is as follows:
# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
use_frameworks!
target 'WTB’ do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :tag => ’4.0.0’
pod 'SwiftyJSON', git: 'https://github.com/BaiduHiDeviOS/SwiftyJSON.git', branch: 'swift3'
pod 'GooglePlaces' #doesn't work when this line is added
pod 'ChameleonFramework'
end
I get the following error in the terminal when trying to install the googlePlaces pod:
- `Alamofire (from `https://github.com/Alamofire/Alamofire.git`, tag `4.0.0`)` required by `Podfile`
- `Alamofire (= 4.0.0)` required by `Podfile.lock`
- `Alamofire (~> 3.0)` required by `GooglePlaces (1.0.1)`
Google places works with previous versions of Alamofire (3.4.0) but i cant get it working with 4.0.0+.Am i doing something wrong here? is anyone else having the same problem/ found a fix?
UPDATE:
I have still no luck after clean pod install
Matthews-MBP:WTB matthewwyeth$ rm -Rf Pods; pod install
Analyzing dependencies
Pre-downloading: `Alamofire` from `https://github.com/Alamofire/Alamofire.git`, tag `4.0.0`
Pre-downloading: `SwiftyJSON` from `https://github.com/BaiduHiDeviOS/SwiftyJSON.git`, commit `de5dc3b1b421805769590d331178551bbb0e5733`
[!] Unable to satisfy the following requirements:
- `Alamofire (from `https://github.com/Alamofire/Alamofire.git`, tag `4.0.0`)` required by `Podfile`
- `Alamofire (= 4.0.0)` required by `Podfile.lock`
- `Alamofire (~> 3.0)` required by `GooglePlaces (1.0.1)`
[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
You should change the version of Google Places to 2.* in your pod file, this dependency requires Alamofire 4.0.
Google Places pod v2.* : https://cocoapods.org/?q=googleplaces
Actually the problem is when you write
pod 'GooglePlaces'
Inside the PodFile it's not bringing the right Pod but it still fetches the old GooglePlacesAPI Pod First just type pod search GooglePlaces inside terminal and it will fetch many results as the first one should be matched you will notice that it's gonna be THE OLD POD so .. You should update your pod repositories
pod update
And it takes time to finish even though you may not seeing any changes in the terminal but in Activity Monitor -> Network you can monitor it so Be patient until it finishes the update and after that just retype pod search GooglePlaces in terminal and it's gonna be the new one and then just run
pod install
Again and you're good to go !
*Here is my Podfile in case you need to take a look :
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target 'YOUR-PROJECT' do
pod 'GoogleMaps', '= 2.1.1'
pod 'GooglePlaces', '= 2.1.1'
pod 'Alamofire',
:git => 'https://github.com/Alamofire/Alamofire.git',
:branch => 'master'
end

Installing Firebase Storage & GeoFire with Pod - [Minimum development target error]

I am using Firebase and GeoFire in my Podfile. They are working fine. My Podfile.lock file shows versions as:
- Firebase (2.5.1)
- GeoFire (1.1.3):
- Firebase (~> 2.2)
- FirebaseOSX (~> 2.4)
Now I tried to add pod 'Firebase/Storage' in my Podfile and pod install
[!] Unable to satisfy the following requirements:
Firebase/Storage required by Podfile
Specs satisfying the Firebase/Storage dependency were found, but they required a higher minimum deployment target.
Then, I tried pod update Firebase; and now I received another error:
Firebase required by Podfile
Firebase (~> 2.2) required by GeoFire (1.1.3)
Specs satisfying the Firebase dependency were found, but they required a higher minimum deployment target.
Specs satisfying the Firebase (~> 2.2) dependency were found, but they required a higher minimum deployment target.
What should I do? How can I install Firebase Storage to my project?
My podfile:
platform :ios, "9.0"
use_frameworks!
target 'MyApp' do
pod 'Firebase'
pod 'GeoFire', '>= 1.1'
pod 'Firebase/Storage'
end
Edit:
I tried extracting GeoFire from podfile, updating Firebase and then installing Firebase/Storage. It succeed; however when I try re-installing GeoFire again, I receive errors:
When I try pod 'GeoFire', '~> 2.0' and pod install:
[!] Unable to satisfy the following requirements:
GeoFire (~> 2.0) required by Podfile
When I try pod 'GeoFire' and pod install:
[!] Unable to satisfy the following requirements:
Firebase required by Podfile
Firebase (= 3.2.1) required by Podfile.lock
Firebase (~> 2.1) required by GeoFire (1.1.0)

Firebase pod install - pod 'Firebase/Database' - Required a higher minimum deployment target

I am trying to install Firebase/Database like Firebase doc https://firebase.google.com/docs/ios/setup#available_pods but when I tried I got issue.
[!] Unable to satisfy the following requirements:
Firebase/Database required by Podfile
Specs satisfying the Firebase/Database dependency were found, but they required a higher minimum deployment target.
Required a higher minimum deployment target, how can I do this?
Thanks
Screenshot
This is how I fixed it.
Step 1
Install Regular Firebase - pod 'Firebase', '>= 2.5.1'
Step 2
Update - pod update
*At this point it will take a good couple minutes to update. You should see something like this.
Update all pods
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing Firebase 3.2.0 (was 3.2.0)
Using FirebaseAnalytics (3.2.0)
Installing FirebaseAuth (3.0.2)
Using FirebaseDatabase (3.0.1)
Using FirebaseInstanceID (1.0.6)
Using GoogleInterchangeUtilities (1.2.1)
Installing GoogleNetworkingUtilities (1.2.1)
Using GoogleSymbolUtilities (1.1.1)
Using GoogleUtilities (1.3.1)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 4 dependencies from the Podfile and 10
total pods installed.
Step 3
Now you should have Firebase 3. So you can add frameworks like such in your pod file then pod update
# 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 'xMarket' do
end
target 'xMarketTests' do
end
target 'xMarketUITests' do
end
pod 'Firebase', '>= 2.5.1'
pod ‘Firebase/Core’
pod ‘Firebase/Database’
pod ‘Firebase/Auth’
Good luck!
In your Podfile, change the line pod 'Firebase' to pod Firebase/Core and run pod update in the project folder.
With the new Firebase, there is no need for the first line.
From the migration guide:
Reference: Firebase.google migration guide
I got it working by first running pod repo update and then running pod install again.
Follow this steps:
pod repo remove master
pod setup
pod install
I had the same problem.My error below
[!] Unable to satisfy the following requirements:
- `Firebase/AdMob` required by `Podfile`
Specs satisfying the `Firebase/AdMob` dependency were found, but they required a higher minimum deployment target.
Targets->general->deployment target
Changed to 8.0
My project deployment target starts from ios 6 Since it developed in older xcode version.For new updation in xcode 8 I made the deployment target from ios 8It works from me.
After fix its working
Installing Firebase (4.0.2)
Installing FirebaseAnalytics (4.0.1)
Installing FirebaseCore (4.0.2)
Installing FirebaseInstanceID (2.0.0)
Installing Google-Mobile-Ads-SDK (7.20.0)
Installing GoogleToolboxForMac (2.1.1)
The latest Firebase will support from ios 8.
or you can update the Podfile
platform :ios, '9.0'
run 'pod update'
that wo
In my case, I had a similar error, running from jenkins. When I deleted the offending workspace and reran, all was well.
you can try to delete Podfile.lock

cocoa pods Dependency management

[!] Unable to satisfy the following requirements:
SDWebImage (= 3.7) required by DZNPhotoPickerController/Core (1.6.0)
AFNetworking (~> 3.0) required by Podfile
AFNetworking (~> 1.3.3) required by DZNPhotoPickerController (1.0.2)
PodFile
pod 'DZNPhotoPickerController'
pod 'ZXingObjC', '~> 3.0'
pod 'vfrReader','~>2.8.6'
pod 'Mantle'
pod 'PPSSignatureView'
pod 'AFNetworking','~>3.0'
pod 'JNKeychain'
pod 'SVProgressHUD'
pod 'ZipArchive'
I want to update AFNetworking.
Help me to solve this
To fix this you might need to
Fork the DZNPhotoPickerController repo and modify the dependency in
the Pod spec and then use your forked repo's git location in the pod
file. Not a great solution for the long term but works.
For instance, The Pod spec here should have the line#33 which is
ss.dependency 'AFNetworking'
should be changed to
ss.dependency 'AFNetworking', '~> 3.0'
in your forked repo.
Then use in your Pod file as below
pod 'DZNPhotoPickerController', :git => 'https://github.com/yourUsername/DZNPhotoPickerController.git'
Your forked repo is not guaranteed to work out of the box if the project relies on legacy dependency code, if any. In this particular case, if it uses any methods of AFNetworking that is removed in 3.0 it will not work.
To update a single AFNetworking pod,
pod update AFNetworking
with above code, cocoapods will find a latest updated pod version and update your pod.
To update your all pods you can use
pod update
this will update your all the pods.
The issue looks like 'DZNPhotoPickerController' has dependancy of ss.dependency 'AFNetworking', '~> 2.6.0' so when you are trying to update AFNetworking to version 3.0 it shows the wrong version error.
If you didn't check it recently the 'DZNPhotoPickerController' has also updated it's podspec to make AFNetworking to 3.0 so you should try pod update now it may fix your issue as both dependancy needs the same version
If the above and the fork 'DZNPhotoPickerController' in to newer one didn't work
Please remove the 'DZNPhotoPickerController' from the cocoapods
update the cocoapods by pod update
if it's successful add
the 'DZNPhotoPickerController' dependancy again in the cocoapods and
install that again it may solve your problem

Resources