Domanda

Is it possible to retrieve the name of the app which will handle a specific URL?

In other apps I saw "Open Link in Safari" and if you click, YouTube or whatever else will launch. I don't really like this behavior and I'd like the get the corresponding app name before calling

[[UIApplication sharedApplication] openURL:[NSURL someURL]];

to set the right button title.

È stato utile?

Soluzione

No, that's not possible with the official SDK.

If you really want that you could create a file/database with the most common URL schemes on iOS (check this), then ship your app with it.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top