coder
coder

Reputation: 10530

iOS custom url scheme not opening app Xcode 5

I'm trying to open my app with a custom url scheme, and I can't figure out what's going on. When I type the scheme into Safari on the simulator after running the app, I get the following dialog:

enter image description here

In the Safari bar, I type "mycustomscheme://"

below is my plist :

enter image description here

Edit:

I forgot to method that I also have this method in my AppDelegate.m file:

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
    // Do something with the url here
    DLog(@"here");
    return YES;
}

Am I missing something obvious?

Upvotes: 2

Views: 3325

Answers (2)

coder
coder

Reputation: 10530

Ok I figured it out. I think it may be an Xcode 5 thing? I needed to go the Target -> Info and add a url type. This it what is looks like now:

enter image description here

Note that this is now what my plist looks like:

enter image description here

Oddly enough, there is no entry for the url scheme?

Upvotes: 7

Sujith Thankachan
Sujith Thankachan

Reputation: 3506

Check this link for more information about Custom URL schemes.

You should use the same string that is in the Item 0(mycustomscheme) for the Url identifier's 3d part. In your case it should be look like my.bundle.mycustomscheme

Upvotes: 1

Related Questions