<!--
{
  "availability" : [
    "tvOS: 9.0.0 - 18.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "TVMLKit",
  "identifier" : "/documentation/TVMLKit/TVApplicationController/init(context:window:delegate:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "TVMLKit"
    ],
    "preciseIdentifier" : "c:objc(cs)TVApplicationController(im)initWithContext:window:delegate:"
  },
  "title" : "init(context:window:delegate:)"
}
-->

# init(context:window:delegate:)

Initializes and returns an app controller.

```
init(context: TVApplicationControllerContext, window: UIWindow?, delegate: (any TVApplicationControllerDelegate)?)
```

## Parameters

`context`

A [`TVApplicationControllerContext`](/documentation/TVMLKit/TVApplicationControllerContext) object containing information about the JavaScript app.

`window`

A <doc://com.apple.documentation/documentation/UIKit/UIWindow> object that presents the application controller’s navigation controller.

`delegate`

The app controller delegate.

## Return Value

The initialized [`TVApplicationController`](/documentation/TVMLKit/TVApplicationController) object.

## Discussion

An app controller coordinates activity between the JavaScript environments and tvOS. There are three options when presenting the application controller. If you provide a valid <doc://com.apple.documentation/documentation/UIKit/UIWindow> object, the application controller’s navigation controller is presented immediately and managed by [`TVApplicationController`](/documentation/TVMLKit/TVApplicationController). If no window is provided, the navigation controller can be presented and dismissed manually within the binary app. Finally, if you wish to present native view controllers alongside a [`TVApplicationController`](/documentation/TVMLKit/TVApplicationController) object, you can push additional view controllers onto [`navigationController`](/documentation/TVMLKit/TVApplicationController/navigationController).

---

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)