---
title: "add(_:)"
framework: carplay
role: symbol
role_heading: Instance Method
path: "carplay/cpnowplayingtemplate/add(_:)"
---

# add(_:)

Registers an observer that receives Now Playing template events.

## Declaration

```swift
func add(_ observer: any CPNowPlayingTemplateObserver)
```

## Parameters

- `observer`: An object that implements the doc://com.apple.carplay/documentation/CarPlay/CPNowPlayingTemplateObserver protocol.

## See Also

### Observing Now Playing Events

- [remove(_:)](carplay/cpnowplayingtemplate/remove(_:).md)
- [CPNowPlayingTemplateObserver](carplay/cpnowplayingtemplateobserver.md)
