5

I am working in a Microsoft SharePoint Mobile Application and I need to complete a POC using JavaScript which involves me to detect a IOS app if installed for which I need to trigger the app otherwise I need to navigate to the app store. I need to accomplish this is the mobile device's Safari browser. I have implemented the solution using the suggestions used in Is it possible to register a http+domain-based URL Scheme for iPhone apps, like YouTube and Maps?

However, the problem I am facing is that although this detects the app the timeout code is not killed which triggers the navigation to the app store. My client needs the behaviour to not navigate to the app store if the app already exists. I am using the IOS latest version 10.2. I am new to the Mobile App domain and I am struggling to find a solution for this issue. Any help from the experts will be hugely appreciated.

Community
  • 1
  • 1
  • 1
    Possible duplicate of [redirect to application if installed, otherwise to appstore](http://stackoverflow.com/questions/14048159/redirect-to-application-if-installed-otherwise-to-appstore) – ZP Baloch Jan 18 '17 at 12:28
  • You can find your answer right [here](http://stackoverflow.com/questions/13044805/how-to-check-if-an-app-is-installed-from-a-web-page-on-an-iphone) – Mubasher Khan Jan 18 '17 at 12:29
  • @MubasherKhan..I tried the suggestion...It is triggering App store link only and the not the app. Please note that the App is installed already in my device. Also I am using IOS 10.2 – Nilanjan Dutta Jan 18 '17 at 13:12

1 Answers1

8

Apple changed in iOS 9.2 on purpose to drive adoption of Universal Links. You'll need to implement those instead.

The best option is to use a service like Branch.io (full disclosure: I'm on the Branch team) or Firebase Dynamic Links for this.

Alex Bauer
  • 13,147
  • 1
  • 27
  • 44
  • This has been the most useful link I have found. I will look into it in more details – Nilanjan Dutta Jan 19 '17 at 15:47
  • I am using some public apps to do the exercise. Will Branch.io support already published apps(e.g.:- Facebook, Twitter,etc.)? – Nilanjan Dutta Jan 19 '17 at 16:04
  • Unfortunately no, and there is no good way to do this from Safari. Apple limits this for privacy reasons (it would be bad if you could 'detect' a list of installed apps via a website). With Universal Links, the intention is it should be up to Twitter/Facebook, etc., to determine if their app opens or not when you trigger a link to their service. That obviously doesn't work everywhere though... – Alex Bauer Jan 19 '17 at 21:06
  • Thank you so much for the reply. So this means we will not be able to launch app and app store conditionally for any 3rd part apps in IOS 9.2 onwards? This sounds like a dead end for my POC. It would be very helpful if you can suggest any alternative approach I can try – Nilanjan Dutta Jan 20 '17 at 14:35
  • That is correct, to the best of my knowledge. Sorry not to have better news! – Alex Bauer Jan 20 '17 at 15:06