-canOpenURL: failed for URL: "itms-books://" - error: "This app is not allowed to query for scheme itms-books"
-canOpenURL: failed for URL: "itms-books://" - error: "This app is not allowed to query for scheme itms-books"
我刚入手xcode7稳定版。在我当前的项目中,我正在从网络服务下载图像。在 xcode 中,6.4 运行良好。现在它不显示任何图像并在日志中显示警告
-canOpenURL: failed for URL: "itms-books://" - error: "This app is not allowed to query for scheme itms-books"
App Transport Security has blocked a cleartext HTTP (http://) resource
load since it is insecure. Temporary exceptions can be configured via
your app's Info.plist file.
我发现我的问题是在 info.plist 文件中添加了密钥。
添加字典 NSAppTransportSecurity -> 在项目的 info.plist 文件中添加新的布尔键名称 NSAllowsArbitraryLoads。
您可能还需要向 plist 添加另一个名为 LSApplicationQueriesSchemes 的键(类型数组)
并将 'itms-books' 方案作为字符串项添加到它,以允许 canOpenURL 对其进行测试。
这是 Apple 在 iOS 9.
中构建的任何应用程序上实施的一项新的强制安全措施
到目前为止,唯一的解决方案是在 info.plist 文件中添加一个条目,其中包含密钥 LSApplicationQueriesSchemes 并添加 "itms-books" 和您的应用程序将链接到的任何其他 url 方案在这个数组中。
苹果此举的主要解释是,一些应用程序曾利用 canOpenURL 的功能:扫描安装在您 phone 中的应用程序的方法,以使用选择性广告或其他 "not so benevolent"动机。
请记住,您可以注册的应用数量上限为 50。
我刚入手xcode7稳定版。在我当前的项目中,我正在从网络服务下载图像。在 xcode 中,6.4 运行良好。现在它不显示任何图像并在日志中显示警告
-canOpenURL: failed for URL: "itms-books://" - error: "This app is not allowed to query for scheme itms-books"
App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
我发现我的问题是在 info.plist 文件中添加了密钥。
添加字典 NSAppTransportSecurity -> 在项目的 info.plist 文件中添加新的布尔键名称 NSAllowsArbitraryLoads。
您可能还需要向 plist 添加另一个名为 LSApplicationQueriesSchemes 的键(类型数组) 并将 'itms-books' 方案作为字符串项添加到它,以允许 canOpenURL 对其进行测试。
这是 Apple 在 iOS 9.
中构建的任何应用程序上实施的一项新的强制安全措施到目前为止,唯一的解决方案是在 info.plist 文件中添加一个条目,其中包含密钥 LSApplicationQueriesSchemes 并添加 "itms-books" 和您的应用程序将链接到的任何其他 url 方案在这个数组中。
苹果此举的主要解释是,一些应用程序曾利用 canOpenURL 的功能:扫描安装在您 phone 中的应用程序的方法,以使用选择性广告或其他 "not so benevolent"动机。
请记住,您可以注册的应用数量上限为 50。