canOpenURL,将网站添加到白名单时遇到问题 [英] canOpenURL, problems adding site to whitelist

查看:205
本文介绍了canOpenURL,将网站添加到白名单时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当前正在更新应用程序并使用Xcode 7.3.该应用程序利用iAd横幅广告和Flurry插页式广告.当iAd横幅广告载入时,我会收到错误消息.

I am currently updating an app and using Xcode 7.3. The app utilizes iAd banner ads and Flurry interstitial ads. When the iAd banner goes to load I get the error.

-canOpenURL: failed for URL: "about:blank" - error: "This app is not allowed to query for scheme about"

横幅广告加载得很好,一切都按计划进行.

The banner loads just fine, and everything works as planned.

在研究此问题时,我发现该方法出于隐私原因而被弃用.但是,我什至在我的任何文件中都找不到它.另外,我已经阅读了有关使用LSApplicaitonQueriesSchemes将网站添加到白名单的信息.我在plist中使用数组中的以下字符串完成了此操作;

In researching this I found the method was deprecated for privacy reasons. However, I can not even find it in any of my files. Also, I have read about adding sites to a whitelist with LSApplicaitonQueriesSchemes. I did this in my plist with the following strings in the array;

about:blank
about
blank

然后读取错误;

-canOpenURL: failed for URL: "about:blank" - error: "(null)"

无论我做什么,我似乎都无法摆脱错误.有人对做什么有任何想法吗?我看到了很多有关社交媒体应用等网址的信息,但没有关于about:blank网址的信息.提前致谢.

I can't seem to get rid of the error no matter what I do. Does anyone have any ideas of what to do? I see a lot of info for urls that go to social media apps and such, but not for the about:blank url. Thanks in advance.

推荐答案

  1. 您只需要将about列入白名单,因为这是正在访问的方案.
  2. 消息-canOpenURL: failed for URL: "about:blank" - error: "(null)"表示您一切正常.当应用程序尝试为列入白名单的方案调用canOpenURL:,但未安装支持给定方案的应用程序时,iOS会记录该参考消息.这是来自iOS的令人困惑的调试消息,可以放心地忽略它.
  1. You only need to whitelist about since that is the scheme being accessed.
  2. The message -canOpenURL: failed for URL: "about:blank" - error: "(null)" means you have everything working. iOS logs that informational message when an app tries to call canOpenURL: for a whitelisted scheme but there is no app installed that supports the given scheme. It's a confusing debug message from iOS that can be safely ignored.

这篇关于canOpenURL,将网站添加到白名单时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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