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。沒有這個打印問題!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM