Swift3 是什么导致此XCode 8/iOS 10编译器警告?

Swift3 是什么导致此XCode 8/iOS 10编译器警告?,swift3,xcode8,Swift3,Xcode8,我已经更新了我的xcode 8并运行了一个旧的应用程序,它是在7.3中通过转换swift 3中的swift代码创建的。但我在日志窗口中收到如下消息: objc[19295]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/

我已经更新了我的xcode 8并运行了一个旧的应用程序,它是在7.3中通过转换swift 3中的swift代码创建的。但我在日志窗口中收到如下消息:

   objc[19295]: Class PLBuildVersion is implemented in both   /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x118365910) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x11818f210). One of the two will be used. Which one is undefined.
   activity started

为什么会发生这种情况?

您的框架
AssetLibraryServices
以及
PhotoLibraryServices
中声明了一个类
PLBuildVersion
。因为类名是唯一的,所以Xcode告诉您它将使用这些类声明中的一个,但它会让您感到惊讶,到底是哪一个


幸运的是,您不必担心,因为这两个类应该是相同的。

我的应用程序可能重复出现此错误而崩溃,我已将“将警告视为错误”设置为“无内置设置”。这不会影响应用程序,但会在我的日志消息中发出警告。如何删除它?正在删除其中一个框架:p不,真的,这不是问题。我刚刚编辑了我的答案,你不必担心,这两门课应该是一样的。好的,我不需要为这门课操心。但仍然没有得到确切的答案。我根本不想要警告。因此,如果你知道如何删除警告,那会更有帮助。我确实给了你答案:只要你的应用程序同时使用这两种框架,你就无法摆脱警告。这只是一个警告,他有充分的理由去那里。如果您不想看到这样的警告,那么不能使用(隐式或显式)两个同时声明同一类的框架。如果你这样做了,你真的希望编译器给你一些信息。