iosswifturl-scheme

iOS 16+ Querying URL schemes


I make an app for iOS 16 to customize Homescreen icons, and looking for a way to determine if a 3rd-party app is installed on device.

There is a function to do that - UIApplication method canOpenURL(_:). You need to pass an url scheme of an app you want to check to canOpenURL(_:) and if it returns true, it means the app is installed on device.

As documentation says, all queried url schemes must be listed in Info.plist file under key LSApplicationQueriesSchemes. Also, documentation warnings you that since iOS 15 the number of listed url schemes is limited to 50.

What I tried

There is a limit for 50 entries, when I query an 51-st url scheme, I receive an error message "This app is not allowed to query for scheme", as expected. But, there is some customizing apps(like Photowidget) with huge (far more than 50) LSApplicationQueriesSchemes list, which clearly have a way to detect if apps installed.

Question

Is there a way to escape this limitation, or is there some other way to detect if app is installed on current device?


Solution

  • It seems that on iOS 16 it's not possible to check installed status for more than 50 3rd-party applications.

    My assumption "There must be a way to bypass the 50-apps restriction because there is some app(like Photowidget) which somehow do that" was wrong, they are not. To confirm that, I experimented with Photowidget: I have installed some apps which is positioning before and after 50st entry in this list. And as it should be, apps #2, #49 was marked as installed, and apps #56, #59, #61 is not.