<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPTabBarTemplate/updateTemplates(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(cs)CPTabBarTemplate(im)updateTemplates:"
  },
  "title" : "updateTemplates(_:)"
}
-->

# updateTemplates(_:)

Adds, removes, reorders, or updates the tab bar’s templates.

```
func updateTemplates(_ newTemplates: [CPTemplate])
```

## Parameters

`newTemplates`

An array of templates to display.

## Discussion

This method is multipurpose. Use it to add new templates to the tab bar, to remove and reorder existing templates, and to update a template’s tab bar appearance.

At runtime, use [`maximumTabCount`](/documentation/CarPlay/CPTabBarTemplate/maximumTabCount) to determine the maximum number of tabs the template can display. CarPlay throws an exception if the number of items in `newTemplates` exceeds this value.

Use a transactional approach when making changes to the tab bar. Retrieve the current set of templates using the [`templates`](/documentation/CarPlay/CPTabBarTemplate/templates) property. Add, remove, reorder, or make appearance changes to one or more of array’s templates. For example, use the [`tabTitle`](/documentation/CarPlay/CPTemplate/tabTitle) property to update a template’s tab title, or set [`showsTabBadge`](/documentation/CarPlay/CPTemplate/showsTabBadge) to `true` to add an indicator to a template’s tab, then call this method with the updated array. CarPlay commits those changes and updates the tab bar.

CarPlay treats the array’s templates as root templates, each with its own navigation hierarchy. When a tab bar template is the [`rootTemplate`](/documentation/CarPlay/CPInterfaceController/rootTemplate) of your app’s interface controller, and you use the controller to add and remove templates, CarPlay applies those changes to the selected tab’s navigation hierarchy.

CarPlay restricts the type of template you can use as a tab’s root template according to your app’s entitlements. Audio apps can use List and Grid templates only. All other categories of apps can use List, Grid, and Information templates as a tab’s root template. In addition, EV-charging, parking, and food ordering apps can use the Point of Interest template as a root template. These restrictions apply only to a tab’s root template. You can add other template types, like the Contact and Now Playing templates, on top of a tab’s root template using the methods that [`CPInterfaceController`](/documentation/CarPlay/CPInterfaceController) provides.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)