简体   繁体   中英

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:

在此处输入图片说明

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

below is my plist :

在此处输入图片说明

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?

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:

在此处输入图片说明

Note that this is now what my plist looks like:

在此处输入图片说明

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM