ポッドを介してFirebaseのセットアップを実装しています。
私のポッドファイルは次のようになります。
# 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でアプリケーションを実行すると。ライブラリが見つからないことを示しています。
ld: library not found for -lGoogleToolboxForMac
clang: error: linker command failed with exit code 1 (use -v to see invocation)
私はすでにこのエラーを取り除くために2日を無駄にし、ネット上で見つけたすべてを試しました。またGoogleToolboxForMac
、Firebaseポッドがインストールされると、ライブラリが自動的にインストールされます。
ポッドファイルを次のコードに変更し、ポッドを再インストールします。GoogleToolboxForMacに必要なすべてのファイルをインストールしました。
# 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
ポッドをインストールした後
1)スキームを汎用iOSデバイスに変更してビルドします。
2)ビルドが成功すると、libGoogleToolboxForMac.aファイルが赤ではなく黒で表示されます。
3)次に、[デバイス]を選択し、iDeviceでビルドを実行します。スクリーンショットに従ってください。
または、ライブラリlibGoogleToolboxForMac.aをビルドすることもできます
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加