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

问题就圆满解决啦!🐌
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 首先如果遇到应用卡顿或者因为内存占用过多时一般使用Instruments里的来进行检测。但对于复杂情况可能就需要用...
    攻克乃还_阅读 6,283评论 0 7
  • two Last login: Tue Aug 4 17:09:57 on ttys000 yushengyang...
    aofeilin阅读 4,716评论 1 9
  • 放一篇之前一直在私人笔记里的参考,也就是个参考手册,用到的时候回来看看。 ‘$’ 作为引用关键字 ex:$PROJ...
    SMThree阅读 9,435评论 0 13
  • Xcode8 及iOS10适配问题汇总 上点干货,目前得知的一些bug解决汇总: iOS10相册相机闪退bug h...
    每天刷两次牙阅读 3,567评论 0 5
  • 原文地址:http://www.cnblogs.com/oc-bowen/p/5916630.html 主要为了自...
    今天又要上班吗阅读 5,237评论 1 4

友情链接更多精彩内容