WCSession - PayloadTooLarge [英] WCSession - PayloadTooLarge
问题描述
Apple 文档显示:
Apple Documentation shows:
PayloadTooLarge
-指示正在发送的项目超出最大大小限制的错误.数据字典和文件都可能发生这种类型的错误.在 watchOS 2.0 及更高版本中可用.
PayloadTooLarge
- An error indicating that the item being sent exceeds the maximum size limit. This type of error can occur for both data dictionaries and files. Available in watchOS 2.0 and later.
有谁知道将数据从手表传输到手机的这两种方法的最大大小限制是多少?:
Does anyone know what the max size limits are for both these methods are for transferring data from the watch to the phone?:
func transferUserInfo(_ userInfo: [String : AnyObject]) -> WCSessionUserInfoTransfer
和
func transferFile(_ file: NSURL,
metadata metadata: [String : AnyObject]?) -> WCSessionFileTransfer
我在任何地方都找不到它的文档.谢谢!
I can't find it documented anywhere. Thanks!
推荐答案
关于 userInfo
Regarding userInfo
转移用户信息:
甚至是并发症信息:
transferCurrentComplicationUserInfo:
transferCurrentComplicationUserInfo:
大小限制(iOS 9)为65.5 kB,同样适用于您可以使用的消息
the size limit (iOS 9) is 65.5 kB, the same for messages you can use with
发送消息:
更新应用程序上下文:
是 262 kB.
关于
传输文件:
ccjensen 的回答是正确的,因为我的经验 没有实际限制 甚至 WCSession 错误代码部分中提到的 Apple doc 文件可能太大:
ccjensen's answer is correct as my experience there is no actual limit even the Apple doc mentioned in the WCSession error code section that the file could be too big:
WCErrorCodePayloadTooLarge 一个错误,表明该项目正在发送超过最大大小限制.这种类型的错误可能发生在数据字典和文件.
WCErrorCodePayloadTooLarge An error indicating that the item being sent exceeds the maximum size limit. This type of error can occur for both data dictionaries and files.
这部分文档不是很清楚,因此您必须在使用前始终检查它.
This part of the documentation is not really clear so you have to check it always before using it.
这篇关于WCSession - PayloadTooLarge的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!