canOpenURL, problems adding site to whitelist

南笙酒味 提交于 2019-12-12 17:41:33

问题


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.

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

The error then reads;

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

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:


  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.


来源:https://stackoverflow.com/questions/36665446/canopenurl-problems-adding-site-to-whitelist

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!