Post

Size-Limits for WatchConnectivity data transfers

WCErrorCodePayloadTooLarge

I tried to send some data from the companion app to my watchOS application and ran into this error.
Neither the error message itself, nor the documentation gives any indication of what the size limit should actually be.

Thankfully someone on stackoverflow had a look at the private symbols relating to that error message: https://stackoverflow.com/a/35076706/2064473

However, because application context is not suitable for my particular use case, it seems the surest way to guarantee my data is transferred, short of writing some complicated checks and splitting data, is to use transferFile(_:metadata:).

This post is licensed under CC BY 4.0 by the author.