title: Why can't app access another app's document folder?
body: <p>We are trying to use inter-app communication for two application and trying to send the file path from one application to another application and the problem is that if i pass any text via sender application to receiver then it works well but if i try to pass the file document path then it doesn't works 
   here is my code for sender </p>
  
  <pre><code>-(IBAction) openReceiverApp:(id)sender {
  // Opens the Receiver app if installed, otherwise displays an error
  
  UIApplication *ourApplication = [UIApplication sharedApplication];
  NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
  NSString *documentsDirectory = [paths objectAtIndex:0];
  NSString *filePath = [NSString stringWithFormat:@"%@/%@", documentsDirectory, @"ads.rtf"];
  NSLog(@"filePath %@", filePath);
  //  NSString *URLEncodedText = [self.textBox.text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
   NSString *URLEncodedText = [filePath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
  NSString *ourPath = [@"readtext://" stringByAppendingString:URLEncodedText];
  
  NSLog(@"%@",ourPath);
  
  NSURL *ourURL = [NSURL URLWithString:ourPath];
  if ([ourApplication canOpenURL:ourURL]) {
      [ourApplication openURL:ourURL];
  }
  else {
      //Display error
      UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Receiver Not Found" message:@"The Receiver App is not installed. It must be installed to send text." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
      [alertView show];
  }
  </code></pre>
  
  <p>In receiver side i have written this code</p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
  // Display text
  UIAlertView *alertView;
  NSString *text = [[url host]stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
  alertView = [[UIAlertView alloc] initWithTitle:@"Text" message:text delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
  [alertView show];
  
  return YES;
  </code></pre>
  
  <p>am i going wrong anywhere??
  Thanks in advance....</p>