I'm new in iPhone, I'm trying to open .docx file in UIwebView, I wrote the following code
NSString *urlAddress = [[NSBundle mainBundle] pathForResource:@"Arabic literature"
ofType:@"docx"];
NSURL *url = [NSURL fileURLWithPath:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
NSData *data = [NSData dataWithContentsOfFile:urlAddress];
//[_webView loadRequest:requestObj];
[_webView loadData:data MIMEType:@"application/vnd.ms-word" textEncodingName:@"UTF-8" baseURL:nil];
but it gives me the following exception:
DiskImageCache: Could not resolve the absolute path of the old directory.
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter'
consider that I copied the file "Arabic literature.docx" in Supporting files. how can I solve this exception??