美文网首页
iOS11 NSPhotoLibraryAddUsageDesc

iOS11 NSPhotoLibraryAddUsageDesc

作者: 郭宝权 | 来源:发表于2017-06-09 09:48 被阅读0次

在iOS11中,app保存图片到用户相册时必须添加权限使用描述即NSPhotoLibraryAddUsageDescription,否则会闪退。

只需在info.plist—Property List文件中添加以下键值对即可,描述文字可以随便填但是必须不为空。

Privacy - Photo Library Additions Usage Description

或者在info.plist —Source Code中添加:

    <key>NSPhotoLibraryAddUsageDescription</key>
    <string>App需要您的同意,才能保存图片到您的相册</string>

相关文章

网友评论

      本文标题:iOS11 NSPhotoLibraryAddUsageDesc

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