无法打开该文件,因为您没有查看权限 [英] The file couldn’t be opened because you don’t have permission to view it

查看:296
本文介绍了无法打开该文件,因为您没有查看权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

imageData=[NSData dataWithContentsOfURL:self.pdfFileUrl options:NSDataReadingMappedAlways error:&error];
NSLog(@"%@",[error localizedDescription]);
NSLog(@"%@",imageData);

在上面的代码中,我收到错误消息由于您无权查看文件"bg.png",因此无法将其打开."

in above code I get the error "The file "bg.png" couldn’t be opened because you don’t have permission to view it."

我无法将bg.png文件转换为NSData.

I can't convert bg.png file to NSData.

推荐答案

我遇到了同样的问题.我要做的是转到构建选项".然后,我将"C/C ++/Objective-C编译器"的值更改为默认编译器".它对我来说很好

I encountered the same problem. What I did was to go to Build Options. Then I changed the value of the "Compiler for C/C++/Objective-C" to Default Compiler. Its work fine for me

这篇关于无法打开该文件,因为您没有查看权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆