在iOS模拟器中切换CarPlay和常规窗口 [英] Switch between CarPlay and regular window in iOS simulator

查看:1586
本文介绍了在iOS模拟器中切换CarPlay和常规窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在测试一款具有一些CarPlay功能的应用。我通过使用

I am testing an app that has some CarPlay functionalities. I activated the CarPlay window in the simulator by changing the default options using

defaults write com.apple.iphonesimulator CarPlay -bool YES

在启动CarPlay窗口时效果很好,无论是模拟器在应用程序后自动启动在调试中编译或者如果我通过硬件 - >手动打开CarPlay窗口外部显示器 - >当应用程序已在模拟器中运行时,CarPlay 。问题在于,在这两种情况下,主模拟器窗口变暗(在显示CarPlay闪屏与此图片)

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 Hardware -> External Displays -> CarPlay 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 this image).

现在,我并不确切知道现实生活应该是什么,但我无法简单地在CarPlay窗口上执行关闭行为并切换回主模拟器窗口,以便显示应用程序(或其他任何内容)。目前,如果我回到模拟器菜单并选择硬件 - >外部显示器 - >无,CarPlay窗口只是消失,但主模拟器窗口保持黑屏。

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 Hardware -> External Displays -> None, the CarPlay window simply dissapears, but the main simulator window stay blacked out.

所以,我的问题是,如何模拟一个使用模拟器时CarPlay关闭行为,如何在主模拟器窗口中取回操作系统?在一个更注重发展的方面,我还想确切地知道在CarPlay关闭时我是否以及如何检测到媒体播放器变为关闭,或者更具体地说,如果有人可以以编程方式观察到CarPlay的媒体控制功能变得不可用。

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 media control capabilities become "unavailable".

推荐答案

我只能部分回答你的问题。要恢复应用程序本身或操作系统主窗口,只需按下(或模拟按Shift + Cmd + H)主页按钮。

I can only partially answer your question. To bring back the app itself or the OS main window, simply press (or simulate a press Shift+Cmd+H) of the home button.

这篇关于在iOS模拟器中切换CarPlay和常规窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆