CarPlay
Build category-entitled, template-based CarPlay apps for the vehicle display.
Scope: Swift 6.3, iOS 26+.
See references/carplay-patterns.md for extended patterns including full
navigation sessions, dashboard scenes, and advanced template composition.
Scope boundary: full CarPlay framework apps use category entitlements,
CPTemplateApplicationScene, CPTemplateApplicationSceneDelegate,
CPInterfaceController, and system CPTemplate navigation. CarPlay-visible
WidgetKit widgets and ActivityKit Live Activities are separate system
experiences; route their implementation to those domains while keeping
CarPlay-specific validation here.
Contents
Workflow
- Confirm the app category is eligible and obtain the exact CarPlay entitlement before building templates.
- Configure the CarPlay scene role and retain the interface controller supplied by the scene delegate.
- Build only category-allowed template hierarchies and respect tab, list, image, and interaction limits.
- Keep navigation, audio, communication, and point-of-interest behavior behind their specific templates and completion handlers.
- Verify reconnect, day/night appearance, multiple display sizes, driving restrictions, and physical vehicle behavior where required.
Route by Task
- Read core implementation details for entitlements, scenes, templates, navigation, audio, communication, POI, and Simulator testing.
- Read extended CarPlay patterns for dashboard/instrument-cluster scenes, complete navigation flows, and complex tab composition.
Core Decisions
- Do not draw arbitrary custom UI where CarPlay requires templates.
- Never push or present templates that Apple exposes only as shared/system surfaces.
- Use the correct scene delegate callback for the app category and display role.
- Call template completion handlers exactly once and keep handlers responsive.
Common Mistakes
DON'T: Use the wrong scene delegate method
Navigation apps must implement templateApplicationScene(_:didConnect:to:)
(with CPWindow). Non-navigation apps use
templateApplicationScene(_:didConnect:) (no window). Using the wrong
variant produces no CarPlay UI.
DON'T: Draw custom UI in the navigation window
CPWindow is exclusively for map content. All overlays, alerts, and
controls must use CarPlay templates.
DON'T: Push or present CPTabBarTemplate
CPTabBarTemplate can only be set as root. Pushing or presenting it fails.
Use setRootTemplate(_:animated:completion:).
DON'T: Instantiate CPNowPlayingTemplate
Use CPNowPlayingTemplate.shared. Creating a new instance causes issues.
DON'T: Add handlers to CPMessageListItem
CPMessageListItem is Siri-managed, unlike CPListItem. Do not set
message.handler; use the item configuration and userInfo for context.
DON'T: Treat widgets as CarPlay template apps
CarPlay-visible widgets and Live Activities belong to WidgetKit and
ActivityKit. Use this skill for category-entitled CarPlay template app scenes
and for validating those surfaces in the car context.
DON'T: Ignore vehicle display limits
Check CPSessionConfiguration.limitedUserInterfaces and respect
maximumItemCount / maximumSectionCount on list templates.
DON'T: Forget to call the completion handler
CPListItem.handler must call its completion handler in every code path.
Failure leaves the list in a loading state.
Review Checklist
References
1---2name: carplay3description: Builds eligible CarPlay navigation, audio, communication, EV charging, parking, or ordering apps with template scenes. Use for entitlements, scene delegates, interface-controller hierarchies, lists, maps, Now Playing, dashboard displays, or CarPlay Simulator verification.4---56# CarPlay78Build category-entitled, template-based CarPlay apps for the vehicle display.9Scope: Swift 6.3, iOS 26+.1011See [references/carplay-patterns.md](references/carplay-patterns.md) for extended patterns including full12navigation sessions, dashboard scenes, and advanced template composition.1314Scope boundary: full CarPlay framework apps use category entitlements,15`CPTemplateApplicationScene`, `CPTemplateApplicationSceneDelegate`,16`CPInterfaceController`, and system `CPTemplate` navigation. CarPlay-visible17WidgetKit widgets and ActivityKit Live Activities are separate system18experiences; route their implementation to those domains while keeping19CarPlay-specific validation here.2021## Contents2223- [Workflow](#workflow)24- [Route by Task](#route-by-task)25- [Core Decisions](#core-decisions)26- [Common Mistakes](#common-mistakes)27- [Review Checklist](#review-checklist)28- [References](#references)2930## Workflow31321. Confirm the app category is eligible and obtain the exact CarPlay entitlement before building templates.332. Configure the CarPlay scene role and retain the interface controller supplied by the scene delegate.343. Build only category-allowed template hierarchies and respect tab, list, image, and interaction limits.354. Keep navigation, audio, communication, and point-of-interest behavior behind their specific templates and completion handlers.365. Verify reconnect, day/night appearance, multiple display sizes, driving restrictions, and physical vehicle behavior where required.3738## Route by Task3940- Read [core implementation details](references/core-implementation.md) for entitlements, scenes, templates, navigation, audio, communication, POI, and Simulator testing.41- Read [extended CarPlay patterns](references/carplay-patterns.md) for dashboard/instrument-cluster scenes, complete navigation flows, and complex tab composition.4243## Core Decisions4445- Do not draw arbitrary custom UI where CarPlay requires templates.46- Never push or present templates that Apple exposes only as shared/system surfaces.47- Use the correct scene delegate callback for the app category and display role.48- Call template completion handlers exactly once and keep handlers responsive.4950## Common Mistakes5152### DON'T: Use the wrong scene delegate method5354Navigation apps must implement `templateApplicationScene(_:didConnect:to:)`55(with `CPWindow`). Non-navigation apps use56`templateApplicationScene(_:didConnect:)` (no window). Using the wrong57variant produces no CarPlay UI.5859### DON'T: Draw custom UI in the navigation window6061`CPWindow` is exclusively for map content. All overlays, alerts, and62controls must use CarPlay templates.6364### DON'T: Push or present CPTabBarTemplate6566`CPTabBarTemplate` can only be set as root. Pushing or presenting it fails.67Use `setRootTemplate(_:animated:completion:)`.6869### DON'T: Instantiate CPNowPlayingTemplate7071Use `CPNowPlayingTemplate.shared`. Creating a new instance causes issues.7273### DON'T: Add handlers to CPMessageListItem7475`CPMessageListItem` is Siri-managed, unlike `CPListItem`. Do not set76`message.handler`; use the item configuration and `userInfo` for context.7778### DON'T: Treat widgets as CarPlay template apps7980CarPlay-visible widgets and Live Activities belong to WidgetKit and81ActivityKit. Use this skill for category-entitled CarPlay template app scenes82and for validating those surfaces in the car context.8384### DON'T: Ignore vehicle display limits8586Check `CPSessionConfiguration.limitedUserInterfaces` and respect87`maximumItemCount` / `maximumSectionCount` on list templates.8889### DON'T: Forget to call the completion handler9091`CPListItem.handler` must call its completion handler in every code path.92Failure leaves the list in a loading state.9394## Review Checklist9596- [ ] Correct CarPlay entitlement key in `Entitlements.plist`97- [ ] `UIApplicationSupportsMultipleScenes` set to `true`98- [ ] `CPTemplateApplicationSceneSessionRoleApplication` scene in Info.plist99- [ ] Scene delegate class name matches `UISceneDelegateClassName`100- [ ] Correct delegate method used (with/without `CPWindow`)101- [ ] Root template set in `didConnect` before returning102- [ ] Interface controller and window references cleared on disconnect103- [ ] `CPTabBarTemplate` only used as root, never pushed104- [ ] `CPNowPlayingTemplate.shared` used, not a new instance105- [ ] Communication rows use `CPMessageListItem` without custom handlers106- [ ] WidgetKit/ActivityKit surfaces routed outside CarPlay template app code107- [ ] `maximumItemCount`/`maximumSectionCount` checked before populating lists108- [ ] `CPListItem.handler` calls completion in every path109- [ ] Map-only content in `CPWindow` root view controller (navigation apps)110- [ ] App functions while iPhone is locked111- [ ] Tested at minimum, standard, and high-resolution simulator sizes112- [ ] Audio session deactivated when not actively playing113114## References115116- Extended patterns (dashboard, instrument cluster, full nav flow, tab composition): [references/carplay-patterns.md](references/carplay-patterns.md)117- [CarPlay framework](https://sosumi.ai/documentation/carplay)118- [CPTemplateApplicationSceneDelegate](https://sosumi.ai/documentation/carplay/cptemplateapplicationscenedelegate)119- [CPInterfaceController](https://sosumi.ai/documentation/carplay/cpinterfacecontroller)120- [CPMapTemplate](https://sosumi.ai/documentation/carplay/cpmaptemplate)121- [CPListTemplate](https://sosumi.ai/documentation/carplay/cplisttemplate)122- [CPNowPlayingTemplate](https://sosumi.ai/documentation/carplay/cpnowplayingtemplate)123- [CPPointOfInterestTemplate](https://sosumi.ai/documentation/carplay/cppointofinteresttemplate)124- [CPNavigationSession](https://sosumi.ai/documentation/carplay/cpnavigationsession)125- [Requesting CarPlay Entitlements](https://sosumi.ai/documentation/carplay/requesting-carplay-entitlements)126- [Displaying Content in CarPlay](https://sosumi.ai/documentation/carplay/displaying-content-in-carplay)127- [Using the CarPlay Simulator](https://sosumi.ai/documentation/carplay/using-the-carplay-simulator)128- [CarPlay HIG](https://sosumi.ai/design/human-interface-guidelines/carplay)129- [Core implementation details](references/core-implementation.md) -- setup, API wiring, and focused implementation recipes moved out of the entrypoint.