美文网首页
Xcode 8中iOS 调用系统相册问题

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

作者: AnderQZ | 来源:发表于2016-12-05 17:49 被阅读693次
在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 调用系统相册问题

      本文链接:https://www.haomeiwen.com/subject/ixqlmttx.html