iOS 9: -canOpenURL: failed for URL #22

AppAvailability Bug

appAvailability.checkreturns alway error callback.

iOS 9 Error in Xcode

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

Explanation

Apple changed thecanOpenURLmethod on iOS 9. Apps which are checking for URL Schemes have to declare these Schemes as it is submitted to Apple. The articleQuick Take on iOS 9 URL Scheme Changesexpains the changes in detail.

Solution: Add URL Schemes to the Whitelist

Simply open your app's .plist (usuallyplatforms/ios//-Info.plist)with an editor and add the following code with your needed Schemes.

iOS 9: -canOpenURL: failed for URL #22_第1张图片

eg:


iOS 9: -canOpenURL: failed for URL #22_第2张图片

你可能感兴趣的:(iOS 9: -canOpenURL: failed for URL #22)