title: How to enable open of my own custom file type on iOS
body: <p>I have an iOS app that I want to be able to send and receive instances of its own file type. The flow would be:</p>
  
  <ul>
  <li>User 1 selects a Share function in the app. This generates a file of my type (say, file.myextension) and shares it using a <code>UIActivityViewController</code>. They send it somehow to User 2 (AirDrop, email, whatever).</li>
  <li>User 2 receives the file and opens it. The system offers to open it using my app.</li>
  </ul>
  
  <p>I've got the first part working. I can generate file.myExtension and give the <code>UIActivityViewController</code> a file URL to it. This shows up correctly in AirDrop on user 1's device, and I can transfer the file using AirDrop or email or whatever. But the receiving device refuses to show my app as an option to open the file.</p>
  
  <p>I have tried:</p>
  
  <ul>
  <li>Declaring Exported and Imported UTIs and a Document Type as per <a href="https://developer.apple.com/library/ios/qa/qa1587/_index.html" rel="nofollow noreferrer">this Apple Q&amp;A</a>. I've triple-checked that all the IDs are the same and all the plist keys are spelled correctly.</li>
  <li>I've tried both an Exported and Imported UTI alone (with a Document Type). <a href="https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_declare/understand_utis_declare.html" rel="nofollow noreferrer">This article</a> seems to say that the Imported one is what I want if I want to open a file type. <a href="https://stackoverflow.com/a/34776815/412107">This SO answer</a> says that registering a type I own and want to open means I just want Exported. Neither on its own worked.</li>
  </ul>
  
  <p>My question: what do I have to do to be able to open a file extension that I own on iOS? Do I define both Imported and Exported UTIs, along with a Document Type? Just one of exported or imported? Any unexpected required attributes?</p>