Dynamically Updating LSApplicationQueriesSchemes

Hello, I want to dynamically update the values of the LSApplicationQueriesSchemes key in the info.plist file within this project. Is this possible? What is Apple's stance on this matter in terms of security?

Do you mean update that key via code while your app is installed on the user’s device? That’s not possible. Two issues with that:

  • Your entire app bundle is read-only so you can’t modify Info.plist or any other file at all.
  • LSApplicationQueriesSchemes is thus also read-only because its whole purpose is to minimize abuse of the canOpenURL API. Previously, apps could use it to scrape a list of other apps that are installed on the device. So their stance is: you aren’t allowed to do that any more. The limit of 50 entries is a simple compromise to allow legitimate use of canOpenURL without letting malicious/advertising apps get away with scraping too much information.

What exactly are you trying to accomplish?

Dynamically Updating LSApplicationQueriesSchemes
 
 
Q