Epic: brightdigit/AtLeast#182
Add both queued WatchConnectivity transports end-to-end in Sources/SundialKitConnectivity. transferUserInfo is the queued dictionary transport; transferFile is the queued binary partner (encoded Data written to a temp file). One .queued SendOptions flag selects between them based on whether the message is BinaryMessagable.
⚠️ Adding methods to ConnectivitySession / ConnectivitySessionDelegate is a breaking protocol change — every conformer (observer, manager, test mocks in both packages) must implement them.
Tasks
Notes
- File-lifetime gotcha: the received
WCSessionFile is deleted as soon as didReceive file: returns — the synchronous read is mandatory.
- The binary type footer (
BinaryMessageEncoder) is embedded in the Data, so transferFile metadata is not needed for type resolution — keep it optional (parity with sendMessageData).
Foundation for brightdigit/SundialKitStream routing and the Sundial example demo.
Epic: brightdigit/AtLeast#182
Add both queued WatchConnectivity transports end-to-end in
Sources/SundialKitConnectivity.transferUserInfois the queued dictionary transport;transferFileis the queued binary partner (encodedDatawritten to a temp file). One.queuedSendOptionsflag selects between them based on whether the message isBinaryMessagable.Tasks
ConnectivitySession.swift— addfunc transferUserInfo(_ userInfo: ConnectivityMessage)andfunc transferFile(_ fileURL: URL, metadata: ConnectivityMessage?).WatchConnectivitySession+ConnectivitySession.swift— implement viasession.transferUserInfo(_:)andsession.transferFile(_:metadata:)(ignore returned transfer handles for now).WatchConnectivitySession+WCSessionDelegate.swift— add receive delegates:didReceiveUserInfo:→ forward asConnectivityMessage.didReceive file: WCSessionFile→ readfile.fileURLintoDatasynchronously (WC deletes the file once this returns), then forwardData+ metadata.ConnectivitySessionDelegate.swift— adddidReceiveUserInfo:anddidReceiveFile fileData: Data, metadata:. The file method carriesData, notURL, by design (symmetry withsendMessageData, sidesteps file-lifetime).NeverConnectivitySession.swift— stub both as no-ops.ConnectivityDelegateHandling.swift— addhandleUserInfoReceived(_:)+handleFileReceived(_:metadata:)requirements and bridge methods.SendOptions.swift— addstatic let queued(one flag; dict → userInfo, binary → file). Default behavior unchanged.MessageTransport.swift/ConnectivitySendResult.context— add.userInfoand.filecases for result reporting.Notes
WCSessionFileis deleted as soon asdidReceive file:returns — the synchronous read is mandatory.BinaryMessageEncoder) is embedded in theData, sotransferFilemetadatais not needed for type resolution — keep it optional (parity withsendMessageData).Foundation for brightdigit/SundialKitStream routing and the Sundial example demo.