carplay

Build CarPlay-enabled apps using the CarPlay framework. Use when creating navigation, audio, communication, EV charging, parking, or food ordering apps for the car display, working with CPTemplateApplicationScene, CPInterfaceController template hierarchies, CPListTemplate, CPMapTemplate, CPNowPlayin

By dpearson2699 · 2,642 installs

npx skills add dpearson2699/swift-ios-skills --skill carplay

Source repository · Upstream listing

CarPlay Build category entitled, template based CarPlay apps for the vehicle display. Scope: Swift 6.3, iOS 26+. See [references/carplay patterns.md](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 [Entitlements and Setup]( entitlements and setup) [Scene Configuration]( scene configuration) [Templates Overview]( templates overview) [Navigation Apps]( navigation apps) [Audio Apps]( audio apps) [Communication Apps]( communication apps) [Point of Interest Apps]( point of interest apps) [Testing with CarPlay Simulator]( testing with carplay simulator) [Common Mistakes]( common mistakes) [Review Checklist]( review checklist) [References]( references) Entitlements and Setup Request the category specific entitlement from [Apple's CarPlay entitlement form](https://developer.apple.com/contact/carplay), accept the addendum, then provision the approved category key below. Entitlement Keys by Category Entitlement Category com.apple.developer.carplay audio Audio com.apple.developer.carplay communication Communication com.apple.developer.carplay maps Navigation com.apple.developer.carplay charging EV Charging com.apple.developer.carplay parking Parking com.apple.developer.carplay quick ordering Quick Food Ordering Project Configuration 1. Update the App ID in the developer portal under Additional Capabilities. 2. Generate a new provisioning profile for the updated App ID. 3. In Xcode, disable automatic signing and import the CarPlay provisioning profile. 4. Add an Entitlements.plist with the entitlement key set to true . 5. Set Code Signing Entitlements build setting to the Entitlements.plist path. Key Types Type Role CPTemplateApplicationScene UIScene subclass for the CarPlay display CPTemplateApplicationSceneDelegate Scene connect/disconnect lifecycle CPInterfaceController CarPlay provided controller for setting the root template and pushing, presenting, or popping templates CPTemplate Abstract base for all CarPlay templates CPSessionConfiguration Vehicle display limits and content style Scene Configuration Declare the CarPlay scene in Info.plist and implement CPTemplateApplicationSceneDelegate to respond when CarPlay connects. Info.plist Scene Manifest Scene Delegate (Non Navigation) Non navigation apps receive an interface controller only. No window. Scene Delegate (Navigation) Navigation apps receive both an interface controller and a CPWindow . Set the window's root view controller to draw map content. Templates Overview CarPlay provides a fixed set of template types. The app supplies content; the system renders it on the vehicle display. General Purpose Templates Template Purpose CPTabBarTemplate Container with tabbed child templates CPListTemplate Scrollable sectioned list CPGridTemplate Grid of tappable icon buttons (max 8) CPInformationTemplate Key value info with up to 3 actions CPAlertTemplate Modal alert with up to 2 actions CPActionSheetTemplate Modal action sheet Category Specific Templates Template Category CPMapTemplate Navigation map overlay with nav bar CPSearchTemplate Navigation destination search CPNowPlayingTemplate Audio shared Now Playing screen CPPointOfInterestTemplate EV Charging / Parking / Food POI map CPContactTemplate Communication contact card Navigation Hierarchy Use pushTemplate( :animated:completion:) to add templates to the stack. Use presentTemplate( :animated:completion:) for modal display. Use popTemplate(animated:completion:) to go back. CPTabBarTemplate must be set as root it cannot be pushed or presented. CPTabBarTemplate CPListTemplate Navigation Apps Navigation apps use com.apple.developer.carplay maps . They are the only category that receives a CPWindow for drawing map content. The root template must be a CPMapTemplate . Trip Preview and Route Selection Starting a Navigation Session Map Buttons CPSearchTemplate Audio Apps Audio apps use com.apple.developer.carplay audio . They display browsable content in lists and use CPNowPlayingTemplate for playback controls. CPInformationTemplate is not available to audio entitled apps. Now Playing Template CPNowPlayingTemplate is a shared singleton. It reads metadata from MPNowPlayingInfoCenter . Do not instantiate a new one. Siri Assistant Cell Audio apps supporting INPlayMediaIntent can show an assistant cell. Communication apps use INStartCallIntent with .startCall . Communication Apps Communication apps use com.apple.developer.carplay communication . They display message lists and contacts, and support INStartCallIntent for Siri initiated calls. CPMessageListItem has no app provided selection handler. When selected, CarPlay invokes Siri compose, read, or reply behavior based on the item's phone/email, unread state, or existing conversation configuration. Point of Interest Apps EV charging, parking, and food ordering apps use CPPointOfInterestTemplate and CPInformationTemplate to display locations and details. CPPointOfInterestTemplate displays a maximum of 12 points of interest. CPPointOfInterestTemplate CPInformationTemplate Testing with CarPlay Simulator 1. Build and run in Xcode with the iOS simulator. 2. Choose I/O External Displays CarPlay. Default window: 800x480 at @2x . Enable extra options for navigation apps: Recommended Test Configurations Configuration Pixels Scale Minimum 748 x 456 @2x Portrait 768 x 1024 @2x Standard 800 x 480 @2x High resolution 1920 x 720 @3x Simulator cannot test locked iPhone behavior, Siri, audio coexistence with car radio, or physical input hardware (knobs, touch pads). Test on a real CarPlay capable vehicle or aftermarket head unit when possible. Design primary CarPlay flows so they do not require iPhone input while CarPlay is active. 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 [ ] Correct CarPlay entitlement key in Entitlements.plist [ ] UIApplicationSupportsMultipleScenes set to true [ ] CPTemplateApplicationSceneSessionRoleApplication scene in Info.plist [ ] Scene delegate class name matches UISceneDelegateClassName [ ] Correct delegate method used (with/without CPWindow ) [ ] Root template set in didConnect before returning [ ] Interface controller and window references cleared on disconnect [ ] CPTabBarTemplate only used as root, never pushed [ ] CPNowPlayingTemplate.shared used, not a new instance [ ] Communication rows use CPMessageListItem without custom handlers [ ] WidgetKit/ActivityKit surfaces routed outside CarPlay template app code [ ] maximumItemCount / maximumSectionCount checked before populating lists [ ] CPListItem.handler calls completion in every path [ ] Map only content in CPWindow root view controller (navigation apps) [ ] App functions while iPhone is locked [ ] Tested at minimum, standard, and high resolution simulator sizes [ ] Audio session deactivated when not actively playing References Extended patterns (dashboard, instrument cluster, full nav flow, tab composition): [references/carplay patterns.md](references/carplay patterns.md) [CarPlay framework](https://sosumi.ai/documentation/carplay) [CPTemplateApplicationSceneDelegate](https://sosumi.ai/documentation/carplay/cptemplateapplicationscenedelegate) [CPInterfaceController](https://sosumi.ai/documentation/carplay/cpinterfacecontroller) [CPMapTemplate](https://sosumi.ai/documentation/carplay/cpmaptemplate) [CPListTemplate](https://sosumi.ai/documentation/carplay/cplisttemplate) [CPNowPlayingTemplate](https://sosumi.ai/documentation/carplay/cpnowplayingtemplate) [CPPointOfInterestTemplate](https://sosumi.ai/documentation/carplay/cppointofinteresttemplate) [CPNavigationSession](https://sosumi.ai/documentation/carplay/cpnavigationsession) [Requesting CarPlay Entitlements](https://sosumi.ai/documentation/carplay/requesting carplay entitlements) [Displaying Content in CarPlay](https://sosumi.ai/documentation/carplay/displaying content in carplay) [Using the CarPlay Simulator](https://sosumi.ai/documentation/carplay/using the carplay simulator) [CarPlay HIG](https://sosumi.ai/design/human interface guidelines/carplay)