FirebaseとGoogleサインインSDKを既存のiOSプロジェクトに手動で統合すると、シンボルの重複エラーが発生します。
ここでの関連するSO質問は、Cocoapodsを使用しているため、役に立ちませんでした。
FirebaseおよびGoogleサインインで重複シンボルエラーが発生
私が年代順に行った手順:
ダウンロードしたFirebase SDK(3.11.0)からプロジェクトにコピーしてターゲットに追加したFirebase.hファイルとともにAnalytics、Auth、およびDatabaseフォルダーをコピーしました。
GoogleService-Info.plistをプロジェクトにコピーして、ターゲットに追加しました。
-ObjCフラグを他のリンカーフラグに追加しました。
ダウンロードしたGoogleサインインSDK(4.0.1)から必要なフレームワークとバンドルをプロジェクトにコピーして、ターゲットに追加しました。
必要なフレームワークとライブラリをリンクしました。
関連するプロジェクト構造は次のとおりです。
Firebase
Analytics
FirebaseAnalytics.framework
FirebaseCore.framework
FirebaseInstanceId.framework
GoogleInterchangeUtilities.framework
GoogleSymbolUtilities.framework
GoogleToolboxForMac.framework
Auth
FirebaseAuth.framework
GTMSessionFetcher.framework
GoogleSignIn
GoogleAppUtilities.framework
GoogleSignIn.bundle
GoogleSignIn.framework
GoogleSignInDependencies.framework
GoogleSymbolUtilities.framework (removed as Firebase Analytics already includes it)
エラーログは次のとおりです(一部省略):
Ld /Users/Ehtesham/Library/Developer/Xcode/DerivedData/AddressBookGoogleMaps-hbtfxxvykazaogbfqnnraeuywtdt/Build/Products/Debug-iphonesimulator/AddressBookGoogleMaps.app/AddressBookGoogleMaps normal x86_64
cd /Projects/iOS/AddressBookGoogleMaps
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.2.sdk -L/Users/Ehtesham/Library/Developer/Xcode/DerivedData/AddressBookGoogleMaps-hbtfxxvykazaogbfqnnraeuywtdt/Build/Products/Debug-iphonesimulator -F/Users/Ehtesham/Library/Developer/Xcode/DerivedData/AddressBookGoogleMaps-hbtfxxvykazaogbfqnnraeuywtdt/Build/Products/Debug-iphonesimulator -F/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Analytics -F/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth -F/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Database -F/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn -filelist /Users/Ehtesham/Library/Developer/Xcode/DerivedData/AddressBookGoogleMaps-hbtfxxvykazaogbfqnnraeuywtdt/Build/Intermediates/AddressBookGoogleMaps.build/Debug-iphonesimulator/AddressBookGoogleMaps.build/Objects-normal/x86_64/AddressBookGoogleMaps.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=8.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/Ehtesham/Library/Developer/Xcode/DerivedData/AddressBookGoogleMaps-hbtfxxvykazaogbfqnnraeuywtdt/Build/Intermediates/AddressBookGoogleMaps.build/Debug-iphonesimulator/AddressBookGoogleMaps.build/Objects-normal/x86_64/AddressBookGoogleMaps_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/Ehtesham/Library/Developer/Xcode/DerivedData/AddressBookGoogleMaps-hbtfxxvykazaogbfqnnraeuywtdt/Build/Intermediates/AddressBookGoogleMaps.build/Debug-iphonesimulator/AddressBookGoogleMaps.build/AddressBookGoogleMaps.app.xcent -framework GoogleToolboxForMac -framework FirebaseAuth -framework FirebaseAnalytics -framework GoogleSignInDependencies -framework SystemConfiguration -framework GoogleAppUtilities -framework GTMSessionFetcher -framework FirebaseCore -framework GoogleSignIn -framework SafariServices -framework GoogleSymbolUtilities -framework Accelerate -framework GoogleSymbolUtilities -framework GoogleInterchangeUtilities -framework FirebaseDatabase -framework FirebaseInstanceID -Xlinker -dependency_info -Xlinker /Users/Ehtesham/Library/Developer/Xcode/DerivedData/AddressBookGoogleMaps-hbtfxxvykazaogbfqnnraeuywtdt/Build/Intermediates/AddressBookGoogleMaps.build/Debug-iphonesimulator/AddressBookGoogleMaps.build/Objects-normal/x86_64/AddressBookGoogleMaps_dependency_info.dat -o /Users/Ehtesham/Library/Developer/Xcode/DerivedData/AddressBookGoogleMaps-hbtfxxvykazaogbfqnnraeuywtdt/Build/Products/Debug-iphonesimulator/AddressBookGoogleMaps.app/AddressBookGoogleMaps
duplicate symbol _OBJC_CLASS_$_GTMLogStandardFormatter in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Analytics/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogStandardFormatter in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Analytics/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_CLASS_$_GTMLogBasicFormatter in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Analytics/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogBasicFormatter in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Analytics/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_CLASS_$_GTMLogNoFilter in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Analytics/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogNoFilter in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Analytics/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_CLASS_$_GTMLogMininumLevelFilter in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Analytics/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogMininumLevelFilter in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Analytics/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_CLASS_$_GTMLogMaximumLevelFilter in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Analytics/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogMaximumLevelFilter in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Analytics/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_CLASS_$_GTMLogLevelFilter in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Analytics/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogLevelFilter in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Analytics/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_CLASS_$_GTMLogAllowedLevelFilter in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Analytics/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
........................................
........................................
duplicate symbol _OBJC_IVAR_$_GTMSessionFetcherService._cookieStorageMethod in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionFetcherService_c6b7326897506dd1305d6961fdc1ec8b.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionFetcherService_c6b7326897506dd1305d6961fdc1ec8b.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionFetcherService._retryEnabled in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionFetcherService_c6b7326897506dd1305d6961fdc1ec8b.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionFetcherService_c6b7326897506dd1305d6961fdc1ec8b.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._uploadGranularity in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._shouldInitiateOffsetQuery in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._lastChunkRequest in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._initialBodySent in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._fetcherInFlight in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._currentOffset in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._useBackgroundSessionOnChunkFetchers in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._recentChunkReponseHeaders in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._delegateCompletionHandler in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._chunkFetcher in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_CLASS_$_GTMSessionUploadFetcher in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_METACLASS_$_GTMSessionUploadFetcher in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._uploadDataProvider in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _kGTMSessionFetcherUploadLocationObtainedNotification in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._initialBodyLength in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._uploadFileLength in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._subdataGenerating in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._isSubdataGenerating in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _kGTMSessionUploadFetcherMaximumDemandBufferSize in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._chunkSize in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _kGTMSessionUploadFetcherStandardChunkSize in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._delegateCallbackQueue in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._uploadMIMEType in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._uploadFileHandle in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._recentChunkStatusCode in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._isPaused in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._isRestartedUpload in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._uploadData in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._uploadLocationURL in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
duplicate symbol _OBJC_IVAR_$_GTMSessionUploadFetcher._uploadFileURL in:
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/GoogleSignIn/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
/Projects/iOS/AddressBookGoogleMaps/AddressBookGoogleMaps/Sources/Externals/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher(GTMSessionUploadFetcher_fb894b20da0d1114d3ddd8f56ed741c5.o)
ld: 194 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
理想的な解決策には程遠いですが、これは私がそれを解決した方法です。
(この解決策は、両方のライブラリが共通のクラスを含み、-ObjC
または-all_load
国旗。)
GoogleSignInDependencies.framework内のGoogleSignInDependenciesファイルを別の場所のPATHにコピーします。このファイルはファットファイルであり、異なるアーキテクチャ用のコードが含まれています。
ターミナルを開き、PATHに移動します。
$ cd PATH
次のコマンドを実行して、ファットライブラリに関する情報を取得します。
$ lipo -info GoogleSignInDependencies
次の結果が得られます。
Architectures in the fat file: GoogleSignInDependencies are: armv7 i386 x86_64 arm64
ご覧のとおり、ファットファイルには4つのアーキテクチャがあります。
次のコマンドを実行して、ファットファイルからシンファイル(1つのアーキテクチャのみのコードを含むファイル)を取得します。
$ lipo -thin armv7 GoogleSignInDependencies -output armv7.a
$ lipo -thin i386 GoogleSignInDependencies -output i386.a
$ lipo -thin x86_64 GoogleSignInDependencies -output x86_64.a
$ lipo -thin arm64 GoogleSignInDependencies -output arm64.a
Armv7.a、i386.a、x86_64.a、およびarm64.aという名前の4つのシンファイルを取得します。
GoogleSignInDependenciesファイルを削除します。もう必要ありません。
Armv7、i386、x86_64、およびarm64という名前の4つの新しいフォルダーを作成します。次に、シンファイルarmv7.a、i386.a、x86_64.a、およびarm64.aをそれぞれのフォルダに移動します。次のようなフォルダ構造が必要です。
arm64
arm64.a
armv7
armv7.a
i386
i386.a
x86_64
x86_64.a
ターミナルから4つのフォルダーのそれぞれに移動し、次のコマンドを使用してシンファイルからオブジェクトファイル(* .o)を抽出します。
$ cd armv7
$ ar -x armv7.a
$ cd ../i386
$ ar -x i386.a
$ cd ../x86_64
$ ar -x x86_64.a
$ cd ../arm64
$ ar -x arm64.a
これらのコマンドを実行すると、4つのフォルダーのそれぞれに次のファイルが含まれます。 (これは将来のバージョンで変更される可能性があります。)
__.SYMDEF
GTMGeometryUtils_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
GTMLogger_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
GTMNSDictionary+URLArguments_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
GTMNSString+URLArguments_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
GTMOAuth2Authentication_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
GTMOAuth2SignIn_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
GTMOAuth2ViewControllerTouch_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
GTMSessionFetcher_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
GTMSessionFetcherLogging_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
GTMSessionFetcherService_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
GTMSessionUploadFetcher_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
GTMSynchronizationAsserts_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
4つのフォルダそれぞれから、Firebaseライブラリと競合しているファイルを削除します。これらの6つのファイルを削除する必要があります。 (これは将来のバージョンで変更される可能性があります。)
GTMLogger_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
GTMNSDictionary+URLArguments_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
GTMSessionFetcher_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
GTMSessionFetcherLogging_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
GTMSessionFetcherService_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
GTMSessionUploadFetcher_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
シンファイルarmv7.a、i386.a、x86_64.a、およびarm64.aを削除します。
次のコマンドを実行して、残りのオブジェクトファイルをシンファイルに結合します。
$ cd armv7
$ libtool -static *.o -o armv7-new.a
$ cd ../i386
$ libtool -static *.o -o i386-new.a
$ cd ../x86_64
$ libtool -static *.o -o x86_64-new.a
$ cd ../arm64
$ libtool -static *.o -o arm64-new.a
新しく作成したシンファイルarmv7-new.a、i386-new.a、x86_64-new.a、およびarm64-new.aを新しい場所PATH_NEWにコピーします。 PATH内の他のすべてを削除できます。
次のコマンドを実行して、新しいシンファイルを新しいファットファイルに結合します。
$ cd PATH_NEW
$ lipo -create armv7-new.a i386-new.a x86_64-new.a arm64-new.a -output GoogleSignInDependencies-new
XcodeプロジェクトのGoogleSignInDependenciesの代わりに、新しく生成されたGoogleSignInDependencies-newを使用します。
物事をより深く理解するために、次の記事を強くお勧めします。
以下のxmasalovの返信に従って、Firebaseが更新され、Google SignInに必要なすべての依存関係が/Invites
ディレクトリ。追加するだけです:
そのディレクトリからプロジェクトに。 GoogleからGoogleSignInフレームワークをダウンロードする必要はもうありません。
この問題が発生した場合は、すべての処理を実行するbashシェルスクリプトを作成しました。 Gist として保存しました。自己責任で使用してください。
フレームワークの新しいバージョンの変更に合わせてスクリプトを微調整する必要がある場合があるため、上記のすべてのコメントをお読みください。
これが発生している理由は次のとおりです(2018-04-20現在)。
CocoaPodsを使用すると、CocoaPodsはスマートな依存関係マネージャーであり、共通の依存関係を重複排除するため、すべてが美しく解決されます。
ビルド済みのバイナリをダウンロードするときは、少し注意が必要です...
Firebase Zipファイルは、すべての依存関係を個別の.frameworkとして出荷します。これは、フレームワークが別の場所からすでに取得されている場合、重複を手動で削除できることを意味します
GoogleSignIn Zipファイルは別のアプローチをとり、all依存関係をGoogleSignInDependencies.frameworkにバンドルしました。つまり、bothGTMSessionFetcherおよびGTMOAuth2フレームワーク
そのままリンクしようとすると、GoogleSignInDependenciesにバンドルされているGTMSessionFetcherフレームワークが、Firebaseに同梱されているスタンドアロンのGTMSessionFetcher.frameworkと競合します。
GoogleSignInDependenciesフレームワークが削除された場合、リンカーはGTMOAuth2フレームワークを見つけられず、失敗します
理想的には、GoogleSignIn Zipファイルに個々の依存関係を含めて、何が起こっているかをより明確にする必要があります。現状では、この問題には2つの解決策があります。
Easy: GoogleSignInDependenciesにバンドルされているものをすべて、Firebaseに付属のフレームワークから削除します
Harder: GoogleSignInDependenciesを取り除く
GoogleSignInDependencies.framework
からLink Binaries
を削除するだけです