0

I implemented universal links in the app and are working correctly when the app is installed. If the app is not installed, then I see safari is opening and then it is re-directing to AppStore as I had written redirection on the webpage.

But what I actually would like to happen is that it should be directed to the App Store directly without opening safari. As far as I checked the Apple documentation and other forums, it is mentioned that it cannot directly open the AppStore without opening the safari.

But I have seen some Apps like "Calm" opening the AppStore directly when a URL is shared from that app.

So, is there any way to directly open the Appstore with universal links?

Kalyan
  • 263
  • 5
  • 22
  • Have you try this using URL Schema : let urlStr = "itms-apps://itunes.apple.com/app/apple-store/id375380948?mt=8" if #available(iOS 10.0, *) { UIApplication.shared.open(URL(string: urlStr)!, options: [:], completionHandler: nil) } else { UIApplication.shared.openURL(URL(string: urlStr)!) } – Dhaval Raval Nov 08 '19 at 12:07
  • A tip is to use itms:// instead of http://, then it'll open in the app store directly. On the iPhone, it will make 2 (!) redirects when using http, and 1 when using itms. When using the older phobos links (see above), there are 0 redirects. Use the id from iTunes Connect if using phobos links. You can choose to submit an app without including the binary. This way you will get the id before you submit the actual binary. I haven't tried this, but I've heard it works – Dhaval Raval Nov 08 '19 at 12:08
  • Thanks, @DhavalRaval. But the redirection will not happen from the app as the app is not yet installed on the device. When there is no app on the device, the link we click from email or from anywhere should directly open AppStore on the device instead of directing to safari first and then AppStore. – Kalyan Nov 08 '19 at 12:49
  • what do you want? want to open AppStore app from your app or want to open safari first then app store from your app? – Dhaval Raval Nov 08 '19 at 13:03
  • Let's say I had shared a link about a product to users via email. So, when users click that link on mobile, they should be redirected to AppStore when there is no App installed on their device. – Kalyan Nov 08 '19 at 13:16
  • i think your answer is here look into it: https://stackoverflow.com/questions/47434221/universal-link-not-working-if-app-is-not-installed-on-an-ios-device – Dhaval Raval Nov 08 '19 at 13:43

0 Answers0