[英]Unable to install Firebase into my Xcode project via cocoapods
我正在嘗試通過Cocoapods 1.1.1將Firebase導入我的Xcode文件。 我的pod文件看起來像這樣。
# 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
我也試過了。
# 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
之后,我在終端中輸入了pod install,這就是我得到的。
Analyzing dependencies [!] Unable to find a specification for `FirebaseAnalytics (= 3.6.0)` depended upon by `Firebase/Core`
這是我做錯了還是Firebase本身有錯誤? 如果是我,如果有人可以幫助我解決這個問題,我將不勝感激。
您應該在target 'Firebase LoginTests' do
之前添加這些Pod,否則,您將只將它們包括在您的測試目標中。
您的podfiel應該看起來像這樣
# 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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.