I am trying to import Firebase into my Xcode file via Cocoapods 1.1.1. My pod file looks something like this.
# Uncomment the next line to define a global platform for your project # platform :ios, '9.0' target 'Firebase Login' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! # Pods for Firebase Login pod 'Firebase', '~> 3.11' target 'Firebase LoginTests' do inherit! :search_paths pod 'Firebase' end target 'Firebase LoginUITests' do inherit! :search_paths # Pods for testing end end
I also tried this.
# Uncomment the next line to define a global platform for your project # platform :ios, '9.0' target 'Firebase Login' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! # Pods for Firebase Login target 'Firebase LoginTests' do inherit! :search_paths pod 'Firebase' end target 'Firebase LoginUITests' do inherit! :search_paths # Pods for testing end end
Afterwards, I typed pod install in my terminal and this is what I got.
Analyzing dependencies [!] Unable to find a specification for `FirebaseAnalytics (= 3.6.0)` depended upon by `Firebase/Core`
Is this something I have done wrong or is it a bug with Firebase itself? If it's me, I would appreciate it if someone can help me solve this problem.
You should add those pods before target 'Firebase LoginTests' do
Otherwise you will only include them your test target.
your podfiel should look 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'
pod 'Firebase/Auth'
pod 'Firebase/Database'
target 'AppName' do
inherit! :search_paths
# Pods for testing
end
target 'AppName' do
inherit! :search_paths
# Pods for testing
end
end
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.