Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I redirect to the Apple App Store with a deep link? (e.g. a query string)

I need to have an iOS user, who doesn't have my app installed, to download, then automatically navigate to a portion within my app.

Related, is this question, but I am not exclusively reliant on Google's SDK. I can use anything.

How can I

  • Link a user to my app on the app store AND
  • Have information (a query string) sent to my app on first launch
like image 735
makerofthings7 Avatar asked Oct 06 '15 16:10

makerofthings7


1 Answers

With deeplinks you have a link that is passed to the App whether it is installed or not. There are a lot of posts out there about setting them up but here is a quick overview.

First you need to configure your App to handle them in the .plist file. Here is a post for that:

https://blog.branch.io/how-to-setup-universal-links-to-deep-link-on-apple-ios-9

You can either use a tool like branch.io or set up a redirection page on your own website with an SSL certificate since it requires https. (there is information in the link above, or here is some information from Apple)

When your App is called by the deeplink (whether it is installed or not) the - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation method is called in AppDelegate.m and the information you are passing is in the url parameter.

Here is a good post about setting them up.

http://blog.originate.com/blog/2014/04/22/deeplinking-in-ios/

like image 68
dstudeba Avatar answered Oct 04 '22 01:10

dstudeba