Deferred Deep Linking in iOS

后端 未结 4 1837
感动是毒
感动是毒 2020-12-12 13:04

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

4条回答
  •  醉梦人生
    2020-12-12 13:11

    We've successfully used the clipboard (NSPasteboard) to achieve this: the web page that processes the redirect to the app store does a paste to the mobile device's clipboard before letting the user download the app. Once the app is installed, it uses NSPasteboard on first launch to check for an appropriately coded string. This string can contain the text of interest or, more securely, a token used to fetch interesting data from the backend. In Objective C:

    UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
    NSString *pasteboardString = pasteboard.string;
    

    The clipboard can be cleared once the app is done with it, to avoid repeating the same action.

提交回复
热议问题