排查用 Xamarin 构建的 tvOS 10 应用的问题Troubleshooting tvOS 10 Apps Built With Xamarin

以下部分列出了在 Xamarin 中使用 tvOS 10 时可能出现的一些已知问题,以及针对这些问题的解决方案:The following sections list some known issues that can occur when using tvOS 10 with Xamarin and the solution to those issues:

App StoreApp Store

已知问题:Known Issues:

  • 在沙盒环境中测试应用内购买时,身份验证对话框可能出现两次。When testing In-App Purchases in the sandbox environment, the authentication dialog may appear twice.
  • 在沙盒环境中测试应用内购买的托管内容时,每次将应用程序置于前台时都会显示密码对话框,直到内容下载完成。When testing In-App Purchases with hosted content in the sandbox environment, the password dialog will appear every time the app is brought to the foreground until the content download completes.

二进制兼容性Binary Compatibility

已知问题:Known Issues:

  • 调用 NSObject.ValueForKeynull 会导致异常。Calling NSObject.ValueForKey will a null key will result in an exception.
  • 调用 UIFont.WithName 时,按名称引用字体将导致崩溃。Referencing a font by name when calling UIFont.WithName will cause a crash.
  • http:// Url 的 TLS 握手期间,NSURLSessionNSURLConnection 不再有 RC4 密码套件。Both NSURLSession and NSURLConnection no longer RC4 cipher suites during the TLS handshake for http:// URLs.
  • 如果应用在 ViewWillLayoutSubviewsLayoutSubviews 方法中修改 superview 的几何,应用可能会挂起。Apps can hang if they modify a superview's geometry in either the ViewWillLayoutSubviews or LayoutSubviews methods.
  • 对于所有 SSL/TLS 连接,默认情况下,RC4 对称密码处于禁用状态。For all SSL/TLS connections, the RC4 symmetric cipher is now disabled by default. 此外,安全传输 API 不再支持 SSLv3,建议应用程序尽快停止使用 SHA-1 和3DES 加密。Additionally, the Secure Transport API no longer supports SSLv3 and it is recommended that the app stop using SHA-1 and 3DES cryptography as soon as possible.

CFNetwork HTTP 协议CFNetwork HTTP Protocol

NSMutableURLRequest 类的 HTTPBodyStream 属性必须设置为未打开的流,因为 NSURLConnectionNSURLSession 现在严格强制实施此要求。The HTTPBodyStream property of the NSMutableURLRequest class must be set to an unopened stream since NSURLConnection and NSURLSession now strictly enforce this requirement.

CloudKitCloudKit

长时间运行的操作将返回 "您没有保存文件的权限"。Long running operations will return a "You don't have permission to save the file." 条.error.

核心映像Core Image

CIImageProcessor API 现在支持任意输入图像计数。The CIImageProcessor API now supports an arbitrary input image count. tvOS 10 beta 1 中包含的 CIImageProcessor API 将被删除。CIImageProcessor API that was included in tvOS 10 beta 1 will be removed.

NSUserActivityNSUserActivity

在提交操作之后,NSUserActivity 对象的 UserInfo 属性可能为空。After a Handoff operation, the UserInfo property of a NSUserActivity object might be empty. 作为当前的解决方法,显式调用 BecomeCurrent NSUserActivity "对象。Explicitly call BecomeCurrent NSUserActivity` object as a current workaround.

UIKitUIKit

已知问题:Known Issues:

  • UINavigationBarUITabBarUIToolBar 的背景外观的更改可能会导致布局传递以解析新的外观。Changes to the background appearance of UINavigationBar, UITabBar or UIToolBar may result in a layout pass to resolve the new appearance. 如果尝试在 LayoutSubviewsUpdateConstraintsWillLayoutSubviewsDidUpdateSubviews 事件内修改这些外观,可能会导致无限布局循环。Attempting to modify these appearances inside of a LayoutSubviews, UpdateConstraints, WillLayoutSubviews or DidUpdateSubviews event can result in an infinite layout loop.
  • 在 tvOS 10 中,调用 UIView 对象的 RemoveGestureRecognizer 方法会显式取消任何正在进行的笔势识别器。In tvOS 10, calling the RemoveGestureRecognizer method of a UIView object explicitly cancels any in-progress Gesture Recognizer.
  • 呈现的视图控制器现在会影响状态栏的外观。Presented View Controllers can now affect the appearance of the status bar.
  • tvOS 10 要求开发人员在 UIViewController 和重写 AwakeFromNib 方法时调用 base.AwakeFromNibtvOS 10 requires the developer to call base.AwakeFromNib when subclassing UIViewController and overriding the AwakeFromNib method.
  • 使用自定义 UIView 子类覆盖 LayoutSubviews 并在调用 base.LayoutSubviews 之前更新布局的应用程序可能会在 tvOS 10 中触发无限布局循环。Apps with custom UIView subclasses that override LayoutSubviews and dirty the layout before calling base.LayoutSubviews may trigger an infinite layout loop in tvOS 10.
  • 指定到 UIButton 对象时,方向特定或 flippable 图像资产不进行翻转。Direction-specific or flippable images assets are no flipping when assigned to UIButton objects.