5

ポッド経由でfirebase設定を実装しています。ld:-lGoogleToolboxForMacのライブラリが見つかりません

My Podsファイルは次のようになります。

# Uncomment the next line to define a global platform for your project 
platform :ios, '8.0' 
# $(PROJECT_DIR)/build/Debug-iphoneos/GoogleToolboxForMac lib search path 
target 'ProductName' do 
    # Uncomment the next line if you're using Swift or would like to use dynamic frameworks 
    # use_frameworks! 

    # Pods for mCura 

pod 'Firebase/Core' 
pod 'Firebase/Messaging' 

end 

iPadシミュレータですべてが問題ありません。その実行中ですが、私はiDeviceでアプリケーションを実行します。ライブラリが見つかりません。私はすでにこのエラー&を除去するための2日間無駄にしている

ld: library not found for -lGoogleToolboxForMac 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

は、私はネット上で見つけることができるすべてのものを試してみました。 Firebase Podをインストールすると、GoogleToolboxForMacライブラリが自動的にインストールされます。

答えて

11

私のポッドファイルを次のコードに変更し、ポッドを再インストールします。 GoogleToolboxForMacに必要なすべてのファイルをインストールしました。ポッド

1をインストールした後

# Uncomment the next line to define a global platform for your project 
platform :ios, '9.0' 
target 'ProductName' do 

    # Uncomment the next line if you're using Swift or would like to use dynamic frameworks 
    # use_frameworks! 

pod 'Firebase/Core' 
pod 'Firebase/Messaging' 
pod 'GoogleToolboxForMac', '~> 2.1' 

end 

)の変更スキームジェネリックのiOSデバイスとビルドには。

2)ビルドが成功したら、libGoogleToolboxForMac.aファイルが赤色でなく黒色で表示されます。

3)デバイスを選択し、iDeviceでビルドを実行します。スクリーンショットに従ってください。

enter image description here

それとも、私もこの例外を得ていたlibGoogleToolboxForMac.a

+0

です。ありがとう! – chaunv

1

ビルドライブラリを持つことができます。

enter image description here

それはXcodeで/プラットフォーム/ iOS搭載フォルダを開くの代わりに、後に固定/platform/ios/MyApp.xcodeprojファイル。

関連する問題