title: Handling files opened from outside sources in iOS/Swift
body: <p>I am having trouble with the basic handling of files opened from outside sources in iOS using Swift. I am attempting to export/import data from a custom file type (a simple text file with a custom extension) via email. I am having no problem with exporting the file and sending as an attachment from within the app. I have also been able to associate the filetype with my application by editing the info.plist file. However, I have no idea how/where to implement the function to handle the file once I have chosen to open it with my app. </p>
  
  <p>After doing some searching I have found this tutorial: 
  <a href="https://www.raywenderlich.com/1980/email-tutorial-for-ios-how-to-import-and-export-app-data-via-email-in-your-ios-app" rel="nofollow noreferrer">https://www.raywenderlich.com/1980/email-tutorial-for-ios-how-to-import-and-export-app-data-via-email-in-your-ios-app</a></p>
  
  <p>However, all of the instructions on file handling are presented in Objective C. </p>
  
  <p>Any help with this would be greatly appreciated.</p>