The base template for your CarPlay navigation app will always be a map template.
- iOS 12.0+
The Map Template is a control layer that appears as an overlay over the base view and allows you to present user controls.
The control layer consists of a navigation bar and map buttons. By default, the navigation bar appears when the user interacts with the app, and disappears after a period of inactivity.
The navigation bar includes up to two leading buttons and two trailing buttons. You can customize the appearance of these buttons with icons or text.
The control layer may also include up to four map buttons. The map buttons are always shown as icons.
Navigation apps enter panning mode, zoom in or out, and perform other functions by responding to user actions on these buttons.
Use the map template to:
Present controls that appear directly on the map, including the navigation bar and map buttons.
Present navigation alerts.
Manage the map's panning interface.
When the system calls
application(_:—implemented in your app delegate—create a CPMapTemplate object, then set the root template on the interface controller by calling