应用程序:openURL:方法未被调用 [英] application:openURL: method not being called

查看:35
本文介绍了应用程序:openURL:方法未被调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

![在此处输入图片描述][1]我在我的 iOS 应用程序中使用了 url 方案,但是我的:

![enter image description here][1]I am using url schemes in my iOS application, but my:

-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{

没有被调用.我在 info.plist 中设置了 URL 类型并添加了 URL 标识符和 URL 方案.任何想法为什么没有被调用?

is not being called. I've set up URL types in my info.plist and added both a URL identifier and URL schemes. Any ideas why this is not getting called?

推荐答案

我会仔细检查 URL.确认它正在工作的一个好方法是在模拟器上的 Safari 中输入定义的 URL 方案.如果在确定 URL 正确后您的应用没有打开,很可能是您在 info.plist 中配置 URL 方案的方式有问题.

I would double-check the URL. A good way to confirm it's working is to enter the URL scheme defined into Safari on the simulator. If your app isn't opening after you made sure the URL is correct, it's most likely a problem with how you configured the URL scheme in info.plist.

这篇关于应用程序:openURL:方法未被调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆