How can I correctly send and receive data with a GroupSessionMessenger?

101 Views Asked by At

I currently try to setup SharePlay for my app, but when I try to receive and send data with the GroupSessionMessenger I always get the following errors:

No exact matches in call to instance method ‘messages’ and No exact matches in call to instance method ‘send’

Does anyone know what I am missing here?

1

There are 1 best solutions below

0
Mitemmetim On BEST ANSWER

After going through my code for a while, I found out, that it seems like those are some kind of generic error messages. The real problem was that my model did not conform to the Codable protocol. So just let the model you are trying to receive/send with the messenger conform to Codable and you should be good to go!

I also stumbled upon some more problems, therefore, I also set up a whole tutorial on how to setup SharePlay between iOS and MacOS if someone's interested.