简体   繁体   English

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

[英]How to register an app to respond to a custom URL scheme opening request?

Like this: 像这样:

NSString *stringURL = @"appname://";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];

I slightly remember it was necessary to write a value-key to Info.plist. 我稍微记得有必要为Info.plist写一个值键。 How? 怎么样?

Add this to plist 将此添加到plist 截图 .

The app will by called by @"readtext://" url 应用程序将由@“readtext://”url调用

This seems to be the question that I answered (with screenshots & source code) here . 这似乎是我在这里回答的问题(截图和源代码)。

在此输入图像描述

And I've posted a full walkthrough of how to do this on my blog . 我已经在我的博客上发布了如何执行此操作的完整演练。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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