zoukankan      html  css  js  c++  java
  • ios UIImageWriteToSavedPhotosAlbum报错 NSPhotoLibraryAddUsageDescription

    最近学习IOS相关知识. 视频课程[UIImage](https://www.imooc.com/video/12718)  

    相关知识点: 存储一张本地图片到系统相册中.  

    API: UIImageWriteToSavedPhotosAlbum

    按照视频教程Dome中书写代码, 启动报错如下:

    [access] This app has crashed because it attempted to access privacy-sensitive data without a usage description.  The app's Info.plist must contain an NSPhotoLibraryAddUsageDescription key with a string value explaining to the user how the app uses this data.

       

     

    按照如上所述. 需要向info.plist中添加相关描述文字.

    打开 Info.plist, 添加对应配置NSPhotoLibraryAddUsageDescription, type默认string, value填写: 界面提示文字.

     

    效果如下:

     

    模拟器 8p / 11.4

    另:

    参考链接:  http://www.cnblogs.com/KiVen2015/p/6627253.html 

  • 相关阅读:
    C# 重载,重写,代理,枚举实例
    关于C#7 新语法糖
    关于C# 异步
    经验
    C# 后台模块 Word 模板操作
    .Net 图片生成水印
    .Net XML操作
    .Net web 关于表单标题
    分页存储过程
    python 爬虫 猫眼视频榜单top100
  • 原文地址:https://www.cnblogs.com/dfyg-xiaoxiao/p/9576370.html
Copyright © 2011-2022 走看看