Search code examples
iosjsonchromecastgoogle-cast

Sending a JSON from ios sender to receiver-app with the GoogleCast-SDK v3


I'm developing an ios sender and custom-receiver app with the Google-Cast-SDK v3.

I can't seem to find the appropriate method to send a message containing a JSON to the Receiver-App. Do I have to use the sendTextMessage-function or is there a better way?

Would this "new" function be able to send a base64 coded image? (The Backend has no real file-management yet and this is all I can work with right now.)

Thanks for your answers


Solution

  • Yes, you'll want to create a GCKCastChannel instance (for your namespace), and use sendTextMessage, that is the correct way.

    You could also push a base64 string via the same method.