title: Deferred Deep Linking in iOS
body: <p>We're trying to implement deferred deep linking in one of our iOS applications to encourage users to invite their friends to use the app, and reward users based on how many installs occur from their referral link. Basically similar to <a href="https://tapstream.com/developer/deferred-deep-links/" rel="noreferrer">TapStream's product</a>.</p>
  
  <p>Consider this example:</p>
  
  <blockquote>
    <p>So, UserA shares their link, “ourappURL.com/refer?id=userA”, on any
    network they want. UserB clicks that link, which will take them to
    Safari and then bounce them to the App Store page where UserB
    downloads the app. </p>
    
    <p>When UserB opens the app, the app checks which referral ID they came
    in on (if any). In this example, the referral ID would be “userA” as
    that’s the ID that was in the referral link. The app then sends this to
    our servers and we award UserA with a referral credit.</p>
  </blockquote>
  
  <p>I'm trying to break this issue down into its core parts. I believe the first part is getting the web page for the user's referral link to save the referral ID to the device somewhere that the app can access it. But I'm not sure this is possible because of the sandboxed nature of iOS. </p>
  
  <p>I know this is fundamentally possible because many ad providers offer the ability to track installations from an ad campaign (see Mobile App Tracking for example).</p>