How to test an iOS application on the CarPlay simulator

狂风中的少年 提交于 2019-12-02 18:53:43

You don't need to add anything for the SupportExternaalAccessoryProtocols 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;-

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

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

As of iOS 12 there is now the entitlement of com.apple.developer.carplay-maps for navigation based apps which works in the same way as com.apple.developer.playable-content so you can test your App in the Simulator. You may need to enable the CarPlay simulator with the terminal command defaults write com.apple.iphonesimulator CarPlay -bool YES to get it to show up.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!