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'
Related
I'm needing to add Alamofire to my main iOS app and the iOS Today Extention. With Alamofire just being in my iOS app target, it works great! But now, I'm trying to add Alamofire to my today extention. This is my Podfile
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'The Main iOS App' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Canvas'
pod 'Firebase/Core’
pod 'Firebase/Messaging’
pod 'Alamofire', '~> 4.4'
# Pods for The Main iOS App
end
target 'Today' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Alamofire', '~> 4.4'
# Pods for Today
end
Whenever using pod install in terminal, I get this:
Analyzing dependencies
Downloading dependencies
Using Alamofire (4.5.0)
Using Canvas (0.1.2)
Using Firebase (4.0.3)
Using FirebaseAnalytics (4.0.2)
Using FirebaseCore (4.0.3)
Using FirebaseInstanceID (2.0.0)
Using FirebaseMessaging (2.0.0)
Using GoogleToolboxForMac (2.1.1)
Using Protobuf (3.3.0)
[!] The 'Pods-iFunnyVlogger' target has frameworks with conflicting names: alamofire.
How do I properly do this?
UPDATE - Still Not Working
Some information that you may need is that I'm on cocoapods version 1.2.0 and I've tried pod update, but I'm still getting that error
[!] The 'Pods-iFunnyVlogger' target has frameworks with conflicting
names: alamofire.
Try this
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
def other_pods
pod 'Canvas'
pod 'Firebase/Core’
pod 'Firebase/Messaging’
end
def shared_pods
pod 'Alamofire', '~> 4.4'
end
target 'The Main iOS App' do
shared_pods
other_pods
end
target 'Today' do
shared_pods
end
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
This seems like a super simple pod install, yet I'm getting this strange error. Just don't see what's wrong here.
Podfile
# platform :ios, '9.0'
target 'iLook-990' do
use_frameworks!
pod 'OAuthSwift', '~> 1.0.0'
end
Error message:
[!] Unable to satisfy the following requirements:
OAuthSwift (~> 1.0.0) required by Podfile
None of your spec sources contain a spec satisfying the dependency: OAuthSwift (~> 1.0.0).
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.
if that's the exact same text from the Podfile, you need to remove the # from the first line
platform :ios, '9.0'
target 'iLook-990' do
use_frameworks!
pod 'OAuthSwift', '~> 1.0.0'
end
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)
I'm trying to add Geofire to my iOS project that uses Google Firebase as a backend. When I add the Geofire pod and run pod update I get this message in terminal...
[!] Unable to satisfy the following requirements:
- `Firebase` required by `Podfile`
- `Firebase (~> 2.1)` required by `GeoFire (1.1.0)`
Specs satisfying the `Firebase, Firebase (~> 2.1)` dependency were found, but they required a higher minimum deployment target.
Here is what my Podfile looks like...
# 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 'HopUp' do
pod 'Firebase'
pod 'FirebaseAuth'
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Storage'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'GeoFire', '>= 1.1'
end
Any thoughts as to why this is happening?
All input is appreciated!
One of the solutions was to add the git source to your pod file like so:
pod 'GeoFire', :git => 'https://github.com/firebase/geofire-objc.git'
Also, check out this github issue if you have any more problems. This is how I got GeoFire to work with my project.
After they updated Firebase Geofire stopped working, new version of Geofire is coming soon but not known exactly when.
You can try installing an earlier version of Firebase but sooner or later youll have to rewrite quite a bit of code after updating to a new one.