tencentyun / qcloud-sdk-ios

腾讯云服务iOS终端SDK
http://qcloud.com
38 stars 26 forks source link

共同使用 FCUUID 库是发生链接冲突 #4

Closed davidfuzju closed 6 years ago

davidfuzju commented 6 years ago

当我在应用中引入 FCUUID 一起编译之后,会发生链接冲突报错

duplicate symbol __uuidsOfUserDevicesKey in:
    /Users/David/Library/Developer/Xcode/DerivedData/social-module-ios-edzgakqhvypnepfgmkwjgmmrwkdn/Build/Products/Debug-iphoneos/FCUUID/libFCUUID.a(FCUUID.o)
    /Users/David/Library/Developer/Xcode/DerivedData/social-module-ios-edzgakqhvypnepfgmkwjgmmrwkdn/Build/Products/Debug-iphoneos/QCloudCore/libQCloudCore.a(QCloudFCUUID.o)
duplicate symbol __uuidForInstallationKey in:
    /Users/David/Library/Developer/Xcode/DerivedData/social-module-ios-edzgakqhvypnepfgmkwjgmmrwkdn/Build/Products/Debug-iphoneos/FCUUID/libFCUUID.a(FCUUID.o)
    /Users/David/Library/Developer/Xcode/DerivedData/social-module-ios-edzgakqhvypnepfgmkwjgmmrwkdn/Build/Products/Debug-iphoneos/QCloudCore/libQCloudCore.a(QCloudFCUUID.o)
duplicate symbol __uuidsOfUserDevicesToggleKey in:
    /Users/David/Library/Developer/Xcode/DerivedData/social-module-ios-edzgakqhvypnepfgmkwjgmmrwkdn/Build/Products/Debug-iphoneos/FCUUID/libFCUUID.a(FCUUID.o)
    /Users/David/Library/Developer/Xcode/DerivedData/social-module-ios-edzgakqhvypnepfgmkwjgmmrwkdn/Build/Products/Debug-iphoneos/QCloudCore/libQCloudCore.a(QCloudFCUUID.o)
duplicate symbol __uuidForDeviceKey in:
    /Users/David/Library/Developer/Xcode/DerivedData/social-module-ios-edzgakqhvypnepfgmkwjgmmrwkdn/Build/Products/Debug-iphoneos/FCUUID/libFCUUID.a(FCUUID.o)
    /Users/David/Library/Developer/Xcode/DerivedData/social-module-ios-edzgakqhvypnepfgmkwjgmmrwkdn/Build/Products/Debug-iphoneos/QCloudCore/libQCloudCore.a(QCloudFCUUID.o)
ld: 4 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我看了下源码,似乎是因为部分变量名没有加前缀

@implementation QCloudFCUUID

NSString *const QCloudFCUUIDsOfUserDevicesDidChangeNotification = @"QCloudFCUUIDsOfUserDevicesDidChangeNotification";

NSString *const _uuidForInstallationKey = @"fc_uuidForInstallation";
NSString *const _uuidForDeviceKey = @"fc_uuidForDevice";
NSString *const _uuidsOfUserDevicesKey = @"fc_uuidsOfUserDevices";
NSString *const _uuidsOfUserDevicesToggleKey = @"fc_uuidsOfUserDevicesToggle";
EricCheungSCUT commented 6 years ago

是的,感谢反馈,我们稍后发布更新来解决这个问题

EricCheungSCUT commented 6 years ago

这个在问题已经最新的 5.4.4 版本中修复,可以更新后尝试

davidfuzju commented 6 years ago

已经修复,感谢