title: GoogleCast iOS sender, v4, not sending messages
body: <p>On version 2, the sender app was able to send messages.</p>
  
  <pre><code>func deviceManager(_ deviceManager: GCKDeviceManager!,
  didConnectToCastApplication
  applicationMetadata: GCKApplicationMetadata!,
  sessionID: String!,
  launchedApplication: Bool) {
    deviceManager.add(self.textChannel)
  }
  </code></pre>
  
  <p>However, the API says that we are now using GCKSessionManager instead of GCKDeviceManager.</p>
  
  <p>The API says I must have a GCKSession add the textChannel, which I did here:
  Once the session starts, I add the textChannel (because sessionManager.currentCastSession was nil before the session started).</p>
  
  <pre><code>func sessionManager(_ sessionManager: GCKSessionManager, didStart session: GCKSession) {
      if session.device == connectionQueue {
          connectionQueue = nil
      }
      self.sessionManager!.currentCastSession!.add(textChannel)
      print("")
  }
  </code></pre>
  
  <p>Meanwhile, I send the text message in another function:</p>
  
  <pre><code>let result = self.textChannel.sendTextMessage("\(self.textField.text)", error: &amp;error)
  </code></pre>
  
  <p>But the result is always false, and the error is always "Channel is not connected or is not registered with a session".
  In addition, when I do:</p>
  
  <pre><code>print("isConnected1 \(self.textChannel.isConnected)")
  </code></pre>
  
  <p>the result is false.
  Do you know what other steps I am missing for it to be connected?</p>