Xcode 8中iOS 调用系统相册问题

在Xcode 8中,发现项目中调用系统相册时,发现会有这样的错误:

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

经过查询,是由于iOS 10更新后,开发者调用系统相册需要在info.plist文件中添加白名单,分别有

调用系统相册权限:

key: NSPhotoLibraryUsageDescription
value(string): photoLibraryDesciption

调用系统相机权限:

key: NSCameraUsageDescription
value(string): cameraDesciption

问题就圆满解决啦!

你可能感兴趣的:(Xcode 8中iOS 调用系统相册问题)