title: Replacement for GCKSession.resume() in Google Cast iOS SDK 4.x?
body: <p>With the Google Cast iOS SDK 3.5.6 I had some logic in place to detect and  resume a an existing cast session when needed. Something like this:</p>
  
  <pre><code>func connectToDevice(_ device: GCKDevice, sessionId: String?) {
      var resumed = false
      if let session = sessionManager.currentSession {
          if session.device == device {
              session.resume()
              resumed = true
          } else {
              sessionManager.endSession()
          }
      }
  
      if !resumed {
          sessionManager.startSession(with: device)
      }
  }
  </code></pre>
  
  <p><code>GCKSession.resume()</code> is deprecated with SDK v4.0.2 however. I am seeing no obvious replacement, and simply ignoring existing sessions is not an option (see below code as an example of what does not work)</p>
  
  <pre><code>func connectToDevice(_ device: GCKDevice, sessionId: String?) {
      if let session = sessionManager.currentSession {
          sessionManager.endSession()  // This doesn't help
      }
      DispatchQueue.main.asyncAfter(.now()+5.0) {   // endSession() is asynchronous, so need to give some time  
          sessionManager.startSession(with: device) // This will fail in situations where 'session' isn't nil
      }
  }
  </code></pre>
  
  <p>How are we expected to handle this situation with SDK v4.x?</p>