2016-07-07 77 views
5

我一直在嘗試將我的項目遷移到cocoapods。未找到Firebase框架

我覺得我幾乎沒有,但我被困在:

ld: framework not found Firebase for architecture x86_64 error: linker command failed with exit code 1 (use -v to see invocation)

我想用我的「app.xcworkspace」編制和項目如下:

project navigator

另外:

libraries

我試過開始其他項目和Firebase的作品,所以這是這個項目設置的問題......任何想法?

我podfile看起來是這樣的:

# Uncomment this line to define a global platform for your project 
# platform :ios, ‘8.0’ 

target 'Parti' do 
    # Comment this line if you're not using Swift and don't want to use dynamic frameworks 
    use_frameworks! 

    # Pods for Parti 

    pod 'Firebase' 
    pod 'Firebase/Storage' 
    pod 'Firebase/Auth' 
    pod 'Firebase/Database' 

    target 'PartiTests' do 
    inherit! :search_paths 
    # Pods for testing 
    end 

    target 'PartiUITests' do 
    inherit! :search_paths 
    # Pods for testing 
    end 

end 

這可能是相關的補充,Xcode的嘗試時錯誤發生在「鏈接/用戶/ MYNAME /庫/開發商/ Xcode中/ DerivedData /雜色gsdsljzobcnqjkgutfpjasgrsfck /構建/產品/調試-iphonesimulator/Parti.app /雜色」

回答

0

剛剛找到答案。似乎我有一箇舊的geofire版本,而新版本尚不能作爲Pod使用...

Github Issue link

謝謝您的回答傢伙。

2

我知道這聽起來很遠取,但:

  1. 清潔項目。產品展示 - >清潔
  2. 重啓XCode(並不總是需要)從項目文件夾
  3. 運行pod update & pod install

更新:Podfile應該更像:

use_frameworks! 

    target 'Parti' do 
     pod 'Firebase' 
     pod 'Firebase/Storage' 
     pod 'Firebase/Auth' 
     pod 'Firebase/Database' 
    end 

    target 'PartiUITests' do 
     pod 'Firebase' 
     pod 'Firebase/Storage' 
     pod 'Firebase/Auth' 
     pod 'Firebase/Database' 
    end 
+0

仍引發錯誤。 –

+0

試試這個Podfile並重復步驟3 – Idan

+2

'pod update && pod install'爲我工作,謝謝:) – GabLeRoux

0

一些提示:

  • 確保你的Podfile是正確的(你忘了取消註釋use_frameworks!線?您是否正確添加了吊艙?)

  • 您是否忘記運行「吊艙安裝」?

  • 您是否嘗試過清理項目和構建文件夾?

+0

嘗試了所說的一切,但清理了構建文件夾。剛剛做到了,沒有運氣。 –

1

請確保您在項目目標的標題搜索路徑,框架搜索路徑和庫搜索路徑中添加了$(繼承)。

還要確保在項目文件中的框架文件夾中(不在您的豆莢中,單擊項目導航器中的項目名稱),「libPods-YourProjectName.a」不是紅色。如果是,請刪除它並重新構建。

+0

剛剛做到了。沒解決:( –

1

加$ PROJECT_DIR /吊艙(使它遞歸)

到框架搜索路徑

不管出於什麼原因只幫我,也許你太