5

![enter image description here][1]I am using url schemes in my iOS application, but my:

-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{

is not being called. I've set up URL types in my info.plist and added both a URL identifier and URL schemes. Any ideas why this is not getting called?

George99999
  • 53
  • 1
  • 9

1 Answers1

4

I would double-check the URL. A good way to confirm it's working is to enter the URL scheme defined into Safari on the simulator. If your app isn't opening after you made sure the URL is correct, it's most likely a problem with how you configured the URL scheme in info.plist.

colinrf
  • 253
  • 1
  • 6
  • the method gets called when i enter the url into safari, is this correct it should only get called at this point? – George99999 May 20 '15 at 13:25
  • If the method is called when you enter the URL into Safari your scheme is correct. However this tells me that the URL in code is incorrect. I would check the value of the NSURL you're passing into [[UIApplication sharedApplication] openURL:] – colinrf May 20 '15 at 13:32