最近学习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

ios UIImageWriteToSavedPhotosAlbum报错 NSPhotoLibraryAddUsageDescription的更多相关文章

  1. [iOS Xcode8报错]dyld: Library not loaded: /System/Library/Frameworks/UserNotifications.framework/UserN

    [iOS Xcode8报错]dyld: Library not loaded: /System/Library/Frameworks/UserNotifications.framework/UserN ...

  2. ios上架报错90080,90087,90209,90125 解决办法

    ERROR ITMS-90087: "Unsupported Architectures. The executable for yht.temp_caseinsensitive_renam ...

  3. iOS CFNetwork报错

    2016-11-16 10:05:35.082 天天送[46197:11758717] 46197: CFNetwork internal error (0xc01a:/BuildRoot/Libra ...

  4. 运行百度语音识别官方iOS demo报错: load offline engine failed: 4001

    运行官方BDVRClientSample这个demo(ios版的),demo可以安到手机上,但是点“识别UI”那个按钮后“授权验证失败”.如果点“语音识别”那个按钮,控制台输出:2015-10-23 ...

  5. [ios] 定位报错Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed. (kCLErrorDomain error 0.)"

    Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed. (kCLErrorDomain error ...

  6. iOS 程序报错:reason: [NSArrayI addObject:]: unrecognized selector sent to instance

    *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI ad ...

  7. iOS 编译报错

    Undefined symbols for architecture i386: “_OBJC_CLASS_$_XXX”, referenced from: objc-class-ref in XXX ...

  8. iOS objc_msgSend 报错解决方案

    错误代码: objc_msgSend(self.beginRefreshingTaget, self.beginRefreshingAction, self); Too many arguments ...

  9. iOS之报错“Cannot create __weak reference in file using manual reference counting”解决办法

    解决的办法:在Build Settings--------->Aplle LLVM8.0 - Language - Objectibe-C------------->Weak Refere ...

随机推荐

  1. jQuery 基础学习笔记总结(一)

    Jquery 学习笔记 总结 感想: 此前在做站点时用到过jquery相关,特别是Ajax相关技术.但是并没有系统的进行学习和了解Jquery的强大的功能,趁这几天跟着资料基本的了解下Jquery的特 ...

  2. 解决Windows平台通过cURL上传APP到蒲公英pgyer平台时无法使用中文升级描述的问题

    解决Windows平台通过cURL上传APP到蒲公英pgyer平台时无法使用中文升级描述的问题 官方上传命令 curl -F file=@"315.apk" -F uKey=XXX ...

  3. route 命令

    Linux系统的route命令用于显示和操作IP路由表(show / manipulate the IP routing table).要实现两个不同的子网之间的通信,需要一台连接两个网络的路由器,或 ...

  4. 从零开始学android -- notification通知

    目前有三种通知 第一种是普通通知 看看效果 布局什么的太简单了我就不放在上面了给你们看核心的代码就行了 里面的   int notificationID = 1; //设置点击通知后的意图 Inten ...

  5. ztreeSearch

    $.fn.extend({ ztreeSearch : function(options) { // var _self=$(this); var defaults = { id : '', sear ...

  6. Tomcat startup.bat启动隐藏弹出的信息窗口

    to make tomcat to use javaw.exe instead of java.exe using some startup parameter or environment vari ...

  7. QQpet exploratory park(DP)

    QQpet exploratory park Today, more and more people begin to raise a QQpet. You can get a lot of plea ...

  8. java web Listener的简单使用案例

    1.web.xml的配置 <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi= ...

  9. MoQ(基于.net3.5,c#3.0的mock框架)简单介绍(转)

    https://www.cnblogs.com/nuaalfm/archive/2009/11/25/1610755.html

  10. Go 学习笔记

    官网: https://golang.org/ 环境: $GOROOT: GOROOT环境变量指定了Go的安装目录. $GOPATH: GOPATH 环境变量指定workspace的目录. 命令行: ...