8.6 Released with 🥽 visionOS support and more!
Check it out

Summary

Properties

autoSystemAppearanceChanged

autoSystemAppearanceChanged: boolean
Boolean to enable/disable systemAppearanceChanged

backgroundEvent

Readonly
backgroundEvent: "background" = "background"

cssChangedEvent

Readonly
cssChangedEvent: "cssChanged" = "cssChanged"

discardedErrorEvent

Readonly
discardedErrorEvent: "discardedError" = "discardedError"

displayedEvent

Readonly
displayedEvent: "displayed" = "displayed"

exitEvent

Readonly

fontScaleChangedEvent

Readonly
fontScaleChangedEvent: "fontScaleChanged" = "fontScaleChanged"

foregroundEvent

Readonly
foregroundEvent: "foreground" = "foreground"

hasListeners

hasListeners: (eventName: string) => boolean

launchEvent

Readonly
launchEvent: "launch" = "launch"

livesyncEvent

Readonly
livesyncEvent: "livesync" = "livesync"

loadAppCssEvent

Readonly
loadAppCssEvent: "loadAppCss" = "loadAppCss"

lowMemoryEvent

Readonly
lowMemoryEvent: "lowMemory" = "lowMemory"

mainEntry

Protected

notify

notify: (eventData: T) => void

off

off: (eventNames: string, callback?: any, thisArg?: any) => void

on

on: {
(eventNames: string, callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "cssChanged", callback: (args: CssChangedEventData) => void, thisArg?: any) => void;
(event: "livesync", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "cssChanged", callback: (args: CssChangedEventData) => void, thisArg?: any) => void;
(event: "launch", callback: (args: LaunchEventData) => void, thisArg?: any) => void;
(event: "displayed", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "suspend", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "resume", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "exit", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "lowMemory", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "uncaughtError", callback: (args: UnhandledErrorEventData) => void, thisArg?: any) => void;
(event: "discardedError", callback: (args: DiscardedErrorEventData) => void, thisArg?: any) => void;
(event: "orientationChanged", callback: (args: OrientationChangedEventData) => void, thisArg?: any) => void;
(event: "systemAppearanceChanged", callback: (args: SystemAppearanceChangedEventData) => void, thisArg?: any) => void;
}

once

once: {
(eventNames: string, callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "cssChanged", callback: (args: CssChangedEventData) => void, thisArg?: any) => void;
(event: "livesync", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "cssChanged", callback: (args: CssChangedEventData) => void, thisArg?: any) => void;
(event: "launch", callback: (args: LaunchEventData) => void, thisArg?: any) => void;
(event: "displayed", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "suspend", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "resume", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "exit", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "lowMemory", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "uncaughtError", callback: (args: UnhandledErrorEventData) => void, thisArg?: any) => void;
(event: "discardedError", callback: (args: DiscardedErrorEventData) => void, thisArg?: any) => void;
(event: "orientationChanged", callback: (args: OrientationChangedEventData) => void, thisArg?: any) => void;
(event: "systemAppearanceChanged", callback: (args: SystemAppearanceChangedEventData) => void, thisArg?: any) => void;
}

orientationChangedEvent

Readonly
orientationChangedEvent: "orientationChanged" = "orientationChanged"

resumeEvent

Readonly
resumeEvent: "resume" = "resume"

suspendEvent

Readonly
suspendEvent: "suspend" = "suspend"

systemAppearanceChangedEvent

Readonly
systemAppearanceChangedEvent: "systemAppearanceChanged" = "systemAppearanceChanged"

uncaughtErrorEvent

Readonly
uncaughtErrorEvent: "uncaughtError" = "uncaughtError"

hasListeners

Static
hasListeners: (eventName: string) => boolean

notify

Static
notify: (eventData: T) => void

off

Static
off: (eventNames: string, callback?: any, thisArg?: any) => void

on

Static
on: {
(eventNames: string, callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "cssChanged", callback: (args: CssChangedEventData) => void, thisArg?: any) => void;
(event: "livesync", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "cssChanged", callback: (args: CssChangedEventData) => void, thisArg?: any) => void;
(event: "launch", callback: (args: LaunchEventData) => void, thisArg?: any) => void;
(event: "displayed", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "suspend", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "resume", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "exit", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "lowMemory", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "uncaughtError", callback: (args: UnhandledErrorEventData) => void, thisArg?: any) => void;
(event: "discardedError", callback: (args: DiscardedErrorEventData) => void, thisArg?: any) => void;
(event: "orientationChanged", callback: (args: OrientationChangedEventData) => void, thisArg?: any) => void;
(event: "systemAppearanceChanged", callback: (args: SystemAppearanceChangedEventData) => void, thisArg?: any) => void;
}

once

Static
once: {
(eventNames: string, callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "cssChanged", callback: (args: CssChangedEventData) => void, thisArg?: any) => void;
(event: "livesync", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "cssChanged", callback: (args: CssChangedEventData) => void, thisArg?: any) => void;
(event: "launch", callback: (args: LaunchEventData) => void, thisArg?: any) => void;
(event: "displayed", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "suspend", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "resume", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "exit", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "lowMemory", callback: (args: ApplicationEventData) => void, thisArg?: any) => void;
(event: "uncaughtError", callback: (args: UnhandledErrorEventData) => void, thisArg?: any) => void;
(event: "discardedError", callback: (args: DiscardedErrorEventData) => void, thisArg?: any) => void;
(event: "orientationChanged", callback: (args: OrientationChangedEventData) => void, thisArg?: any) => void;
(event: "systemAppearanceChanged", callback: (args: SystemAppearanceChangedEventData) => void, thisArg?: any) => void;
}

Accessors

AndroidApplication

inBackground

get inBackground(): boolean

suspended

get suspended(): boolean

Methods

addCss

addCss(cssText: string, attributeScoped?: boolean): void
Parameter Default Description
cssText
string

attributeScoped
boolean

Returns void

applyCssClass

applyCssClass(rootView: View, cssClasses: string[], newCssClass: string): void
Applies the the `newCssClass` to the `rootView` and removes all other css classes from `cssClasses` previously applied to the `rootView`.
Parameter Default Description
rootView

cssClasses
string[]

newCssClass
string

Returns void

createRootView

createRootView(view?: View, fireLaunchEvent?: boolean, additionalLanchEventData?: any): View
Parameter Default Description
view

fireLaunchEvent
boolean

additionalLanchEventData
any

Returns View

getCssFileName

getCssFileName(): string
Gets css file name for the application.
Returns string

getMainEntry

getMainEntry(): NavigationEntry

getNativeApplication

getNativeApplication(): any

getOrientation

Protected
getOrientation(): "portrait" | "landscape" | "unknown"
Returns "portrait" | "landscape" | "unknown"

getResources

getResources(): any
Get application level static resources.
Returns any

getRootView

getSystemAppearance

Protected
getSystemAppearance(): "dark" | "light"

hasLaunched

hasLaunched(): boolean

initRootView

initRootView(rootView: View): void
Parameter Default Description
rootView

Returns void

loadAppCss

loadAppCss(): void
Loads immediately the app.css. By default the app.css file is loaded shortly after "loaded". For the Android snapshot the CSS can be parsed during the snapshot generation, as the CSS does not depend on runtime APIs, and loadAppCss will be called explicitly.
Returns void

notifyLaunch

Protected
notifyLaunch(additionalLanchEventData?: any): View
Parameter Default Description
additionalLanchEventData
any

Returns View

orientation

orientation(): "portrait" | "landscape" | "unknown"
Returns "portrait" | "landscape" | "unknown"

orientationChanged

orientationChanged(rootView: View, newOrientation: "portrait" | "landscape" | "unknown"): void
Parameter Default Description
rootView

newOrientation
"portrait" | "landscape" | "unknown"

Returns void

resetRootView

resetRootView(entry?: string | NavigationEntry): void
Parameter Default Description
entry
string | NavigationEntry

Returns void

run

run(entry?: string | NavigationEntry): void
Parameter Default Description
entry
string | NavigationEntry

Returns void

setAutoSystemAppearanceChanged

setAutoSystemAppearanceChanged(value: boolean): void
enable/disable systemAppearanceChanged
Parameter Default Description
value
boolean

Returns void

setCssFileName

setCssFileName(cssFileName: string): void
Sets css file name for the application.
Parameter Default Description
cssFileName
string

Returns void

setInBackground

setInBackground(value: boolean, additonalData?: any): void
Parameter Default Description
value
boolean

additonalData
any

Returns void

setMaxRefreshRate

setMaxRefreshRate(options?: { max?: number; min?: number }): void
iOS Only Dynamically change the preferred frame rate For devices (iOS 15+) which support min/max/preferred frame rate you can specify ranges For devices (iOS < 15), you can specify the max frame rate see: https://developer.apple.com/documentation/quartzcore/optimizing_promotion_refresh_rates_for_iphone_13_pro_and_ipad_pro To use, ensure your Info.plist has: ```xml CADisableMinimumFrameDurationOnPhone ```
Parameter Default Description
options
{ max?: number min?: number }

{ min?: number; max?: number; preferred?: number }

Returns void

setOrientation

Protected
setOrientation(value: "portrait" | "landscape" | "unknown"): void
Parameter Default Description
value
"portrait" | "landscape" | "unknown"

Returns void

setResources

setResources(res: any): void
Set application level static resources.
Parameter Default Description
res
any

Returns void

setSuspended

setSuspended(value: boolean, additonalData?: any): void
Parameter Default Description
value
boolean

additonalData
any

Returns void

setSystemAppearance

Protected
setSystemAppearance(value: "dark" | "light"): void
Parameter Default Description
value
"dark" | "light"

Returns void

systemAppearance

systemAppearance(): "dark" | "light"

systemAppearanceChanged

systemAppearanceChanged(rootView: View, newSystemAppearance: "dark" | "light"): void
Updates root view classes including those of modals
Parameter Default Description
rootView

the root view

newSystemAppearance
"dark" | "light"

the new appearance change

Returns void
Previous
Animation