4

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

当我初始化并呈现实例时,我得到的只是一个空白的白色视图。没有导航栏,没有内容……什么都没有。这发生在设备 (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 上提出了这个问题。任何人都知道这是什么或如何解决它?

4

2 回答 2

2

Apple 开发人员技术支持已回复我以下信息:

Safari 视图控制器使用的工具栏类中存在一个错误,如果它或其任何栏按钮具有通过外观代理应用的背景图像,它会导致它连续执行布局(基本上在无限循环中)。

作为一种解决方法,您需要删除代码行或将外观自定义限制为 UIBarButtonItem 包含在您自己的视图控制器中的实例(您可能需要继承 UINavigationController 以便您可以使用 [UIBarButtonItem appearanceWhenContainedIn :])。

于 2015-12-14T10:27:04.657 回答
0

很高兴看到您用于实例化 SFVC 的代码,但尽管如此,请确保您像这样使用 initWithURL:

SFSafariViewController *sfvc = [[SFSafariViewController alloc]initWithURL:URL entersReaderIfAvailable:YES];
于 2016-03-06T02:57:00.020 回答