【问题标题】:MT5212: Native linking failed, duplicate symbol: '_OBJC_IVAR_$_FIRInstanceID._tokenManager'MT5212:本机链接失败,重复符号:'_OBJC_IVAR_$_FIRInstanceID._tokenManager'
【发布时间】:2018-06-11 18:40:23
【问题描述】:

我通过绑定本机目标 c 库创建了 iOS.dll 文件。直到现在一切正常,xamarin ios 应用程序也运行良好。现在,我在我的本机目标 c 库中添加了 Firebase 框架(Firebase Auth、Database、Analytics、InstanceID)以使用 firebase 服务,并以与之前使用 xamarin iOS 相同的方式创建绑定。但是,当我包含 Firebase NuGet 包以实现 Firebase 推送通知时,我在 xamarin iOS 示例应用程序中遇到以下错误。

在制作.dll时有什么办法可以消除这些错误,或者有什么办法可以删除或忽略引用

clang : 错误 : 链接器命令失败,退出代码为 1(使用 -v 查看调用)

MTOUCH:错误 MT5212:本机链接失败,重复符号:'_OBJC_IVAR_$_FIRInstanceID._tokenManager'。

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceID_b1d502cebbd0a4f0a056073f0df0e3c0 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceID_b1d502cebbd0a4f0a056073f0df0e3c0.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本地链接失败,重复符号:'_kFIRInstanceIDTokenRefreshNotification'。

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceID_b1d502cebbd0a4f0a056073f0df0e3c0 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceID_b1d502cebbd0a4f0a056073f0df0e3c0.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本机链接失败,重复符号:'_OBJC_IVAR_$_FIRInstanceID._retryCountForDefaultToken'。

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceID_b1d502cebbd0a4f0a056073f0df0e3c0 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceID_b1d502cebbd0a4f0a056073f0df0e3c0.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本机链接失败,重复符号:'_OBJC_IVAR_$_FIRInstanceID._isFetchingDefaultToken'。

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceID_b1d502cebbd0a4f0a056073f0df0e3c0 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceID_b1d502cebbd0a4f0a056073f0df0e3c0.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本地链接失败,重复符号:'_OBJC_IVAR_$_FIRInstanceID._defaultFCMToken'。

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceID_b1d502cebbd0a4f0a056073f0df0e3c0 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceID_b1d502cebbd0a4f0a056073f0df0e3c0.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本机链接失败,重复符号:'_OBJC_IVAR_$_FIRInstanceID._retryCountForCheckinRefresh'。

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceID_b1d502cebbd0a4f0a056073f0df0e3c0 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceID_b1d502cebbd0a4f0a056073f0df0e3c0.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本机链接失败,重复符号:'_OBJC_IVAR_$_FIRInstanceID._APNSTupleString'。

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceID_b1d502cebbd0a4f0a056073f0df0e3c0 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceID_b1d502cebbd0a4f0a056073f0df0e3c0.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5213:重复符号在:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceIDAPNSInfo_3577655e8a036dca71b8fd8585feb607 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceIDAPNSInfo_3577655e8a036dca71b8fd8585feb607.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本机链接失败,重复符号:'_OBJC_METACLASS_$_FIRInstanceIDAPNSInfo'。

MTOUCH:错误 MT5213:重复符号在:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceIDAPNSInfo_3577655e8a036dca71b8fd8585feb607 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceIDAPNSInfo_3577655e8a036dca71b8fd8585feb607.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本机链接失败,重复符号:'_OBJC_IVAR_$_FIRInstanceIDAPNSInfo._deviceToken'。

MTOUCH:错误 MT5213:重复符号在:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceIDAPNSInfo_3577655e8a036dca71b8fd8585feb607 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceIDAPNSInfo_3577655e8a036dca71b8fd8585feb607.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本地链接失败,重复符号:'_OBJC_IVAR_$_FIRInstanceIDAuthKeychainItem._account'。

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本机链接失败,重复符号:'_OBJC_IVAR_$_FIRInstanceIDAuthKeychain._identifier'。

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本机链接失败,重复符号:'_kFIRInstanceIDKeychainWildcardIdentifier'。

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本地链接失败,重复符号:'_OBJC_CLASS_$_FIRInstanceIDAuthKeychain'。

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本地链接失败,重复符号:'_OBJC_METACLASS_$_FIRInstanceIDAuthKeychain'。

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本机链接失败,重复符号:'_OBJC_CLASS_$_FIRInstanceIDAuthKeychainItem'。

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本机链接失败,重复符号:'_OBJC_METACLASS_$_FIRInstanceIDAuthKeychainItem'。

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本机链接失败,重复符号:'_OBJC_IVAR_$_FIRInstanceIDAuthKeychainItem._modificationDate'。

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本机链接失败,重复符号:'_OBJC_IVAR_$_FIRInstanceIDAuthKeychainItem._service'。

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本机链接失败,重复符号:'_OBJC_IVAR_$_FIRInstanceIDAuthKeychain._generic'。

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本机链接失败,重复符号:'_OBJC_IVAR_$_FIRInstanceIDAuthKeychainItem._data'。

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceIDAuthKeyChain_4ca91bb1d332311cbe075921a00e2946.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本机链接失败,重复符号:'_OBJC_IVAR_$_FIRInstanceIDAuthService._checkinRetryCount'。

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceIDAuthService_41557c1c330f90e42c16c2ecb85001e4 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceIDAuthService_41557c1c330f90e42c16c2ecb85001e4.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本机链接失败,重复符号:'_OBJC_IVAR_$_FIRInstanceIDAuthService._isCheckinInProgress'。

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceIDAuthService_41557c1c330f90e42c16c2ecb85001e4 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceIDAuthService_41557c1c330f90e42c16c2ecb85001e4.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5212:本地链接失败,重复符号:'_OBJC_IVAR_$_FIRInstanceIDAuthService._checkinHandlers'。

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/libMessageSDKFramework.a(FIRInstanceIDAuthService_41557c1c330f90e42c16c2ecb85001e4 .o)(与先前错误相关的位置)

MTOUCH:错误 MT5213:重复符号:/Users/Documents/adi/Xamarin/06062018/Test/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.3/mtouch-cache/FirebaseInstanceID(FIRInstanceIDAuthService_41557c1c330f90e42c16c2ecb85001e4.o )(与上一个错误相关的位置)

MTOUCH:错误 MT5202:本机链接失败。请查看构建日志。

【问题讨论】:

    标签: ios objective-c xamarin xamarin.forms xamarin.ios


    【解决方案1】:

    我今天早上刚要解决同样的问题。
    不幸的是,目前没有合适的解决方案,但有一个解决方法:

    ..我们在两周前发现了这个问题,这只发生在 模拟器 AFAIK。似乎依赖 LevelDB 离开了他们的 Main 象征。我将在 Firebase 上提交一个错误。解决方法是 更改 Registrar 在模拟器上的行为:

    1. 打开您的项目设置
    2. 转到构建选项卡
    3. 选择 iOS 构建选项
    4. 在其他 mtouch 参数文本框中键入 --registrar:static
    5. 点击确定

    不要忘记在 Release 和 Debug 配置中添加这个 iPhone模拟器平台。

    更多详情请见here

    【讨论】:

    • 我已经尝试过了,但是它不起作用。谢谢您的帮助。 @EvZ
    猜你喜欢
    • 2016-08-02
    • 1970-01-01
    • 2023-02-14
    • 1970-01-01
    • 2018-12-13
    • 2012-12-11
    • 2014-05-20
    • 2012-08-20
    • 1970-01-01
    相关资源
    最近更新 更多