Hello,
I am trying to send data from a Watch App to an iOS companion app.
However when I call:
WCSession.default.transferFile(file, metadata: [fileName:fileName])
nothing seems to happen, since
func session(
_ session: WCSession,
didFinish fileTransfer: WCSessionFileTransfer,
error: Error?
)
is never called on the delegate.
I have done all the necessary linking between the two apps, activated the WCSession.default and set the delegate in both, etc. I confirm the setup is correct by doing this series of checks before invoking the transferFile function:
func canSendMessages() -> Bool {
/*
We can only send messages if the WatchConnectivity Session is activated and the companion app to this app is installed
*/
if WCSession.default.activationState != .activated {
return false
}
#if os(iOS)
if !WCSession.default.isWatchAppInstalled {
return false
}
#else
if !WCSession.default.isCompanionAppInstalled {
return false
}
#endif
return true
}
Has anyone run into this before / have suggestions to unblock?
Using watchOS 9.4