One Logo Pool Ball
CarPlay · IOS API REFERENCE

CPInterfaceController

class · iOS 12.0+ · SDK 27.1

@MainActor class CPInterfaceController

Members (18)

method · iOS 14.0+

dismissTemplate

TypeScript
dismissTemplate(animated: boolean, completion?: (((arg0: boolean, arg1: (NativeError) | null) => void)) | null): Promise<void>
Swift declaration
func dismissTemplate(animated: Bool) async throws -> Bool
method · iOS 27.0+

hideOverlayTemplate

TypeScript
hideOverlayTemplate(animated: boolean, completion?: (((arg0: boolean, arg1: (NativeError) | null) => void)) | null): Promise<void>
Swift declaration
func hideOverlayTemplate(animated: Bool) async throws -> Bool
method · iOS 14.0+

popTemplate

TypeScript
popTemplate(animated: boolean, completion?: (((arg0: boolean, arg1: (NativeError) | null) => void)) | null): Promise<void>
Swift declaration
func popTemplate(animated: Bool) async throws -> Bool
method · iOS 14.0+

popToRootTemplate

TypeScript
popToRootTemplate(animated: boolean, completion?: (((arg0: boolean, arg1: (NativeError) | null) => void)) | null): Promise<void>
Swift declaration
func popToRootTemplate(animated: Bool) async throws -> Bool
method · iOS 14.0+

pop

TypeScript
pop(targetTemplate: CPTemplate, animated: boolean, completion?: (((arg0: boolean, arg1: (NativeError) | null) => void)) | null): Promise<void>
Swift declaration
func pop(to targetTemplate: CPTemplate, animated: Bool) async throws -> Bool
method · iOS 14.0+

presentTemplate

TypeScript
presentTemplate(templateToPresent: CPTemplate, animated: boolean, completion?: (((arg0: boolean, arg1: (NativeError) | null) => void)) | null): Promise<void>
Swift declaration
func presentTemplate(_ templateToPresent: CPTemplate, animated: Bool) async throws -> Bool
method · iOS 14.0+

pushTemplate

TypeScript
pushTemplate(templateToPush: CPTemplate, animated: boolean, completion?: (((arg0: boolean, arg1: (NativeError) | null) => void)) | null): Promise<void>
Swift declaration
func pushTemplate(_ templateToPush: CPTemplate, animated: Bool) async throws -> Bool
method · iOS 14.0+

setRootTemplate

TypeScript
setRootTemplate(rootTemplate: CPTemplate, animated: boolean, completion?: (((arg0: boolean, arg1: (NativeError) | null) => void)) | null): Promise<void>
Swift declaration
func setRootTemplate(_ rootTemplate: CPTemplate, animated: Bool) async throws -> Bool
method · iOS 27.0+

showOverlayTemplate

TypeScript
showOverlayTemplate(templateToShow: CPTemplate, animated: boolean, completion?: (((arg0: boolean, arg1: (NativeError) | null) => void)) | null): Promise<void>
Swift declaration
func showOverlayTemplate(_ templateToShow: CPTemplate, animated: Bool) async throws -> Bool
get · iOS 14.0+

carTraitCollection

TypeScript
get carTraitCollection(): Promise<_UIKit_UITraitCollection>
Swift declaration
var carTraitCollection: UITraitCollection { get }
get · iOS 12.0+

delegate

TypeScript
get delegate(): Promise<(SDKHandle) | null>
Swift declaration
weak var delegate: (any CPInterfaceControllerDelegate)? { get set }
set · iOS 12.0+

delegate

TypeScript
setDelegate(value?: (Implements<CPInterfaceControllerDelegate> | SDKHandle) | null): Promise<void>
Swift declaration
weak var delegate: (any CPInterfaceControllerDelegate)? { get set }
get · iOS 13.0+

prefersDarkUserInterfaceStyle

TypeScript
get prefersDarkUserInterfaceStyle(): Promise<boolean>
Swift declaration
var prefersDarkUserInterfaceStyle: Bool { get set }
set · iOS 13.0+

prefersDarkUserInterfaceStyle

TypeScript
setPrefersDarkUserInterfaceStyle(value: boolean): Promise<void>
Swift declaration
var prefersDarkUserInterfaceStyle: Bool { get set }
get · iOS 12.0+

presentedTemplate

TypeScript
get presentedTemplate(): Promise<(CPTemplate) | null>
Swift declaration
var presentedTemplate: CPTemplate? { get }
get · iOS 12.0+

rootTemplate

TypeScript
get rootTemplate(): Promise<CPTemplate>
Swift declaration
var rootTemplate: CPTemplate { get }
get · iOS 12.0+

templates

TypeScript
get templates(): Promise<Array<CPTemplate>>
Swift declaration
var templates: [CPTemplate] { get }
get · iOS 12.0+

topTemplate

TypeScript
get topTemplate(): Promise<(CPTemplate) | null>
Swift declaration
var topTemplate: CPTemplate? { get }

Skipped declarations

8 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

CPInterfaceController.setRootTemplate(_:animated:)

The iOS SDK compiler rejected this binding: call can throw but is not marked with 'try'

CPInterfaceController.pushTemplate(_:animated:)

The iOS SDK compiler rejected this binding: call can throw but is not marked with 'try'

CPInterfaceController.popTemplate(animated:)

The iOS SDK compiler rejected this binding: call can throw but is not marked with 'try'

CPInterfaceController.popToRootTemplate(animated:)

The iOS SDK compiler rejected this binding: call can throw but is not marked with 'try'

CPInterfaceController.pop(to:animated:)

The iOS SDK compiler rejected this binding: call can throw but is not marked with 'try'

CPInterfaceController.presentTemplate(_:animated:)

The iOS SDK compiler rejected this binding: call can throw but is not marked with 'try'

CPInterfaceController.dismissTemplate(animated:)

The iOS SDK compiler rejected this binding: call can throw but is not marked with 'try'

CPInterfaceController.init()

inherited init: clang: 'init' is unavailable

All CarPlay types →