ios - SFSafariViewController 的问题

标签 ios safari app-transport-security

作为 iOS 9 ATS 更改的一部分,我正在更新一个应用程序以将 SFSafariViewController 用于第三方 http 网站。

当我初始化并呈现实例时,我得到的只是一个空白的白色 View 。没有导航栏,没有内容..什么都没有。这在设备 (iOS 9.1) 和模拟器 (iOS 9.1) 上都会发生。但是在设备上,大约一分钟后我收到以下调试器消息:

Failed to get remote view controller with error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.uikit.viewservice.com.apple.SafariViewService was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid." UserInfo={NSDebugDescription=The connection to service named com.apple.uikit.viewservice.com.apple.SafariViewService was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid.}

应用程序正确包含 SafariServices 框架。我创建了一个测试项目,看看我的 SDK 安装是否有问题,但该项目运行良好。

我已通过 Apple Developer Portal 请求支持,并在 Apple Developer Forums 上提出了这个问题。任何人都知道这是什么或如何解决它?

最佳答案

Apple Developer Technical Support 已回复我以下信息:

There is a bug in the toolbar class used by the Safari View Controller that causes it to continuously perform layout (essentially in an infinite loop) if it or any of its bar buttons have a background image applied via the appearance proxy.

As a workaround, you'll either need to remove the line of code or restrict the appearance customization to instances where the UIBarButtonItem is contained within your own view controller's (you may need to subclass UINavigationController so that you can target your subclass with [UIBarButtonItem appearanceWhenContainedIn:]).

关于ios - SFSafariViewController 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34015649/

相关文章:

ios - 在 App Transport Security 下与用户服务器通信

ios - 分支io更改子域

ios - Xcode 5 - 无法再验证文件

python - Objective-C 数组中的连续数字,如 Python 中的 range()

ios - 通过Safari在iOS上安装ipa

ios - (ATS) 应用程序传输安全 iOS 9

iphone - 如何复制 NSMutableAttributedString

javascript - 如何在 iOS 上的 PWA 中下载本地生成的文本?

ios - WKWebView的网络性能比原生safari慢吗?

ios - 使用自定义加密系统覆盖 ATS 中使用的默认加密系统