---
title: "appController(_:didFail:)"
framework: tvmlkit
role: symbol
role_heading: Instance Method
path: "tvmlkit/tvapplicationcontrollerdelegate/appcontroller(_:didfail:)"
---

# appController(_:didFail:)

Tell the delegate the app controller failed due to an error.

## Declaration

```swift
optional func appController(_ appController: TVApplicationController, didFail error: any Error)
```

## Parameters

- `appController`: The doc://com.apple.tvmlkit/documentation/TVMLKit/TVApplicationController object that has failed.
- `error`: An doc://com.apple.documentation/documentation/Foundation/NSError object describing why the app controller failed.

## See Also

### Managing the App Controller

- [appController(_:didFinishLaunching:)](tvmlkit/tvapplicationcontrollerdelegate/appcontroller(_:didfinishlaunching:).md)
- [appController(_:didStop:)](tvmlkit/tvapplicationcontrollerdelegate/appcontroller(_:didstop:).md)
- [appController(_:evaluateAppJavaScriptIn:)](tvmlkit/tvapplicationcontrollerdelegate/appcontroller(_:evaluateappjavascriptin:).md)
- [player(for:)](tvmlkit/tvapplicationcontrollerdelegate/player(for:).md)
