---
title: "application(_:didConnectCarInterfaceController:to:)"
framework: carplay
role: symbol
role_heading: Instance Method
path: "carplay/cpapplicationdelegate/application(_:didconnectcarinterfacecontroller:to:)"
---

# application(_:didConnectCarInterfaceController:to:)

Tells the app delegate that the app connected to the CarPlay interface.

## Declaration

```swift
func application(_ application: UIApplication, didConnectCarInterfaceController interfaceController: CPInterfaceController, to window: CPWindow)
```

## Parameters

- `application`: Your singleton app object.
- `interfaceController`: The interface controller provided by CarPlay. Your app should maintain a reference to this controller.
- `window`: The CarPlay window. Your app should create its view controller and assign the controller to the doc://com.apple.documentation/documentation/UIKit/UIWindow/rootViewController property of this window.

## See Also

### Connecting to the CarPlay Interface

- [application(_:didDisconnectCarInterfaceController:from:)](carplay/cpapplicationdelegate/application(_:diddisconnectcarinterfacecontroller:from:).md)
