Why does transfer file from WatchApp to companion app does not work always?

139 views Asked by At

I am trying to send the zip file of 40-50MB from watch app to C-App it works sometimes but sometimes it takes lots of time to transfer the file, Every watch has different behavior e.g. Watch 3 transfers 5/10 times, watch 5 or SE works 7/10 times at some instance I am not able to transfer file to C-App at all following is the code I am using to transfer the file.

      let session = WCSession.default
      if session.activationState == .activated {
         session.transferFile(fileToTransfer, metadata: nil)
      }

Thanks for your attention. I’m looking forward to your reply.

1

There are 1 answers

1
Timen On

transferFile(_:metadata:) method to transfer files in the background. background transfers are not delivered immediately.  If you want to send instant message, you can try sendMessage or sendMessageData method.