问题
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:
- You only need to whitelist
about
since that is the scheme being accessed. - 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 callcanOpenURL:
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