title: Objective C: Send log file with UIActivityController
body: <p>I'm trying to send a log file from my App. When I try to send it, I only receive a text file with the path to the file. The path is correct, in my code I additionally check for the existence of the file.</p>
  <pre><code>NSString *logFile = @&quot;/path/to/file/log.txt&quot;;
  NSArray *dataToShare = @[logFile];
  
  UIActivityViewController *viewController = [[UIActivityViewController alloc] initWithActivityItems: dataToShare applicationActivities: nil];
  if(viewController == nil) return;
  dispatch_async(dispatch_get_main_queue(), ^{
      [self presentViewController:viewController animated:YES completion: nil];
  });
  </code></pre>
  <p>In the first step, I want to send a single file. Later I want to be able to send the whole folder. I used the same procedure in Swift, which is working great. However I can not make it work in ObjC.</p>
  <p>Same subject here, unfortunately without an solution.</p>
  <p><a href="https://stackoverflow.com/questions/22076863/how-to-share-a-text-file-with-uiactivityviewcontroller">How to share a text file with UIActivityViewController</a></p>