canOpenURL failing for system-wide URL schemes

I'm running iOS 9b5.


In my app, if a device can make a phone call, I want to color the text blue so it looks tappable. If not, I leave it black.


In order to determine the device capabilities, I use:


[[UIApplcation sharedApplication] canOpenURL:@"telprompt://5555555555"]


As we all know, iOS 9 requires we whitelist any URL schemes we'll be using in our app as a privacy measure.


I have this in my Info.plist:


<key>LSApplicationQueriesSchemes</key>
<array>
  <string>telprompt</string>
</array>


No matter what I do, I still get canOpenURL: failed for URL: "telprompt://" - error: "(null)". I've tried tel:// and sms:// and I can't seem to avoid that syslog warning.


Does anybody know of a way to detect whether or not a device can make a phone call wtihout triggering these warnings?

In my experience telprompt works without being whitelisted. From your error it looks like the problem is that you're on a device that doesn't support telprompt (maybe you're on ipad or ipod?). If it's a whitelist issue you should get a proper error:


-canOpenURL: failed for URL: "imdb:" - error: "This app is not allowed to query for scheme imdb"

canOpenURL failing for system-wide URL schemes
 
 
Q