問題描述:當運行Xcode8.1時,編譯代碼成功,可運行,控制臺出現如下打印:
objc[924]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/
Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/
System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x11827c998)
and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/
System/Library/PrivateFrameworks/PhotoLibraryServices.framework/
PhotoLibraryServices (0x1180a1d38). One of the two will be used. Which one is undefined.
解決辦法:意思是PhotoLibraryServices.framework和AssetsLibraryServices.framework產生了沖突,系統不知道用哪個
Class PLBuildVersion在框架AssetsLibraryServices和框架PhotoLibraryServices里都有定義。在Objective-C里Class名是唯一。兩個同名的Class,Xcode會選擇其中一個Class來執行。PLBuildVersion在這兩個框架里都是一樣的,不影響實際運行。