title: Switch between CarPlay and regular window in iOS simulator
body: <p>I am testing an app that has some CarPlay functionalities. I activated the CarPlay window in the simulator by changing the default options using</p>
  
  <pre><code>defaults write com.apple.iphonesimulator CarPlay -bool YES
  </code></pre>
  
  <p>which works perfectly when it comes to starting up the CarPlay windows, either when the simulator starts automatically after the application is compiled in debug or if I manually open up the CarPlay window through <code>Hardware -&gt; External Displays -&gt; CarPlay</code> when the app is already running in the simulator. The problem is that, in both cases, the main simulator window goes dark (after showing the CarPlay splashscreen simmilar to the one seen on the phone in <a href="http://i.ytimg.com/vi/DTgcYd7UEsc/0.jpg" rel="nofollow">this image)</a>.</p>
  
  <p>Now, I don't exactly know what the real life behavior is supposed to be, but I can't manage to simply execute a "shut-down" behavior on the CarPlay window and switch back to the main simulator window so that it displays the app (or anything else for that matter). Currently, if I got back to the simulator menu and select <code>Hardware -&gt; External Displays -&gt; None</code>, the CarPlay window simply dissapears, but the main simulator window stay blacked out.</p>
  
  <p>So, my question is, how can one simulate a CarPlay "shutdown" behavior when using the simulator, and how can I get back the OS in the main simulator window ? On a more development focused side, I would also like to know exactly if and how I can detect that the Media Player becomes "turned off" when CarPlay shuts down, or, more specifically, if there is a way that one can programatically observe the event where the CarPlay's <a href="https://developer.apple.com/library/ios/documentation/MediaPlayer/Reference/MPPlayableContentManager_Ref/index.html#//apple_ref/occ/cl/MPPlayableContentManager" rel="nofollow">media control capabilities</a> become "unavailable".</p>