0

I want to implement deeplinking whereby a user that does not have my app will be brought to the store to install the app, and after install they are taken into a specific part in the app?

The second part is not clear to me - how will user be brought into a specific part of the app after installing and launching it? Does iOS retains the link info?

Boon
  • 40,656
  • 60
  • 209
  • 315

1 Answers1

1

The simple answer to you question is yes you can do those things but no you cannot do them in the way you want. You would not be able to launch to the app store and then once the app is downloaded launch into a specific place in the app. This is mostly due to security.

So let me explain, there is a method that you can call UIApplication.sharedApplication()canOpenURL(url) which will return a Bool on wither or not you app can open a url. If it comes back as false then you can assume the app does not exist on the device and you can call UIApplication.sharedApplication().openURL(url) where your url = NSURL( https://appsto./Path/to/your/app) then "The User" will have to click the download button. Then if they try the action again you can callUIApplication.sharedApplication().openURL(url)withurl = (yourapp://).This will launch your application.

Now for launching to a specific place in you app you will need to setup schemes for your app. There is a decent tutorial on doing that here http://www.brianjcoleman.com/tutorial-deep-linking-in-swift/ and also a short synopsis of what you can do found in another answer to deep linking here Confused with IOS Deep linking

So you can get most of the way there but with Sandboxing you will not be able to launch the store, download the app and launch the app all in one move.

Hope this helps, cheers.

Community
  • 1
  • 1
Dan Leonard
  • 3,325
  • 1
  • 20
  • 32