I have a GCKCastChannel to send and receive messages in my app from the Chromecast receiver file.
My biggest issue that my app has multiple classes for all the different views, I can send and receive messages on the view that casts the app to the Chromecast, although when I change views I can't send messages.
I used
if (!self.deviceManager || !self.deviceManager.isConnected) { bla bla bla } else {bla bla bla}
to check if the deviceManager knew if we were connected etc. Although it came back saying that we weren't connected to the Chromecast.
Any ideas on how I can send messages from other classes would be much appreciated!
Mark
The GCKDeviceManager manages a connection, so if you create a new one it isn't aware of the existing session. You've got a couple of options, that boil down to sharing the connection object:
There's some good discussion on sharing objects between classes in several other SO questions - for example How do I share an object between UIViewControllers on iPhone?