Introduction
CarPlay offers a smarter and safer way for drivers to utilize their iPhone within their vehicle. It seamlessly integrates essential iPhone functionalities onto the car's built-in display, enhancing the driving experience.
CarPlay supports various app categories, including:
- Audio
- Communication
- EV Charging
- Navigation
- Parking
- Quick Food Ordering
This guide provides detailed instructions on developing applications for the CarPlay platform.
Overview
CarPlay applications are downloaded from the App Store and function similarly to other iPhone apps. When an iPhone with a CarPlay app is connected to a compatible vehicle, the app's icon appears on the CarPlay home screen. CarPlay apps are not standalone; they are extensions of existing iPhone applications that have been granted CarPlay support.
The design of CarPlay apps aims to mirror the look and feel of their iPhone counterparts, utilizing UI elements consistent with built-in CarPlay applications. The CarPlay framework manages the presentation of UI elements and the interaction with the vehicle's system, relieving developers from the need to handle diverse screen resolutions or input methods like touchscreens, knobs, or touchpads.
To develop CarPlay apps, developers must adhere to the requirements outlined in the CarPlay Entitlement Addendum and follow the CarPlay App Guidelines. For comprehensive design recommendations, consult the Human Interface Guidelines for CarPlay Apps.
CarPlay App Entitlement
All applications intended for CarPlay require a specific entitlement. To obtain this entitlement, developers must visit Apple Developer Account, navigate to Certificates, Identifiers & Profiles, and then Identifiers. After selecting or creating an App ID, scroll down to Additional Capabilities and enable the necessary CarPlay App capabilities. Saving these changes and proceeding to Provisioning Profiles allows for the creation of a new provisioning profile for the App ID. Further details can be found in the Developer Account Help section regarding Provisioning with Managed Capabilities and App Identifiers.
Once the Provisioning Profile is created, it needs to be imported into Xcode. Xcode and the Simulator require a Provisioning Profile that explicitly supports CarPlay. Within Xcode, an Entitlements.plist file should be created or updated in the project to include the relevant CarPlay app entitlement keys.
CarPlay App Guidelines
CarPlay applications must comply with a set of guidelines to ensure a safe and consistent user experience:
- Apps should primarily focus on their core functionality (e.g., audio playback for audio apps, parking services for parking apps).
- Developers should avoid instructing users to interact with their iPhone while driving. Error conditions can be communicated, but without prompting direct iPhone manipulation.
- All user flows must be navigable without requiring iPhone interaction.
- CarPlay user flows should be relevant and meaningful for use while driving, excluding features unrelated to the primary driving task.
- Gaming and social networking features are prohibited.
- Displaying message, text, or email content on the CarPlay screen is not permitted.
- Templates must be used for their intended purpose, populating them with appropriate information types.
- Voice interaction should be managed via SiriKit, with exceptions for CarPlay navigation apps.
Additional guidelines exist for specific app categories, such as prohibiting song lyrics display and text-to-speech systems for audio apps, and mandating the use of SiriKit and CallKit for communication apps.
Development Environment
Developing CarPlay applications requires Xcode and an Apple Developer Program account. The process involves configuring entitlements, creating provisioning profiles, and setting up the project in Xcode. Key considerations include ensuring the correct entitlements are selected for the app's functionality (e.g., audio, communication, navigation) and that the app is tested thoroughly, including scenarios where the iPhone is locked or during Siri interactions.
It is highly recommended to use a car or aftermarket system that supports wireless CarPlay for development and testing. This allows for wireless CarPlay operation while the iPhone is simultaneously connected to Xcode on a Mac via a Lightning to USB cable.