如何注册应用程序以响应自定义URL方案打开请求?

ope*_*rog 5 iphone ipad ios

像这样:

NSString *stringURL = @"appname://";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];
Run Code Online (Sandbox Code Playgroud)

我稍微记得有必要为Info.plist写一个值键.怎么样?

d.l*_*dev 7

将此添加到plist 截图.

应用程序将由@"readtext://"url调用