-1

openURL is not working on iOS 9 for system schemes like http, tel, telprompt after compiling via Xcode 7, same code works fine on iOS 8, canOpenURL always returns YES. Any suggestions? Thank you!

NSURL *testURL = [NSURL URLWithString:@"http://www.apple.com"];

if ([[UIApplication sharedApplication] canOpenURL:testURL]) {

   NSLog(@"canOpenURL");

   [[UIApplication sharedApplication] openURL:testURL];
}
rmaddy
  • 314,917
  • 42
  • 532
  • 579
instback
  • 131
  • 2
  • 15

1 Answers1

2

You need to specify the schemes you open in your info.plist.

The key is LSApplicationQueriesSchemes and is an array of scheme names. Case matters, so match whatever you do in your code.

Avi
  • 7,469
  • 2
  • 21
  • 22