with google auth ios firebase firebase-authentication google-signin

ios - auth - Duplicar símbolos al integrar SDK de Firebase y Google Sign In manualmente sin Cocoapods



google sign in swift (3)

La verdadera pregunta es; ¿Por qué está copiando directamente en lugar de usar cocoapods? Realmente no hay ventaja al usar tu método. Si usas cocoapods, no tendrás este problema. Si yo fuera tú, eliminaría estos archivos e instalaría con cocoapods. Hay mucho menos margen de error cuando instala cocoapods

Recibo un error con símbolos duplicados al integrar SDK de Firebase y Google Sign In manualmente en mi proyecto iOS existente.

La pregunta SO relacionada aquí no ayudó ya que usa Cocoapods.

Firebase y Google Signin dan error de símbolos duplicados

Pasos que he tomado en orden cronológico:

  1. Carpeta Copied Analytics, Auth and Database junto con el archivo Firebase.h del Firebase SDK descargado (3.11.0) en mi proyecto y agregado a los objetivos.

  2. Copió GoogleService-Info.plist en el proyecto y se agregó a los objetivos.

  3. Se agregó el indicador -ObjC a otros indicadores del enlazador.

  4. Copié los marcos y los paquetes necesarios del SDK de inicio de sesión de Google (4.0.1) descargado en mi proyecto y los agregué a los objetivos.

  5. Vincula los marcos y bibliotecas necesarios.

Aquí está la estructura del proyecto relacionado:

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)

Aquí está el registro de errores (truncado):

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)


Así es como lo resolví, aunque está lejos de ser la solución ideal.

(Esta solución se puede aplicar a cualquier caso en el que dos bibliotecas estáticas provoquen un error de "símbolo duplicado" debido a que ambas bibliotecas contienen clases comunes y usan -ObjC o -all_load flag.)

Copie el archivo GoogleSignInDependencies dentro de GoogleSignInDependencies.framework en una RUTA de ubicación separada. Este archivo es un archivo grueso que significa que tiene códigos para diferentes arquitecturas.

Abra la terminal y vaya a RUTA.

$ cd PATH

Ejecute el comando siguiente comando para obtener información sobre la biblioteca de grasa.

$ lipo -info GoogleSignInDependencies

Obtendrás el siguiente resultado.

Architectures in the fat file: GoogleSignInDependencies are: armv7 i386 x86_64 arm64

Como puede ver, hay 4 arquitecturas en el archivo gordo.

Obtenga los archivos delgados (archivo que contiene código para una sola arquitectura) del archivo gordo ejecutando los siguientes comandos.

$ 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

Obtendrás 4 archivos delgados llamados armv7.a, i386.a, x86_64.a y arm64.a.

Elimina el archivo GoogleSignInDependencies, ya no lo necesitamos.

Crea 4 nuevas carpetas llamadas armv7, i386, x86_64 y arm64. A continuación, mueva los archivos finos armv7.a, i386.a, x86_64.a y arm64.a a las carpetas respectivas. Debería tener una estructura de carpetas como la siguiente.

arm64 arm64.a armv7 armv7.a i386 i386.a x86_64 x86_64.a

Vaya a cada una de las 4 carpetas del terminal y extraiga los archivos del objeto (* .o) de los archivos delgados con los siguientes comandos.

$ 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

Después de ejecutar estos comandos, cada una de las 4 carpetas debe contener los siguientes archivos. (Esto puede cambiar en versiones futuras).

__.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

Elimine los archivos que entran en conflicto con la biblioteca de Firebase desde cada una de las 4 carpetas. Debes eliminar estos 6 archivos. (Esto puede cambiar en versiones futuras).

GTMLogger_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o GTMNSDictionary+URLArguments_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o GTMSessionFetcher_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o GTMSessionFetcherLogging_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o GTMSessionFetcherService_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o GTMSessionUploadFetcher_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.o

Elimine los archivos delgados armv7.a, i386.a, x86_64.a y arm64.a.

Combine los archivos de objetos restantes en archivos finos ejecutando los siguientes comandos.

$ 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

Copie los archivos delgados recién creados armv7-new.a, i386-new.a, x86_64-new.a y arm64-new.a en una nueva ubicación PATH_NEW. Puedes eliminar todo lo demás dentro de PATH.

Combine los nuevos archivos delgados en un nuevo archivo gordo ejecutando los siguientes comandos.

$ cd PATH_NEW $ lipo -create armv7-new.a i386-new.a x86_64-new.a arm64-new.a -output GoogleSignInDependencies-new

Utilice GoogleSignInDependencies-new recién generado en lugar de GoogleSignInDependencies en su proyecto de Xcode.

Recomiendo encarecidamente el siguiente artículo para una comprensión más profunda de las cosas.

http://atnan.com/blog/2012/01/12/avoiding-duplicate-symbol-errors-during-linking-by-removing-classes-from-static-libraries


Si tienes este problema, acabo de escribir un script bash shell que hace todo el trabajo por mí. Lo he guardado como un Gist . Úselo bajo su propio riesgo.