Une erreur de symboles en double s'est produite lors de l'intégration manuelle des kits de développement logiciel (SDK) Firebase et Google Sign In dans mon projet iOS existant.
La question connexe SO ici n'a pas aidé car elle utilise des Cocoapods.
Firebase et Google Signin donnant une erreur de symboles en double
Les étapes que j'ai suivies dans l'ordre chronologique:
Dossier Analytics, Auth et Database copié avec le fichier Firebase.h à partir du SDK Firebase téléchargé (3.11.0) dans mon projet et ajouté aux cibles.
Copié GoogleService-Info.plist dans le projet et ajouté aux cibles.
Ajout du drapeau -ObjC à d'autres drapeaux de l'éditeur de liens.
Copié les frameworks et les kits nécessaires à partir du SDK de connexion à Google (4.0.1) téléchargé dans mon projet et ajoutés aux cibles.
Lié les cadres et les bibliothèques nécessaires.
Voici la structure du projet connexe:
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)
Voici le journal des erreurs (tronqué):
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)
C’est ainsi que j’ai résolu le problème, même si c’est loin d’être la solution idéale.
(Cette solution peut être appliquée à tous les cas où deux bibliothèques statiques provoquent l'erreur "symbole en double", car les deux bibliothèques contiennent des classes communes et utilisent l'indicateur -ObjC
ou -all_load
.)
Copiez le fichier GoogleSignInDependencies dans le fichier GoogleSignInDependencies.framework à l’emplacement PATH. Ce fichier est un gros fichier, ce qui signifie qu’il contient des codes pour différentes architectures.
Ouvrez le terminal et allez à PATH.
$ cd PATH
Exécutez la commande suivante pour obtenir des informations sur la grosse bibliothèque.
$ lipo -info GoogleSignInDependencies
Vous obtiendrez le résultat suivant.
Architectures in the fat file: GoogleSignInDependencies are: armv7 i386 x86_64 arm64
Comme vous pouvez le voir, il y a 4 architectures dans le fichier fat.
Obtenez les fichiers légers (fichiers contenant du code pour une seule architecture) à partir du fichier fat en exécutant les commandes suivantes.
$ 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
Vous obtiendrez 4 fichiers légers nommés armv7.a, i386.a, x86_64.a et arm64.a.
Supprimez le fichier GoogleSignInDependencies, nous n'en avons plus besoin.
Créez 4 nouveaux dossiers nommés armv7, i386, x86_64 et arm64. Déplacez ensuite les fichiers légers armv7.a, i386.a, x86_64.a et arm64.a vers les dossiers respectifs. Vous devriez avoir une structure de dossier comme celle-ci.
arm64
arm64.a
armv7
armv7.a
i386
i386.a
x86_64
x86_64.a
Accédez à chacun des 4 dossiers du terminal et extrayez les fichiers objets (* .o) des fichiers légers à l’aide des commandes suivantes.
$ 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
Après avoir exécuté ces commandes, chacun des 4 dossiers devrait contenir les fichiers suivants. (Cela peut changer dans les futures versions.)
__.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
Supprimez les fichiers en conflit avec la bibliothèque Firebase de chacun des 4 dossiers. Vous devez supprimer ces 6 fichiers. (Cela peut changer dans les futures versions.)
GTMLogger_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
GTMNSDictionary+URLArguments_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
GTMSessionFetcher_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
GTMSessionFetcherLogging_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
GTMSessionFetcherService_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
GTMSessionUploadFetcher_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o
Supprimez les fichiers légers armv7.a, i386.a, x86_64.a et arm64.a.
Combinez les fichiers d’objet restants en fichiers légers en exécutant les commandes suivantes.
$ 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
Copiez les fichiers légers nouvellement créés armv7-new.a, i386-new.a, x86_64-new.a et arm64-new.a dans un nouvel emplacement PATH_NEW. Vous pouvez supprimer tout le reste dans PATH.
Combinez les nouveaux fichiers thin dans un nouveau fichier fat en exécutant les commandes suivantes.
$ cd PATH_NEW
$ lipo -create armv7-new.a i386-new.a x86_64-new.a arm64-new.a -output GoogleSignInDependencies-new
Utilisez le nouveau fichier GoogleSignInDependencies-new à la place de GoogleSignInDependencies dans votre projet Xcode.
Je recommande fortement l'article suivant pour une meilleure compréhension des choses.
Conformément à la réponse de xmasalov ci-dessous, Firebase a été mis à jour pour inclure toutes les dépendances nécessaires à Google SignIn dans le répertoire /Invites
. Il suffit d'ajouter:
de ce répertoire à votre projet. vous n'avez plus du tout besoin de télécharger les frameworks GoogleSignIn à partir de Google.
Si vous avez ce problème, je viens d'écrire un script bash Shell qui fait tout le travail pour moi. Je l'ai enregistré en tant que Gist . Utilisez à vos risques et périls.
Veuillez lire tous les commentaires ci-dessus, car le script peut avoir besoin d'être peaufiné pour correspondre aux modifications apportées aux nouvelles versions des frameworks.
Réponse mise à jour
À compter du 2018-12, l'équipe Google Sign-In for iOS a supprimé la dépendance à la bibliothèque GTM OAuth 2.
Notes de publication du SDK iOS sur Google Sign-In
2018-11-29 - v4.4.0 Suppression de la dépendance à la bibliothèque GTM OAuth 2.
À partir de 2018-11, vous pouvez trouver tout ce qui est nécessaire pour que GoogleSignIn puisse fonctionner avec FirebaseAnalytics et FirebaseAuth dans le dossier Firebase/Invites
:
GoogleSignIn.framework
GTMOAuth2.framework
Pas besoin d'ajouter GoogleSignInDependencies.framework
, fonctionne comme un charme.
Voici pourquoi cela se produit (à compter du 2018-04-20):
Lorsque CocoaPods est utilisé, tout se résout parfaitement, car CocoaPods est un gestionnaire de dépendances intelligent qui déduplique les dépendances courantes.
Lorsque les fichiers binaires de pré-génération sont téléchargés, les choses sont un peu plus compliquées ...
Le fichier Zip Firebase est livré avec toutes les dépendances dans un fichier .framework séparé. Cela signifie que si un framework est déjà en train d’être récupéré, vous pouvez simplement supprimer manuellement le duplicata.
Le fichier zip de GoogleSignIn a adopté une autre approche et a intégré les dépendances all dans GoogleSignInDependencies.framework, ce qui signifie qu'il contient both les frameworks GTMSessionFetcher et GTMOAuth2.
Si vous tentez de vous connecter tel quel, le cadre GTMSessionFetcher fourni avec GoogleSignInDependencies sera en conflit avec le fichier autonome GTMSessionFetcher.framework fourni avec Firebase.
Si le cadre GoogleSignInDependencies est supprimé, l'éditeur de liens ne trouvera pas le cadre GTMOAuth2 et échouera.
Idéalement, le fichier Zip GoogleSignIn devrait contenir les dépendances individuelles, ce qui le rend plus évident quant à ce qui se passe. Dans l'état actuel des choses, il existe deux solutions à ce problème:
Facile: Supprimez tout ce qui est fourni dans GoogleSignInDependencies des frameworks fournis avec Firebase.
Plus difficile: Débarrassez-vous de GoogleSignInDependencies
Il suffit de supprimer GoogleSignInDependencies.framework
de Link Binaries