Xcode 8 打印输出: Class PLBuildVersion is implemented in both...

 在xcode8中,屏蔽了一些奇怪的输出之后,又发现了一个。具体啥原因还不是太清楚。但是可以解决这个问题,让其停止打印这个信息。

在 info.plist 中,添加两个键值对:

针对photo:

key : Privacy - Photo Library Usage Description  value: $(PRODUCT_NAME) photo use //(解释对相册的使用)

针对camera:

keyPrivacy - Camera Usage Description      value$(PRODUCT_NAME) camera use   //(解释对相机的使用)

这个方法仅仅解决了photo 方面的,好像别的功能(加载WebView)也会有类似的报错。

例如: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x122fba910) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x122de4210). One of the two will be used. Which one is undefined.

主要是因为iOS10在用户的隐私方面的改动。

并不影响程序工作,但是还没有找到完全避免的方法!

更新到Xcode新版本之后,这个打印已经没有了!我正在使用的是8.2.1。没有这个打印问题!

原文地址:https://www.cnblogs.com/code-Officer/p/5991955.html