title: iPhone- application crashes on click of menu action button in QLPreviewController ios 4.2
body: <pre><code> When I try to click the menu action button in QLPreviewController the application crashes.
  </code></pre>
  
  <p>This is what I'm doing in delegate method</p>
  
  <pre><code>- (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;
  }
  </code></pre>
  
  <p>This is the crash report</p>
  
  <pre><code>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.'
  </code></pre>
  
  <p>When I try to preview file present locally menu action button click is not crashing.</p>
  
  <p>there I'll be using</p>
  
  <pre><code> NSURL *fileURL;
      fileURL = [NSURL fileURLWithPath:filePath];// filePath is local file path.
  </code></pre>
  
  <p>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.</p>
  
  <p>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]?</p>
  
  <p>Thanks</p>