如何在CarPlay模拟器上测试iOS应用程序 [英] How to test an iOS application on the CarPlay simulator

查看:887
本文介绍了如何在CarPlay模拟器上测试iOS应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试开发与CarPlay兼容的iOS应用程序.

I am trying to develop an iOS application compatible with CarPlay.

根据此帖子是iOS CarPlay API公开?如何与CarPlay集成? > 外部显示器-> CarPlay (我使用Xcode 8). 打开它后,您会看到Message App在CarPlay模拟器中正在运行,因此我想有可能在不注册MFi程序的情况下在此模拟器中尝试自定义应用程序. 我想知道是否有人尝试在CarPlay模拟器上启动应用程序,如果答案是肯定的,他可以解释自己的做法.

According to this post Is iOS CarPlay API Public? How to Integrate CarPlay?, I have to be enrolled with Apple’s MFi program, but I have noticed that there’s the possibility to use a CarPlay simulator with Xcode: launch the Simulator, then Hardware -> External Displays -> CarPlay (I use Xcode 8). Once you have opened it, you see that the Message App is working in the CarPlay simulator so I imagine that there is the possibility to try custom application in this simulator without being enrolled in the MFi program. I wonder if anyone has tried to launch an application on the CarPlay simulator and, in case of positive answer, he can explain how he did.

我也观看了WWDC 2016( https://developer.apple.com/videos/play/wwdc2016/722/使用Safari打开它),其中介绍了CarPlay系统及其工作原理.在本演示文稿的结尾,他们说您必须在 Info.plist的 SupportExternalAccessoryProtocols 键中声明一个字符串协议名称(如 com.brand ). 文件,但我不知道如何获取字符串协议名称.

I have also watched the WWDC 2016 (https://developer.apple.com/videos/play/wwdc2016/722/ open it with Safari) that explains the CarPlay system and how it works. At the end of this presentation, they say that you have to declare a string protocol name (like com.brand) in the SupportExternalAccessoryProtocols key in the Info.plist file, but I don't understand how to get the string protocol name.

我也找不到有关模拟器以及如何开发与之兼容的应用程序的任何信息.

I also don’t find any information about the simulator and how to develop application compatible with it.

如果有人对此有所了解,那将是一个很大的帮助.

If someone knew something concerning it, it would be a great help.

谢谢.

推荐答案

您无需为SupportExternalAccessoryProtocols键添加任何内容即可在模拟器中运行基本的CarPlay应用.这是为了声明特定于特定主机单元的功能协议.

You don't need to add anything for the SupportExternalAccessoryProtocols key to run a basic CarPlay app in the simulator. This is for declaring protocols for functionality that might be specific to a particular set of head units.

您可能缺少的是可播放的内容授权.如果没有授权文件,则需要为您的应用创建它;-

What you are probably missing is the playable content entitlement. If you don't have an entitlements file, you'll need to create it for your app;-

然后为com.apple.developer.playable-content键添加一个布尔值YES

Then add a boolean value of YES for the com.apple.developer.playable-content key

这现在应该在模拟器的CarPlay主屏幕上显示您的应用程序.正如您所暗示的那样,除非您可以让Apple将该权利添加到您的帐户中,否则您将无法在物理设备上运行该应用程序

This should now show your app on the CarPlay home screen in the simulator. As you allude, you won't be able to run that app on a physical device unless you can get Apple to add that entitlement to your account

这篇关于如何在CarPlay模拟器上测试iOS应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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