iosswiftwatchoswatchconnectivitywcsession

Is it possible to transfer audio files from iPhone to Apple Watch using transferFile in swift?


I want to transfer both audio files and a zip file (as large as 30MB) from iPhone to Apple Watch.

I’ve used transferFile method (https://developer.apple.com/documentation/watchconnectivity/wcsession/1615667-transferfile) to send them but the counterpart (watch) did not receive anything nor did the app (ios) call its call back function (https://developer.apple.com/documentation/watchconnectivity/wcsessiondelegate/1615668-session)

To sum up, my question is whether “transferFile” method allows to send audio or/and zip files. If not, what could be a workaround?

Thanks in advance!


Solution

  • As of my knowledge, the file you are trying to send must readable by an application ,your application may be not able to read ZIP files, that is why it is failing while transferring data Thank you