title: iOS - How to send file from one app to other specific app
body: <p>I want to send <code>.pdf</code> or image file from my app1 to app2 like <a href="https://www.instagram.com/developer/mobile-sharing/iphone-hooks/" rel="nofollow noreferrer">instagram hooks</a>. I don't want to show options. I want to send the file directly from app1 to app2 if app2 is installed.</p>
  
  <p>At first I tried using custom URL schemes by modifiying <a href="https://code.tutsplus.com/tutorials/ios-sdk-working-with-url-schemes--mobile-6629" rel="nofollow noreferrer">this example</a>. It is good for sending some strings but I couldn't find I way to send files with custom URLs. I've tried to encode file to <code>base64</code> string and appending to URL. It didn't work. URL becomes broken.</p>
  
  <p>Then I searched for implementing <a href="https://developer.apple.com/reference/uikit/uidocumentinteractioncontroller/1616802-uti" rel="nofollow noreferrer">UIDocumentInteractionController Uti</a> as <code>Instagram</code> and <code>WhatsApp</code> does. But I couldn't find any sufficient examples. This is the right way I guess but there isn't much information to go on.</p>
  
  <p>How could I achieve this with the methods mentioned above? (App groups, keychain, pasteboard are not good options for me)</p>