title: Read .p12 file with obj-c code
body: <p>I was trying to read <code>.p12</code> file with the following code. It works.</p>
  
  <pre><code>NSString *path = [[NSBundle mainBundle] pathForResource:@"abc" ofType:@"p12"];
  NSData *ABCdata = [NSData dataWithContentsOfFile:path];
  </code></pre>
  
  <blockquote>
    <p>path : /var/mobile/Containers/Data/Application/xxx/Documents/abc.p12</p>
  </blockquote>
  
  <p>But if I try to  read 1 file from Email Attachment in Email App, the response is null. I got this path from Share Extension.</p>
  
  <pre><code>NSData *ABCdata = [NSData dataWithContentsOfFile:pathFromEmail];
  </code></pre>
  
  <blockquote>
    <p>pathFromEmail :
    file:///var/mobile/Library/Mail/IMAP-xxx@gmail.com@imap.gmail.com/INBOX.imapmbox/Attachments/508/2/abc.p12</p>
  </blockquote>
  
  <p>I searched in google and read documents from apple but can't find any solution for it :( . Maybe my app doesn't have permission to read that file ?</p>