iOS 9 当我尝试打开某些应用程序时出现问题
Issue in iOS 9 when I try to open some application
我的应用程序是在 Objective-C 运行 iOS 9 上开发的,在更新到 9.0.2 之前,我的应用程序运行正常。
更新 20/10
我试了很多次,还是不行,
我需要打电话给 url:
cielomobile://pagar?urlCallback=appcliente://retornopagamento
但我不在收到消息:
- error: "This app is not allowed to query for scheme cielomobile
这是我的 info.plist:
怎么了?
您需要使用 URL 方案。尝试加载 URL fb://
并观看 facebook 打开或 tel://
并观看 phone 应用程序打开。
App2 需要在其 info.plist
中分配 URL Scheme
http://www.idev101.com/code/Objective-C/custom_url_schemes.html
然后,如果您是 iOS9+,请在 info.plist 中添加以下字典:
出于安全原因,Apple 在 iOS 9 中对 URL 方案的处理进行了一些更改:
http://awkwardhare.com/post/121196006730/quick-take-on-ios-9-url-scheme-changes
如果您调用 canOpenURL
来检查是否存在其他应用程序,从 iOS9 开始,您需要提供应用程序期望的 URL 白名单查询:
"Up until iOS 9, apps have been able to call these methods (openURL
and canOpenURL
) on any
arbitrary URLs. Starting on iOS 9, apps will have to declare what URL
schemes they would like to be able to check for and open in the
configuration files of the app as it is submitted to Apple. This is
essentially a whitelist that can only be changed or added to by
submitting an update to Apple."
尝试将此添加到您的 info.plist:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>cielomobile</string>
</array>
我的应用程序是在 Objective-C 运行 iOS 9 上开发的,在更新到 9.0.2 之前,我的应用程序运行正常。
更新 20/10
我试了很多次,还是不行, 我需要打电话给 url:
cielomobile://pagar?urlCallback=appcliente://retornopagamento
但我不在收到消息:
- error: "This app is not allowed to query for scheme cielomobile
这是我的 info.plist:
怎么了?
您需要使用 URL 方案。尝试加载 URL fb://
并观看 facebook 打开或 tel://
并观看 phone 应用程序打开。
App2 需要在其 info.plist
URL Scheme
http://www.idev101.com/code/Objective-C/custom_url_schemes.html
然后,如果您是 iOS9+,请在 info.plist 中添加以下字典:
出于安全原因,Apple 在 iOS 9 中对 URL 方案的处理进行了一些更改:
http://awkwardhare.com/post/121196006730/quick-take-on-ios-9-url-scheme-changes
如果您调用 canOpenURL
来检查是否存在其他应用程序,从 iOS9 开始,您需要提供应用程序期望的 URL 白名单查询:
"Up until iOS 9, apps have been able to call these methods (
openURL
andcanOpenURL
) on any arbitrary URLs. Starting on iOS 9, apps will have to declare what URL schemes they would like to be able to check for and open in the configuration files of the app as it is submitted to Apple. This is essentially a whitelist that can only be changed or added to by submitting an update to Apple."
尝试将此添加到您的 info.plist:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>cielomobile</string>
</array>