title: How to upload large video in iOS?
body: <p>I am working on a project where I have to upload a large video to a server. I tried to hold the video in a variable. I am currently doing it using below code.</p>
  
  <pre><code>NSData *data=[NSData dataWithContentsOfFile:self.path];
  </code></pre>
  
  <p>It works on small video. But my app crashes when the video exceed the size 200-500 MB. I have hold video in a variable to provide upload functionality to different social networking sites and dropbox.</p>
  
  <p>The message I get is Terminated due to Memory Error.</p>
  
  <p>Please advice. How can I achieve this.</p>
  
  <p><strong>Edited</strong></p>
  
  <p>I have to hold video in NSData because I need to upload the video in different social networking sites such as Facebook, Dropbox, Google Drive etc through there API's. There APIs uses NSData for holding the binary data of the video. So I believe I can not use AFNetworking, NSInput Stream or any other mechanism here.</p>