<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVSystemRouting",
  "identifier" : "/documentation/AVSystemRouting/AVSystemRouteController-18ns8/addObserver(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVSystemRouting"
    ],
    "preciseIdentifier" : "s:15AVSystemRouting0A15RouteControllerC11addObserverySbAA0acdF0_pF"
  },
  "title" : "addObserver(_:)"
}
-->

# addObserver(_:)

Adds an observer to receive notifications about system routing events.

```
final func addObserver(_ observer: any AVSystemRouteControllerObserver) -> Bool
```

## Parameters

`observer`

An object that conforms to [`AVSystemRouteControllerObserver`](/documentation/AVSystemRouting/AVSystemRouteControllerObserver-5syvg)
to receive routing event notifications.

## Return Value

`true` if the observer was successfully added; `false` if the observer was already
registered, if registration failed, or if a previous registration for the same observer
was cleaned up due to the observer being deallocated.

## Discussion

Use this function to register an observer that receives callbacks when people interact
with system routes in the route picker. The observer must conform to the
[`AVSystemRouteControllerObserver`](/documentation/AVSystemRouting/AVSystemRouteControllerObserver-5syvg) protocol and implement the required protocol function
to handle routing events such as route activation and deactivation.

Important: Your app must declare support for extensions with the `MDESupportsUniversalURLPlayback` key and/or for specific protocols in
the `MDESupportedProtocols` key of  the app’s `Info.plist`.  This observer will only be called back when a user selects a route that has
been provided by an extension that matches one of your app’s specified supported protocols.

---

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)