Packaging · class

NativeLifecycle

Explained in Packaging an application.

class NativeLifecycle implements Lifecycle
import { NativeLifecycle } from '@driftengine/package';

Constructor

new

constructor(bridge: DriftHostBridge)
ParameterTypeDescription
bridgeDriftHostBridge

Accessors

NameTypeDescription
canQuitgetbooleanWhat the shell says, rather than what a desktop assumes: an iOS host answers false.

Methods

onFocusChange

onFocusChange(handler: (focused: boolean) => void): () => void
ParameterTypeDescription
handler(focused: boolean) => void

onQuitRequest

onQuitRequest(handler: () => void): () => void
ParameterTypeDescription
handler() => void

requestQuit

requestQuit(): void