Krystian Krystian - 17 days ago 5
iOS Question

How to check if my other apps are installed on iOS 10?

Until iOS 9, we were able to use

canOpenURL
method to check if there are apps who can handle specific URL schemes, thus it was widely used to check if a specific app was installed by user.
Now, since iOS 9, we have to declare upfront the URL Schemes that can be checked by the app. This is cool in general, but it means that for every release of a new app, we would have to update previous apps to be able to check if the new one is installed or not.

Is there any sane way to do it now?
I guess most of the ads and cross promotion services out there relies on this and had to adapt somehow, anyone knows how?

Thanks
Krystian

Answer

Ok, so to recap.

Currently, the only way to handle my scenario, is to assign a specific scheme per app in an orderly fashion, for example:

my.domain.app01
my.domain.app02
...

If you have apps already released, just update them to add a new, additional scheme.

Now in Info.plist file, you will have to add all of your existing and future schemes to LSApplicationQueriesSchemes list in Info.plist. The idea is: even though you have 10 apps released, you add entries for let's say 40. This way, you will not have to update your app to add schemes for future apps, they will already be there and you will be able to detect them.

This of course covers my scenario, where I want to be able to detect my own apps and make use of them.

Remember, that your app can handle more than one scheme, so you can assign the internal scheme + use something better named to allow external access to your app.

Comments