Xcode 中是否有 CarPlay 模拟器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37469175/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is there CarPlay Simulator in Xcode
提问by pfa
Is there a CarPlay Simulator available in Xcode or from another source? I would like to view if my current app has any interaction with it such as how notifications received from my app are displaying.
Xcode 或其他来源是否提供 CarPlay 模拟器?我想查看我当前的应用程序是否与它有任何交互,例如从我的应用程序收到的通知是如何显示的。
采纳答案by Juli?n
This can be anwered with both yes and no.
这可以用是和否来回答。
Yes, as in: there are emulators and tools available for Carplay, but only for companies that have enrolled in Apple's MFi Program.
是的,例如:Carplay 有可用的模拟器和工具,但仅适用于已注册Apple 的 MFi 计划的公司。
No, as in: it is very likely not available for you or your company, unless you or your clients have multiple manufacturer plants.
不,例如:除非您或您的客户有多个制造工厂,否则您或您的公司很可能无法使用它。
If you want further details, I've added a longer answer in the SO question Is iOS CarPlay API Public? How to Integrate CarPlay?.
如果您想了解更多详细信息,我在 SO 问题Is iOS CarPlay API Public 中添加了更长的答案?如何整合 CarPlay?.
That being said, there is mentioning of some users who have successfully enabled the Carplay simulator with XCode, like in this question.
话虽如此,有人提到一些用户已经成功地使用 XCode 启用了 Carplay 模拟器,就像在这个问题中一样。
回答by ekscrypto
Actually there is a CarPlay "External Display" that can be enabled, for it to show up you simply need to type in this command in a Terminal window:
实际上,可以启用 CarPlay“外部显示器”,要显示它,您只需在终端窗口中键入此命令:
defaults write com.apple.iphonesimulator CarPlay -bool YES
Then shutdown and restart the Simulator.
然后关闭并重新启动模拟器。
回答by DrMickeyLauer
As of iOS 12 and Xcode 10, CarPlay is available as an "external" display in the Xcode simulator menu.
从 iOS 12 和 Xcode 10 开始,CarPlay 可用作 Xcode 模拟器菜单中的“外部”显示。
(Note that this doesn't mean CarPlay will register itself as an additional UIScreen
though.)
(请注意,这并不意味着 CarPlay 会将自己注册为附加功能UIScreen
。)