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.
Related
[!] CocoaPods could not find compatible versions for pod "Firebase/core":
In Podfile:
Firebase/core
None of your spec sources contain a spec satisfying the dependency: Firebase/core.
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.
[!] Automatically assigning platform iOS with version 14.3 on target Spacechat because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.
Please help as I need to finish this task fast.
My podfile:
#platform :ios, '9.0'
target 'Spacechat' do
use_frameworks!
pod 'Appirater'
#Firebase
pod 'Firebase/core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Analytics'
pod 'Firebase/Crashlytics'
end
From https://github.com/CocoaPods/CocoaPods/issues/10449:
Pod spec/subspec names are case-sensitive. It should be Firebase/Core.
Also, not required, but recommended:
Firebase/Core is no longer recommended usage. Instead, directly specify the needed Firebase libraries. See https://firebase.google.com/docs/ios/setup#available-pods.
So an even better solution is to delete the line since it is redundant with Firebase/Analytics
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'
I'm new to CocoaPods. I just created a Github project and was hoping to include it in my Pods. It's giving me an error:
[!] Unable to find a specification for 'Surge4Swift3Plus'.
I've tried:
pod repo remove master
pod setup
pod install --verbose
Here's my Podfile:
target 'MyApp' do
use_frameworks!
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'GeoFire', :git => 'https://github.com/firebase/geofire-objc.git'
pod 'Surge4Swift3Plus', :git => 'https://github.com/dmr07/Surge4Swift3Plus.git'
end
Do I need to do something special for the Github project?
I don't believe you can include just any git repository in your Podfile. CocoaPods needs to know what it is first. See the below link about making a cocoapod.
https://guides.cocoapods.org/making/making-a-cocoapod.html
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 is my podfile:
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
target 'Grabit' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Grabit
pod 'Firebase','>= 2.5.0'
I tried:
Correct podfile like above.
Open project by terminal
Clean and rebuild project.
I tried it many times but I still get the error:
no module such as Firebase
These are my version of Firebase:
Installing Firebase 3.5.2 (was 3.5.2)
Using FirebaseAnalytics (3.3.1)
Using FirebaseInstanceID (1.0.8)
Any help is appreciated.
Things to check when getting this message:
no module such as Firebase
Does your Podfile file have use frameworks!? should look something like
use_frameworks!
target 'Project' do
pod 'Firebase'
pod 'Firebase/Auth'
pod 'Firebase/Core'
pod 'Firebase/Database'
end
target 'Project' do
pod 'Firebase'
pod 'Firebase/Auth'
pod 'Firebase/Core'
pod 'Firebase/Database'
end
Notice that if you want the latest version of a pod, you don't need to specify the version
Do you open your project with MyProject.xcworkspace (white icon) file and not with MyProject.xcodeproj (blue icon)?
Close Xcode and run pod install or pod update. Then open the MyProject.xcworkspace and build the project
Try Cleaning up the Project.
So far this works for me. Also I notice you're missing the "end"
target 'yourProjectname' do
platform :ios, '9.3'
use_frameworks!
pod 'Firebase'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Storage'
end
This is working perfectly for me:
use_frameworks!
target 'Project' do
pod 'Firebase'
pod 'Firebase/Auth'
pod 'Firebase/Core'
pod 'Firebase/Database'
end
You don't need to set the version, by using just the name, you'll always get the latest version.
In Termin do pod install, then pod update.
Then completely clean your project with [CMD]+[ALT]+[SHIFT]+[K].
Then clean with [CMD]+[SHIFT]+[K].
Then close Xcode, start MyProject.xcworkspace (white icon) and build.
Delete Derived Data,Try Cleaning the Project and then Build, it will work then.