开发者

can not access e-mail attachment

I used the code below to get the email attachment file url.

NSURL *url=(NSURL*)[launchOptions valueForKey:UIApp开发者_如何学ClicationLaunchOptionsURLKey];

but

bool b=[[NSFileManager defaultManager] fileExists:[url absoluteString];

always returns NO, which means the email attachment file does not exist.

Welcome any comment


Don't you want to use

 bool b=[[NSFileManager defaultManager] fileExists:[url path];

rather than sending the NSURL instance an absoluteString message?


you could not access/Open the attachment in your application but you could open iphone/ipad email client and add an attachment into.

Only the file can be accessed in application which are the part of your application sandbox.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜