KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
When I try to click the menu action button in QLPreviewController the application crashes. This is what I'm doing in delegate method - (id)previewController:(QLPreviewController *)previewController previewItemAtIndex:(NSInteger)index { NSMutableString*Url = [[NSMutableString alloc] initWithFormat:@"http://10.30.24.21/Documents/abc.doc]; NSURL *fileURL; fileURL = [NSURL URLWithString:Url];// the url of the file which is present in NAS device [Url release]; return fileURL; } This is the crash report 2011-01-11 12:21:36.717 iLink[5548:207] *** Assertion failure in -[UIDocumentInteractionController setURL:], /SourceCache/UIKit_Sim/UIKit-1447.6.4/UIDocumentInteractionController.m:1060 2011-01-11 12:21:36.720 iLink[5548:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UIDocumentInteractionController: invalid scheme https. Only the file scheme is supported.' When I try to preview file present locally menu action button click is not crashing. there I'll be using NSURL *fileURL; fileURL = [NSURL fileURLWithPath:filePath];// filePath is local file path. I understood that when we preview local files ([NSURL fileURLWithPath:filePath]) menu action button click is not crashing ,, when we preview files from server ([NSURL URLWithString:Url]) menu action button click crashes. I have two questions, 1. Can we disable the menu action button? 2. Is there any way to avoid the crash using [NSURL URLWithString:Url]? Thanks
Tags (comma-separated)
Save Edits
Cancel