我有一個現有的迦太基項目,它使用AWS並且它是用Swift編寫的。我已經集成了Google SignIn(v4.0.1),並且它可以工作。 我最近還添加了AdMob(通過手動SDK安裝),我可以看到廣告。 現在,AdMob控制檯建議添加Firebase Analytics,我正在嘗試。我下載了Firebase SDK並按照自述文件中的步驟操作: - 在我的項目中複製了Firebase Analytics框架(未嵌入) - 已添加-ObjC標記 - 已複製Firebase.h - 已複製module.map和已更新標題搜索路徑iOS AdMob Analytics與Firebase的集成問題
當我構建項目時,我得到了26個與GoogleSignInDependencies.framework(通過Google SignIn添加)和GoogleToolboxForMac.framework(通過Firebase)之間的重複符號有關的錯誤..所有這些都與GTMLogger相關。
我搜索論壇,看到這可以解決,如果使用Cocoapods ..但這不可能在我的情況。有沒有其他方法可以解決這個問題?或者,我應該使用Google Analytics代替Firebase嗎?
問候, 馬尼什
這裏的錯誤消息:
duplicate symbol _OBJC_CLASS_$_GTMLogStandardFormatter in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogStandardFormatter in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_CLASS_$_GTMLogBasicFormatter in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogBasicFormatter in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_CLASS_$_GTMLogNoFilter in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogNoFilter in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_CLASS_$_GTMLogMininumLevelFilter in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogMininumLevelFilter in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_CLASS_$_GTMLogMaximumLevelFilter in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogMaximumLevelFilter in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_CLASS_$_GTMLogLevelFilter in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogLevelFilter in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_CLASS_$_GTMLogAllowedLevelFilter in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogAllowedLevelFilter in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_CLASS_$_GTMLogger in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogger in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_IVAR_$_GTMLogLevelFilter.userDefaults_ in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_IVAR_$_GTMLogAllowedLevelFilter.allowedLevels_ in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_IVAR_$_GTMLogger.formatter_ in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_IVAR_$_GTMLogStandardFormatter.dateFormatter_ in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_IVAR_$_GTMLogger.filter_ in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_IVAR_$_GTMLogger.writer_ in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_IVAR_$_GTMLogStandardFormatter.pname_ in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_IVAR_$_GTMLogStandardFormatter.pid_ in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _OBJC_IVAR_$_GTMLogLevelFilter.verboseLoggingEnabled_ in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMLogger_e66760ac68814bab22c3e6b0850da5e6.o)
duplicate symbol _GTMNSDictionaryURLArgumentsExportToSuppressLibToolWarning in:
----/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMNSDictionary+URLArguments_cd571689d060290c6282e8a67c43d536.o)
----/GoogleSignInDependencies.framework/GoogleSignInDependencies(GTMNSDictionary+URLArguments_7a10c227900104c35b53fbebbbcb25cb.o)
ld: 26 duplicate symbols for architecture x86_64
選項二:使用 「力載荷」 標誌
這裏的堆棧跟蹤,如果我增加 「動力荷載」選項:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSBundle gid_frameworkBundle]: unrecognized selector sent to class 0x10dc5e220'
*** First throw call stack:
(
0 CoreFoundation 0x000000010f2e6d4b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010de0021e objc_exception_throw + 48
2 CoreFoundation 0x000000010f356e44 +[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x000000010f26c005 ___forwarding___ + 1013
4 CoreFoundation 0x000000010f26bb88 _CF_forwarding_prep_0 + 120
5 StockTracker 0x000000010c54adac +[GIDSignInStrings localizedStringForKey:text:] + 69
6 StockTracker 0x000000010c549c2e -[GIDSignInButton buttonText] + 68
7 StockTracker 0x000000010c548db6 -[GIDSignInButton minWidth] + 74
8 StockTracker 0x000000010c5490a6 -[GIDSignInButton sizeThatFits:] + 52
9 StockTracker 0x000000010c548b5b -[GIDSignInButton setFrame:] + 37
10 UIKit 0x0000000110ff4abd UIViewCommonInitWithFrame + 1395
11 UIKit 0x0000000110ff4dc6 -[UIView initWithCoder:] + 471
12 UIKit 0x00000001110e6fe2 -[UIControl initWithCoder:] + 66
13 StockTracker 0x000000010c548652 -[GIDSignInButton initWithCoder:] + 64
什麼是確切的錯誤信息? –
我在帖子中添加了錯誤信息.. – Manish
GoogleSignInDependencies.framework不是GoogleSignIn的依賴項 - https://github.com/CocoaPods/Specs/blob/master/Specs/d/4/0/GoogleSignIn/4.0。 2/GoogleSignIn.podspec.json - 它是從哪裏來的? –