2

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?

2 Answers 2

7

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?

Sign up to request clarification or add additional context in comments.

3 Comments

After you add this, look back to your info.plist. It actually adds a similar property as in your first post. Check against the new one against your previous one to see what you did wrong.
View as source code ;) Clarification - find your info.plist in the project viewer and view it as source code
Yes but it should include the URL Types property
1

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

5 Comments

thanks, but I actually already have that method in my Appdelegate file. I don't think that matters anyhow. I just want to open the app - no other info is getting passed.
I don't think that's true according to the tutorial you reference
Have you tried this? I have checked it in my app and tried it in your way. I got the same error as in yours. Then done in this way. It worked.
Check this link also
I did try it that way, and it still didn't work :( I don't understand what's going on

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.