簡體   English   中英

Firebase SDK Pod安裝鏈接器錯誤

[英]Firebase SDK pod installation linker error

我想在我的Swift項目中實現Firebase SDK。 我按照說明進行操作並安裝了pod,並按如下所示創建了Podfile:

platform :ios, '7.0'
target 'MyApp' do
pod 'Firebase'
project '/Users/MyName/Desktop/MyApp/MyApp.xcodeproj'
end

然后,當我install pods ,它將在終端中顯示以下內容:

Analyzing dependencies
Downloading dependencies
Using Firebase (3.9.0)
Using FirebaseAnalytics (3.5.1)
Using FirebaseCore (3.4.4)
Using FirebaseInstanceID (1.0.8)
Using GoogleInterchangeUtilities (1.2.2)
Using GoogleSymbolUtilities (1.1.2)
Using GoogleToolboxForMac (2.1.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 7 total pods installed.

因此,我認為它可以工作,但是在網上閱讀各種文章之后,顯然應該產生一個我應該代替xcodeproj使用的xcworkspace文件-對嗎? 如果是這樣,為什么還沒有生成呢? 我不明白怎么了。

可能也有相關的信息,我將所有位都添加到了xcodeproj文件中(在意識到我應該使用xcworkspace之前),以便在我的xcodeproj添加了pod,我添加了import Firebase header file ,Google服務信息, plist和import+ FIRApp.configure()在委托中,並在其他鏈接器中添加了$(inherited) ,當我嘗試使用模擬器時,它會提示錯誤:

Library not found for GoogleToolBoxForMac
Linker command code failed with exit code 1 (use -v to see invocation). 

如果初始安裝不正確,它怎么允許我執行所有這些操作? 那我從哪里去呢?

請問有什么問題可以幫我嗎? 我該如何解決這個問題? 或者至少我可以返回到第一步並平穩地撤消所有這些更改?

如果可能,請使用示例,我是新手。

如果其他人遇到此錯誤。 問題是我位於錯誤的目錄中,並試圖將Podfile與指向“ MyApp.xcodeproj”的目錄放置在一起。 這是不正確的,因為Podfile應該只在文件夾中。 最初,我無法找到此文件夾(即使它位於我的桌面上),因此我在終端機中使用了:

cd〜/ Desktop然后
cd〜/ Desktop / MyApp,然后進行pod init並編輯Podfile,然后安裝pod ...

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM