Switch between CarPlay and a regular window in an iOS simulator

I am testing an application with some CarPlay features. I activated the CarPlay window in the simulator by changing the default settings using

defaults write com.apple.iphonesimulator CarPlay -bool YES

which works great when it comes to launching CarPlay windows, or when the simulator starts automatically after the application is compiled in debugging, or if I manually open the CarPlay window through Hardware -> External Displays -> CarPlaywhen the application is already running in the simulator. The problem is that in both cases the main window of the simulator becomes dark (after showing the CarPlay pop-up screen, similar to what is visible on the phone in this image) .

Now I don’t know exactly what the behavior in real life should be, but I can’t just “close” the behavior in the CarPlay window and return to the main window of the simulator so that it displays the application (or something else for that matter). Currently, if I go back to the simulator menu and select Hardware -> External Displays -> None, the CarPlay window will simply disappear, but the main simulator window will remain black.

So, my question is: how can I simulate the behavior of “turning off” CarPlay when using the simulator and how can I return the OS to the main window of the simulator? On the other hand, I would like to know exactly when and how I can detect that the Media Player becomes “turned off” when CarPlay is turned off, or, more specifically, if there is a way that you can programmatically watch an event when the media control features CarPlay become unavailable.

+1
source share
2 answers

I can only answer your question. To return the application itself or the main OS window, simply press (or simulate pressing the Shift + Cmd + H key) on the home button.

0

CarPlay "shutdown" ? .

- .

, CarPlay iPhone- ( Home = Cmd + Shift + H). iPhone . .

0

All Articles