title: How to get attachment's (NSItemProvider) file path in Swift 'Share App Extension'?
body: <p><strong>Note</strong>: I am <strong><em>very new</em></strong> to Swift programming (2 days only) and I am working on this piece of code as part of an <a href="https://electronjs.org/" rel="nofollow noreferrer">ElectronJS</a> project. So please don't mind my ignorance regarding the basics of the language. Thanks.</p>
  
  <p>I have created a Swift app containing a <code>Share App Extension</code>.</p>
  
  <p><strong>Requirements</strong>: </p>
  
  <ol>
  <li><p>The <code>Share App Extension</code> should be able to send the <code>absolute file path</code> of the shared files to the container app, i.e. If the user selects <code>a file (abc.txt) from Desktop</code> in Finder and Shares to my Application, then the Share App Extension should be able to get the file path as </p>
  
  <pre><code>/users/userName/Desktop/abc.txt
  </code></pre>
  
  <p><strong>What I am struggling with here is how to get the file path of the files shared with the Share App Extension. What is the way to get file path of the attachments in <code>NSExtensionItem</code> that is available to the <code>Share App Extension</code> or is it available from some other object ?</strong></p>
  
  <p>(I am able to successfully use <code>App Groups</code> to share data between <code>Share App Extension</code> and the <code>Application</code>)</p></li>
  <li><p>In the final project, the <code>Share App Extension</code> becomes a part of an <a href="https://electronjs.org/" rel="nofollow noreferrer">ElectronJS</a> project as mentioned earlier.</p>
  
  <p><strong>Is there a standard way to share the aforementioned information (file path of the attachments) from the <code>Share App Extension</code> to the main/renderer processes of the Electron application.</strong></p></li>
  </ol>