objective-c - Objc : Class X is implemented in both Y and Z . 将使用两者之一。哪个是未定义的

标签 objective-c swift xcode cocoa

我试图将一个 swift 文件添加到现有的 Obj-C 项目中,这个项目有一些框架链接到它。当我向它添加一个 swift 文件时,它编译得很好,但在运行时它提示一些 swift 标准类正在链接框架和当前项目中实现。

这些重复的类定义最初并非来自链接框架,而是来自 swift 标准库,例如 libswiftFoundation.dylib。有人知道如何解决这个问题吗?

我正在使用在 sierra 上运行的 xcode8.3。

objc[74652]: Class _TtC8Dispatch16DispatchWorkItem is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftDispatch.dylib (0x101328e58) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100415608). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtC10Foundation20_SwiftNSCharacterSet is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftFoundation.dylib (0x101456ab0) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100413708). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtC10Foundation12_DataStorage is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftFoundation.dylib (0x10145a048) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100419258). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtC10Foundation12_NSSwiftData is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftFoundation.dylib (0x101456b50) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x1004137a8). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtC10Foundation25_NSErrorRecoveryAttempter is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftFoundation.dylib (0x10145a680) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100419888). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtC10Foundation25NSFastEnumerationIterator is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftFoundation.dylib (0x10145a720) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100419928). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtC10Foundation15NSSimpleCString is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftFoundation.dylib (0x10145a7d8) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x1004199e0). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtC10Foundation16NSConstantString is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftFoundation.dylib (0x10145a868) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100419a70). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtCs18_EmptyArrayStorage is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100e990) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100413870). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtCs20_RawNativeSetStorage is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100ea40) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100413920). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtCs17_CocoaSetIterator is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x101023a98) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x10042ed90). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtCs27_RawNativeDictionaryStorage is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100eb08) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x1004139e8). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtCs24_CocoaDictionaryIterator is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x101024a98) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x10042fd90). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtCs17NonObjectiveCBase is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x101026538) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100431830). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtCs17_stdlib_AtomicInt is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x1010289a8) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100433ca0). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtCs19_SwiftNativeNSArray is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100ebe0) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100413ac0). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtCs24_SwiftNativeNSDictionary is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100ec48) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100413b28). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtCs17_SwiftNativeNSSet is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100ecb0) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100413b90). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtCs24_SwiftNativeNSEnumerator is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100ed18) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100413bf8). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtCs18_SwiftNativeNSData is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100ed80) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100413c60). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtCs26_SwiftNativeNSCharacterSet is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100ede8) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100413cc8). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtCs31_stdlib_ReturnAutoreleasedDummy is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100ee50) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100413d30). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtCs20_SwiftNativeNSString is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100eec8) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100413da8). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtCs19_NSContiguousString is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100ef30) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100413e10). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtCs40_SwiftNativeNSArrayWithContiguousStorage is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100efb0) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100413e90). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtCs21_SwiftDeferredNSArray is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100f020) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100413f00). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtCs27_ContiguousArrayStorageBase is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100f0b0) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100413f90). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtCs14_VaListBuilder is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10102dec8) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x1004391c0). One of the two will be used. Which one is undefined.
objc[74652]: Class _TtCs13VaListBuilder is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10102dfb8) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x1004392b0). One of the two will be used. Which one is undefined.
objc[74652]: Class _SwiftTypePreservingNSNumber is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftFoundation.dylib (0x101456c08) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100414028). One of the two will be used. Which one is undefined.
objc[74652]: Class _SwiftNativeNSError is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100f148) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100414078). One of the two will be used. Which one is undefined.
objc[74652]: Class SwiftObject is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100f198) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x1004140c8). One of the two will be used. Which one is undefined.
objc[74652]: Class _SwiftValue is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100f210) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100414140). One of the two will be used. Which one is undefined.
objc[74652]: Class _SwiftNull is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100f260) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100414190). One of the two will be used. Which one is undefined.
objc[74652]: Class _SwiftNativeNSArrayBase is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100f2b0) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x1004141e0). One of the two will be used. Which one is undefined.
objc[74652]: Class _SwiftNativeNSDictionaryBase is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100f300) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100414230). One of the two will be used. Which one is undefined.
objc[74652]: Class _SwiftNativeNSSetBase is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100f350) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100414280). One of the two will be used. Which one is undefined.
objc[74652]: Class _SwiftNativeNSStringBase is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100f3a0) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x1004142d0). One of the two will be used. Which one is undefined.
objc[74652]: Class _SwiftNativeNSEnumeratorBase is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100f3f0) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100414320). One of the two will be used. Which one is undefined.
objc[74652]: Class _SwiftNativeNSDataBase is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100f440) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100414370). One of the two will be used. Which one is undefined.
objc[74652]: Class _SwiftNativeNSCharacterSetBase is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100f490) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x1004143c0). One of the two will be used. Which one is undefined.
objc[74652]: Class _SwiftNativeNSIndexSetBase is implemented in both /Users/username/Dev/Source/build/UninstalledProducts/macosx/BKMySQL.framework/Versions/A/Frameworks/libswiftCore.dylib (0x10100f4e0) and /Users/username/Dev/Source/build/Debug/BKServerFramework (0x100414410). One of the two will be used. Which one is undefined.

注意:BKServerFramework是一个命令行工具,忽略这个名字它不是一个框架。

最佳答案

看起来 BKServerFrameworklibswiftCore.a 静态链接。不应该的。

关于objective-c - Objc : Class X is implemented in both Y and Z . 将使用两者之一。哪个是未定义的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49325274/

相关文章:

ios - 通过 userDefaults 在两个 View Controller 之间共享数据

objective-c - 自定义 NSFormatter 导致生成错误 "Class Unavailable: Custom Formatter with XCode versions prior to 4.1"

ios - viewDidLoad 是否在 UITabBarController 中被多次调用?

iphone - 页面控制问题

ios - 核心数据 : How to update value of type NSSet

ios - 更新 XCode 4 到最新的 IOS SDK

iphone - 以 Unity3D 作为子项目的 Xcode 工作区?

json - 为什么我的 Swift 代码无法根据 .json 数据中的值正确计算分数

ios - 球掉落动画不起作用(Swift)

ios - 更新到 os x mavericks 后无法打开 Storyboard断言失败