WCSession:是否可以取消排队的消息?
WCSession: is it possible to cancel queued message?
有没有办法取消WCSession
的sendMessage(_:replyHandler:errorHandler:)
方法发送的消息?
Messages are queued serially and delivered in the order in which you sent them.
没有。这种类型的转移是不可取消的,因为
OS 会立即将任何 sendMessage
数据发送给 reachable
对方
Use the [sendMessage] method to transfer data to a reachable counterpart. These methods are intended for immediate communication between your iOS app and WatchKit extension.
Data sent using the [sendMessage], and transferCurrentComplicationUserInfo:
methods has a higher priority and is transmitted right away.
OS 没有提供专门取消消息的机制
唯一具有 cancel
方法的 WCSession
对象是 WCSessionUserInfoTransfer
和 WCSessionFileTransfer
,因为优先级较低的 transferUserInfo
或 transferFile
数据不会立即发送,而是在 OS.
确定的最佳时间发送
有没有办法取消WCSession
的sendMessage(_:replyHandler:errorHandler:)
方法发送的消息?
Messages are queued serially and delivered in the order in which you sent them.
没有。这种类型的转移是不可取消的,因为
OS 会立即将任何
sendMessage
数据发送给reachable
对方Use the [sendMessage] method to transfer data to a reachable counterpart. These methods are intended for immediate communication between your iOS app and WatchKit extension.
Data sent using the [sendMessage], and
transferCurrentComplicationUserInfo:
methods has a higher priority and is transmitted right away.OS 没有提供专门取消消息的机制
唯一具有
cancel
方法的WCSession
对象是WCSessionUserInfoTransfer
和WCSessionFileTransfer
,因为优先级较低的transferUserInfo
或transferFile
数据不会立即发送,而是在 OS. 确定的最佳时间发送