Classes
iOSApplication
Defined in: application/application.d.ts:175
Extends
Properties
_windows
protected _windows: NativeWindow[];Defined in: application/application-common.ts
Inherited from
backgroundEvent
readonly backgroundEvent: "background" = "background";Defined in: application/application-common.ts
Inherited from
ApplicationCommon.backgroundEvent
cssChangedEvent
readonly cssChangedEvent: "cssChanged" = "cssChanged";Defined in: application/application-common.ts
Inherited from
ApplicationCommon.cssChangedEvent
discardedErrorEvent
readonly discardedErrorEvent: "discardedError" = "discardedError";Defined in: application/application-common.ts
Inherited from
ApplicationCommon.discardedErrorEvent
displayedEvent
readonly displayedEvent: "displayed" = "displayed";Defined in: application/application-common.ts
Inherited from
ApplicationCommon.displayedEvent
exitEvent
readonly exitEvent: "exit" = "exit";Defined in: application/application-common.ts
On Android, raised when the last window closes; the process may stay alive. On iOS, raised when the process itself terminates.
Inherited from
fontScaleChangedEvent
readonly fontScaleChangedEvent: "fontScaleChanged" = "fontScaleChanged";Defined in: application/application-common.ts
Inherited from
ApplicationCommon.fontScaleChangedEvent
foregroundEvent
readonly foregroundEvent: "foreground" = "foreground";Defined in: application/application-common.ts
Inherited from
ApplicationCommon.foregroundEvent
hasListeners
hasListeners: (eventName: string) => boolean;Defined in: application/application-common.ts
Parameters
| Parameter | Type |
|---|---|
eventName | string |
Returns
boolean
Inherited from
ApplicationCommon.hasListeners
initRootViewEvent
readonly initRootViewEvent: "initRootView" = "initRootView";Defined in: application/application-common.ts
Inherited from
ApplicationCommon.initRootViewEvent
launchEvent
readonly launchEvent: "launch" = "launch";Defined in: application/application-common.ts
Deprecated
Use the 'ready' event for application initialization and Application.setWindowContentResolver() to provide window UI. 'launch' continues to fire before the first window's content is created, and its 'root' property is still honored, for backwards compatibility. It never fires for additional windows. In a scene-based app it fires with the first window's content, so a background launch that connects no scene does not raise it.
Inherited from
layoutDirectionChangedEvent
readonly layoutDirectionChangedEvent: "layoutDirectionChanged" = "layoutDirectionChanged";Defined in: application/application-common.ts
Inherited from
ApplicationCommon.layoutDirectionChangedEvent
livesyncEvent
readonly livesyncEvent: "livesync" = "livesync";Defined in: application/application-common.ts
Inherited from
ApplicationCommon.livesyncEvent
loadAppCssEvent
readonly loadAppCssEvent: "loadAppCss" = "loadAppCss";Defined in: application/application-common.ts
Inherited from
ApplicationCommon.loadAppCssEvent
lowMemoryEvent
readonly lowMemoryEvent: "lowMemory" = "lowMemory";Defined in: application/application-common.ts
Inherited from
ApplicationCommon.lowMemoryEvent
mainEntry
protected mainEntry: NavigationEntry;Defined in: application/application-common.ts
Inherited from
notify
notify: <T>(eventData: T) => void;Defined in: application/application-common.ts
Type Parameters
| Type Parameter | Default type |
|---|---|
T | ApplicationEventData |
Parameters
| Parameter | Type |
|---|---|
eventData | T |
Returns
void
Inherited from
off
off: (eventNames: string, callback?: any, thisArg?: any) => void;Defined in: application/application-common.ts
Parameters
| Parameter | Type |
|---|---|
eventNames | string |
callback? | any |
thisArg? | any |
Returns
void
Inherited from
on
on: IOSApplicationOn;Defined in: application/application.d.ts:176
Overrides
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: "launch", callback: (args: LaunchEventData) => void, thisArg?: any): void;
(event: "ready", callback: (args: ApplicationEventData) => 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;
(event: "layoutDirectionChanged", callback: (args: LayoutDirectionChangedEventData) => void, thisArg?: any): void;
(event: "fontScaleChanged", callback: (args: FontScaleChangedEventData) => void, thisArg?: any): void;
(event: "windowOpen", callback: (args: WindowOpenEventData) => void, thisArg?: any): void;
(event: "windowClose", callback: (args: WindowCloseEventData) => void, thisArg?: any): void;
(event: "primaryWindowChanged", callback: (args: PrimaryWindowChangedEventData) => void, thisArg?: any): void;
(event: "sceneOpenURLContexts", callback: (args: SceneOpenURLContextsEventData) => void, thisArg?: any): void;
(event: "sceneContinueUserActivity", callback: (args: SceneContinueUserActivityEventData) => void, thisArg?: any): void;
(event: "scenePerformActionForShortcutItem", callback: (args: ScenePerformActionForShortcutItemEventData) => void, thisArg?: any): void;
};Defined in: application/application-common.ts
Call Signature
(
eventNames: string,
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
eventNames | string |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "cssChanged",
callback: (args: CssChangedEventData) => void,
thisArg?: any): void;This event is raised when application css is changed.
Parameters
| Parameter | Type |
|---|---|
event | "cssChanged" |
callback | (args: CssChangedEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "livesync",
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;Event raised then livesync operation is performed.
Parameters
| Parameter | Type |
|---|---|
event | "livesync" |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "launch",
callback: (args: LaunchEventData) => void,
thisArg?: any): void;This event is raised on application launchEvent.
Parameters
| Parameter | Type |
|---|---|
event | "launch" |
callback | (args: LaunchEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "ready",
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;This event is raised once the JS context is initialized.
Parameters
| Parameter | Type |
|---|---|
event | "ready" |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "displayed",
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;Experimental
This event is raised after the application has performed most of its startup actions. Its intent is to be suitable for measuring app startup times.
Parameters
| Parameter | Type |
|---|---|
event | "displayed" |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "suspend",
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;This event is raised when the Application is suspended.
Parameters
| Parameter | Type |
|---|---|
event | "suspend" |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "resume",
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;This event is raised when the Application is resumed after it has been suspended.
Parameters
| Parameter | Type |
|---|---|
event | "resume" |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "exit",
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;This event is raised when the Application is about to exit.
On Android it is raised when the last window closes; the process may stay alive. On iOS it is raised when the process itself terminates.
Parameters
| Parameter | Type |
|---|---|
event | "exit" |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "lowMemory",
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;This event is raised when there is low memory on the target device.
Parameters
| Parameter | Type |
|---|---|
event | "lowMemory" |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "uncaughtError",
callback: (args: UnhandledErrorEventData) => void,
thisArg?: any): void;This event is raised when an uncaught error occurs while the application is running.
Parameters
| Parameter | Type |
|---|---|
event | "uncaughtError" |
callback | (args: UnhandledErrorEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "discardedError",
callback: (args: DiscardedErrorEventData) => void,
thisArg?: any): void;This event is raised when an discarded error occurs while the application is running.
Parameters
| Parameter | Type |
|---|---|
event | "discardedError" |
callback | (args: DiscardedErrorEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "orientationChanged",
callback: (args: OrientationChangedEventData) => void,
thisArg?: any): void;This event is raised when the orientation of the application changes.
Parameters
| Parameter | Type |
|---|---|
event | "orientationChanged" |
callback | (args: OrientationChangedEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "systemAppearanceChanged",
callback: (args: SystemAppearanceChangedEventData) => void,
thisArg?: any): void;This event is raised when the operating system appearance changes between light and dark theme (for Android); between light and dark mode (for iOS) and vice versa.
Parameters
| Parameter | Type |
|---|---|
event | "systemAppearanceChanged" |
callback | (args: SystemAppearanceChangedEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "layoutDirectionChanged",
callback: (args: LayoutDirectionChangedEventData) => void,
thisArg?: any): void;This event is raised when the operating system layout direction changes between ltr and rtl.
Parameters
| Parameter | Type |
|---|---|
event | "layoutDirectionChanged" |
callback | (args: LayoutDirectionChangedEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "fontScaleChanged",
callback: (args: FontScaleChangedEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
event | "fontScaleChanged" |
callback | (args: FontScaleChangedEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "windowOpen",
callback: (args: WindowOpenEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
event | "windowOpen" |
callback | (args: WindowOpenEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "windowClose",
callback: (args: WindowCloseEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
event | "windowClose" |
callback | (args: WindowCloseEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "primaryWindowChanged",
callback: (args: PrimaryWindowChangedEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
event | "primaryWindowChanged" |
callback | (args: PrimaryWindowChangedEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "sceneOpenURLContexts",
callback: (args: SceneOpenURLContextsEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
event | "sceneOpenURLContexts" |
callback | (args: SceneOpenURLContextsEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "sceneContinueUserActivity",
callback: (args: SceneContinueUserActivityEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
event | "sceneContinueUserActivity" |
callback | (args: SceneContinueUserActivityEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "scenePerformActionForShortcutItem",
callback: (args: ScenePerformActionForShortcutItemEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
event | "scenePerformActionForShortcutItem" |
callback | (args: ScenePerformActionForShortcutItemEventData) => void |
thisArg? | any |
Returns
void
Inherited from
onSceneConfiguration
onSceneConfiguration: (application: UIApplication, connectingSceneSession: UISceneSession, options: UISceneConnectionOptions) => any;Defined in: application/application.d.ts:358
Register a callback to intercept scene configuration.
Called for every new scene session. Return a UISceneConfiguration to handle the scene yourself (e.g. CarPlay, external display), or return null/undefined to let NativeScript handle it with the default SceneDelegate.
NativeScript only auto-manages UIWindowSceneSessionRoleApplication scenes. All other scene roles are ignored unless you provide a configuration here.
Parameters
| Parameter | Type |
|---|---|
application | UIApplication |
connectingSceneSession | UISceneSession |
options | UISceneConnectionOptions |
Returns
any
Example
Application.ios.onSceneConfiguration = (app, session, options) => {
if (session.role === CPTemplateApplicationSceneSessionRoleApplication) {
const config = UISceneConfiguration.configurationWithNameSessionRole('CarPlay', session.role);
config.delegateClass = MyCarPlaySceneDelegate;
return config;
}
return null;
};orientationChangedEvent
readonly orientationChangedEvent: "orientationChanged" = "orientationChanged";Defined in: application/application-common.ts
Inherited from
ApplicationCommon.orientationChangedEvent
primaryWindowChangedEvent
readonly primaryWindowChangedEvent: "primaryWindowChanged";Defined in: application/application-common.ts
Inherited from
ApplicationCommon.primaryWindowChangedEvent
readyEvent
readonly readyEvent: "ready" = "ready";Defined in: application/application-common.ts
Raised once per JS context, as soon as the context is initialized. It is never deferred, so it also fires on a background launch where no window is created.
Guaranteed ordering: ready -> windowOpen -> raw connect/create events -> content resolution (the legacy launch bridge runs here, for the first window only) -> contentLoaded -> activate/displayed.
Inherited from
resumeEvent
readonly resumeEvent: "resume" = "resume";Defined in: application/application-common.ts
Inherited from
sceneDelegate
sceneDelegate: UIWindowSceneDelegate;Defined in: application/application.d.ts:334
The scene delegate for the application. Get the current one or set a custom one.
shouldDelayLaunchEvent
shouldDelayLaunchEvent: boolean;Defined in: application/application.d.ts:370
Delays the 'launch' event, and with it the creation of the first window's content, until the app first becomes active, instead of raising it while the app finishes launching.
Applies to non-scene apps only. It has no effect in a scene-based app, where each window's content is resolved as its scene connects.
Deprecated
Use the 'ready' event for application initialization, and Application.setWindowContentResolver() to provide window UI.
started
started: boolean;Defined in: application/application-common.ts
Inherited from
suspendEvent
readonly suspendEvent: "suspend" = "suspend";Defined in: application/application-common.ts
Reflects whole-app state: with multiple windows it is raised once the app itself is no longer in the foreground, not when an individual window backgrounds. Listen on a NativeWindow for per-window state.
Inherited from
ApplicationCommon.suspendEvent
systemAppearanceChangedEvent
readonly systemAppearanceChangedEvent: "systemAppearanceChanged" = "systemAppearanceChanged";Defined in: application/application-common.ts
Inherited from
ApplicationCommon.systemAppearanceChangedEvent
uncaughtErrorEvent
readonly uncaughtErrorEvent: "uncaughtError" = "uncaughtError";Defined in: application/application-common.ts
Inherited from
ApplicationCommon.uncaughtErrorEvent
windowCloseEvent
readonly windowCloseEvent: "windowClose";Defined in: application/application-common.ts
Inherited from
ApplicationCommon.windowCloseEvent
windowOpenEvent
readonly windowOpenEvent: "windowOpen";Defined in: application/application-common.ts
Inherited from
ApplicationCommon.windowOpenEvent
hasListeners
static hasListeners: (eventName: string) => boolean;Defined in: application/application-common.ts
Parameters
| Parameter | Type |
|---|---|
eventName | string |
Returns
boolean
Deprecated
Use Application.android.hasListeners() instead.
Inherited from
ApplicationCommon.hasListeners
notify
static notify: <T>(eventData: T) => void;Defined in: application/application-common.ts
Type Parameters
| Type Parameter | Default type |
|---|---|
T | ApplicationEventData |
Parameters
| Parameter | Type |
|---|---|
eventData | T |
Returns
void
Deprecated
Use Application.android.notify() instead.
Inherited from
off
static off: (eventNames: string, callback?: any, thisArg?: any) => void;Defined in: application/application-common.ts
Parameters
| Parameter | Type |
|---|---|
eventNames | string |
callback? | any |
thisArg? | any |
Returns
void
Deprecated
Use Application.android.off() instead.
Inherited from
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: "launch", callback: (args: LaunchEventData) => void, thisArg?: any): void;
(event: "ready", callback: (args: ApplicationEventData) => 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;
(event: "layoutDirectionChanged", callback: (args: LayoutDirectionChangedEventData) => void, thisArg?: any): void;
(event: "fontScaleChanged", callback: (args: FontScaleChangedEventData) => void, thisArg?: any): void;
(event: "windowOpen", callback: (args: WindowOpenEventData) => void, thisArg?: any): void;
(event: "windowClose", callback: (args: WindowCloseEventData) => void, thisArg?: any): void;
(event: "primaryWindowChanged", callback: (args: PrimaryWindowChangedEventData) => void, thisArg?: any): void;
(event: "sceneOpenURLContexts", callback: (args: SceneOpenURLContextsEventData) => void, thisArg?: any): void;
(event: "sceneContinueUserActivity", callback: (args: SceneContinueUserActivityEventData) => void, thisArg?: any): void;
(event: "scenePerformActionForShortcutItem", callback: (args: ScenePerformActionForShortcutItemEventData) => void, thisArg?: any): void;
};Defined in: application/application-common.ts
Call Signature
(
eventNames: string,
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
eventNames | string |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "cssChanged",
callback: (args: CssChangedEventData) => void,
thisArg?: any): void;This event is raised when application css is changed.
Parameters
| Parameter | Type |
|---|---|
event | "cssChanged" |
callback | (args: CssChangedEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "livesync",
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;Event raised then livesync operation is performed.
Parameters
| Parameter | Type |
|---|---|
event | "livesync" |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "launch",
callback: (args: LaunchEventData) => void,
thisArg?: any): void;This event is raised on application launchEvent.
Parameters
| Parameter | Type |
|---|---|
event | "launch" |
callback | (args: LaunchEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "ready",
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;This event is raised once the JS context is initialized.
Parameters
| Parameter | Type |
|---|---|
event | "ready" |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "displayed",
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;Experimental
This event is raised after the application has performed most of its startup actions. Its intent is to be suitable for measuring app startup times.
Parameters
| Parameter | Type |
|---|---|
event | "displayed" |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "suspend",
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;This event is raised when the Application is suspended.
Parameters
| Parameter | Type |
|---|---|
event | "suspend" |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "resume",
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;This event is raised when the Application is resumed after it has been suspended.
Parameters
| Parameter | Type |
|---|---|
event | "resume" |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "exit",
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;This event is raised when the Application is about to exit.
On Android it is raised when the last window closes; the process may stay alive. On iOS it is raised when the process itself terminates.
Parameters
| Parameter | Type |
|---|---|
event | "exit" |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "lowMemory",
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;This event is raised when there is low memory on the target device.
Parameters
| Parameter | Type |
|---|---|
event | "lowMemory" |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "uncaughtError",
callback: (args: UnhandledErrorEventData) => void,
thisArg?: any): void;This event is raised when an uncaught error occurs while the application is running.
Parameters
| Parameter | Type |
|---|---|
event | "uncaughtError" |
callback | (args: UnhandledErrorEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "discardedError",
callback: (args: DiscardedErrorEventData) => void,
thisArg?: any): void;This event is raised when an discarded error occurs while the application is running.
Parameters
| Parameter | Type |
|---|---|
event | "discardedError" |
callback | (args: DiscardedErrorEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "orientationChanged",
callback: (args: OrientationChangedEventData) => void,
thisArg?: any): void;This event is raised when the orientation of the application changes.
Parameters
| Parameter | Type |
|---|---|
event | "orientationChanged" |
callback | (args: OrientationChangedEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "systemAppearanceChanged",
callback: (args: SystemAppearanceChangedEventData) => void,
thisArg?: any): void;This event is raised when the operating system appearance changes between light and dark theme (for Android); between light and dark mode (for iOS) and vice versa.
Parameters
| Parameter | Type |
|---|---|
event | "systemAppearanceChanged" |
callback | (args: SystemAppearanceChangedEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "layoutDirectionChanged",
callback: (args: LayoutDirectionChangedEventData) => void,
thisArg?: any): void;This event is raised when the operating system layout direction changes between ltr and rtl.
Parameters
| Parameter | Type |
|---|---|
event | "layoutDirectionChanged" |
callback | (args: LayoutDirectionChangedEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "fontScaleChanged",
callback: (args: FontScaleChangedEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
event | "fontScaleChanged" |
callback | (args: FontScaleChangedEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "windowOpen",
callback: (args: WindowOpenEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
event | "windowOpen" |
callback | (args: WindowOpenEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "windowClose",
callback: (args: WindowCloseEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
event | "windowClose" |
callback | (args: WindowCloseEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "primaryWindowChanged",
callback: (args: PrimaryWindowChangedEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
event | "primaryWindowChanged" |
callback | (args: PrimaryWindowChangedEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "sceneOpenURLContexts",
callback: (args: SceneOpenURLContextsEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
event | "sceneOpenURLContexts" |
callback | (args: SceneOpenURLContextsEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "sceneContinueUserActivity",
callback: (args: SceneContinueUserActivityEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
event | "sceneContinueUserActivity" |
callback | (args: SceneContinueUserActivityEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "scenePerformActionForShortcutItem",
callback: (args: ScenePerformActionForShortcutItemEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
event | "scenePerformActionForShortcutItem" |
callback | (args: ScenePerformActionForShortcutItemEventData) => void |
thisArg? | any |
Returns
void
Deprecated
Use Application.android.on() instead.
Inherited from
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: "launch", callback: (args: LaunchEventData) => void, thisArg?: any): void;
(event: "ready", callback: (args: ApplicationEventData) => 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;
(event: "layoutDirectionChanged", callback: (args: LayoutDirectionChangedEventData) => void, thisArg?: any): void;
(event: "fontScaleChanged", callback: (args: FontScaleChangedEventData) => void, thisArg?: any): void;
(event: "windowOpen", callback: (args: WindowOpenEventData) => void, thisArg?: any): void;
(event: "windowClose", callback: (args: WindowCloseEventData) => void, thisArg?: any): void;
(event: "primaryWindowChanged", callback: (args: PrimaryWindowChangedEventData) => void, thisArg?: any): void;
(event: "sceneOpenURLContexts", callback: (args: SceneOpenURLContextsEventData) => void, thisArg?: any): void;
(event: "sceneContinueUserActivity", callback: (args: SceneContinueUserActivityEventData) => void, thisArg?: any): void;
(event: "scenePerformActionForShortcutItem", callback: (args: ScenePerformActionForShortcutItemEventData) => void, thisArg?: any): void;
};Defined in: application/application-common.ts
Call Signature
(
eventNames: string,
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
eventNames | string |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "cssChanged",
callback: (args: CssChangedEventData) => void,
thisArg?: any): void;This event is raised when application css is changed.
Parameters
| Parameter | Type |
|---|---|
event | "cssChanged" |
callback | (args: CssChangedEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "livesync",
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;Event raised then livesync operation is performed.
Parameters
| Parameter | Type |
|---|---|
event | "livesync" |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "launch",
callback: (args: LaunchEventData) => void,
thisArg?: any): void;This event is raised on application launchEvent.
Parameters
| Parameter | Type |
|---|---|
event | "launch" |
callback | (args: LaunchEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "ready",
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;This event is raised once the JS context is initialized.
Parameters
| Parameter | Type |
|---|---|
event | "ready" |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "displayed",
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;Experimental
This event is raised after the application has performed most of its startup actions. Its intent is to be suitable for measuring app startup times.
Parameters
| Parameter | Type |
|---|---|
event | "displayed" |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "suspend",
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;This event is raised when the Application is suspended.
Parameters
| Parameter | Type |
|---|---|
event | "suspend" |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "resume",
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;This event is raised when the Application is resumed after it has been suspended.
Parameters
| Parameter | Type |
|---|---|
event | "resume" |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "exit",
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;This event is raised when the Application is about to exit.
On Android it is raised when the last window closes; the process may stay alive. On iOS it is raised when the process itself terminates.
Parameters
| Parameter | Type |
|---|---|
event | "exit" |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "lowMemory",
callback: (args: ApplicationEventData) => void,
thisArg?: any): void;This event is raised when there is low memory on the target device.
Parameters
| Parameter | Type |
|---|---|
event | "lowMemory" |
callback | (args: ApplicationEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "uncaughtError",
callback: (args: UnhandledErrorEventData) => void,
thisArg?: any): void;This event is raised when an uncaught error occurs while the application is running.
Parameters
| Parameter | Type |
|---|---|
event | "uncaughtError" |
callback | (args: UnhandledErrorEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "discardedError",
callback: (args: DiscardedErrorEventData) => void,
thisArg?: any): void;This event is raised when an discarded error occurs while the application is running.
Parameters
| Parameter | Type |
|---|---|
event | "discardedError" |
callback | (args: DiscardedErrorEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "orientationChanged",
callback: (args: OrientationChangedEventData) => void,
thisArg?: any): void;This event is raised when the orientation of the application changes.
Parameters
| Parameter | Type |
|---|---|
event | "orientationChanged" |
callback | (args: OrientationChangedEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "systemAppearanceChanged",
callback: (args: SystemAppearanceChangedEventData) => void,
thisArg?: any): void;This event is raised when the operating system appearance changes between light and dark theme (for Android); between light and dark mode (for iOS) and vice versa.
Parameters
| Parameter | Type |
|---|---|
event | "systemAppearanceChanged" |
callback | (args: SystemAppearanceChangedEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "layoutDirectionChanged",
callback: (args: LayoutDirectionChangedEventData) => void,
thisArg?: any): void;This event is raised when the operating system layout direction changes between ltr and rtl.
Parameters
| Parameter | Type |
|---|---|
event | "layoutDirectionChanged" |
callback | (args: LayoutDirectionChangedEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "fontScaleChanged",
callback: (args: FontScaleChangedEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
event | "fontScaleChanged" |
callback | (args: FontScaleChangedEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "windowOpen",
callback: (args: WindowOpenEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
event | "windowOpen" |
callback | (args: WindowOpenEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "windowClose",
callback: (args: WindowCloseEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
event | "windowClose" |
callback | (args: WindowCloseEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "primaryWindowChanged",
callback: (args: PrimaryWindowChangedEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
event | "primaryWindowChanged" |
callback | (args: PrimaryWindowChangedEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "sceneOpenURLContexts",
callback: (args: SceneOpenURLContextsEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
event | "sceneOpenURLContexts" |
callback | (args: SceneOpenURLContextsEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "sceneContinueUserActivity",
callback: (args: SceneContinueUserActivityEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
event | "sceneContinueUserActivity" |
callback | (args: SceneContinueUserActivityEventData) => void |
thisArg? | any |
Returns
void
Call Signature
(
event: "scenePerformActionForShortcutItem",
callback: (args: ScenePerformActionForShortcutItemEventData) => void,
thisArg?: any): void;Parameters
| Parameter | Type |
|---|---|
event | "scenePerformActionForShortcutItem" |
callback | (args: ScenePerformActionForShortcutItemEventData) => void |
thisArg? | any |
Returns
void
Deprecated
Use Application.android.once() instead.
Inherited from
Accessors
activeWindow
Get Signature
get activeWindow(): NativeWindow;Defined in: application/application-common.ts
Get the NativeWindow the user is currently interacting with - the one that activated most recently and is still attached. Falls back to the primary window while no window holds activation, which is the case before the first window activates and on a platform that never raises activate.
Returns
Inherited from
ApplicationCommon.activeWindow
android
Get Signature
get android(): AndroidApplication;Defined in: application/application-common.ts
Returns
Inherited from
AndroidApplication
Get Signature
get AndroidApplication(): AndroidApplication;Defined in: application/application-common.ts
Returns
Inherited from
ApplicationCommon.AndroidApplication
autoSystemAppearanceChanged
Get Signature
get autoSystemAppearanceChanged(): boolean;Defined in: application/application-common.ts
Boolean to enable/disable systemAppearanceChanged
Returns
boolean
Set Signature
set autoSystemAppearanceChanged(value: boolean): void;Defined in: application/application-common.ts
Parameters
| Parameter | Type |
|---|---|
value | boolean |
Returns
void
Inherited from
ApplicationCommon.autoSystemAppearanceChanged
delegate
Get Signature
get delegate(): any;Defined in: application/application.d.ts:196
The UIApplicationDelegate class.
Returns
any
Set Signature
set delegate(value: any): void;Defined in: application/application.d.ts:201
Sets a custom UIApplicationDelegate class.
Parameters
| Parameter | Type |
|---|---|
value | any |
Returns
void
inBackground
Get Signature
get inBackground(): boolean;Defined in: application/application-common.ts
Returns
boolean
Inherited from
ApplicationCommon.inBackground
ios
Get Signature
get ios(): iOSApplication;Defined in: application/application-common.ts
Returns
iOSApplication
Inherited from
iOSApplication
Get Signature
get iOSApplication(): iOSApplication;Defined in: application/application-common.ts
Returns
iOSApplication
Inherited from
ApplicationCommon.iOSApplication
nativeApp
Get Signature
get nativeApp(): UIApplication;Defined in: application/application.d.ts:186
The UIApplication.
Returns
UIApplication
primaryWindow
Get Signature
get primaryWindow(): NativeWindow;Defined in: application/application-common.ts
Get the primary NativeWindow.
Returns
Inherited from
ApplicationCommon.primaryWindow
rootController
Get Signature
get rootController(): UIViewController;Defined in: application/application.d.ts:181
The root view controller for the application.
Returns
UIViewController
suspended
Get Signature
get suspended(): boolean;Defined in: application/application-common.ts
Returns
boolean
Inherited from
window
Get Signature
get window(): UIWindow;Defined in: application/application.d.ts:191
The key window.
Returns
UIWindow
Methods
_onPrimaryWindowPromoted()
protected _onPrimaryWindowPromoted(nativeWindow: NativeWindow): void;Defined in: application/application-common.ts
Hook for platform-specific bookkeeping right after a window takes over the primary role, before primaryWindowChanged is raised.
Parameters
| Parameter | Type |
|---|---|
nativeWindow | NativeWindow |
Returns
void
Inherited from
ApplicationCommon._onPrimaryWindowPromoted
_onWindowRegistered()
protected _onWindowRegistered(nativeWindow: NativeWindow): void;Defined in: application/application-common.ts
Hook for platform-specific bookkeeping right after a window joins the registry, before windowOpen is raised.
Parameters
| Parameter | Type |
|---|---|
nativeWindow | NativeWindow |
Returns
void
Inherited from
ApplicationCommon._onWindowRegistered
addCss()
addCss(cssText: string, attributeScoped?: boolean): void;Defined in: application/application-common.ts
Parameters
| Parameter | Type |
|---|---|
cssText | string |
attributeScoped? | boolean |
Returns
void
Inherited from
addDelegateHandler()
addDelegateHandler<T>(methodName: T, handler: any): void;Defined in: application/application.d.ts:244
Adds a delegate handler for the specified delegate method name. This method does not replace an existing handler, but rather adds the new handler to the existing chain of handlers.
Type Parameters
| Type Parameter |
|---|
T extends string | number | symbol |
Parameters
| Parameter | Type | Description |
|---|---|---|
methodName | T | The name of the delegate method to add a handler for. |
handler | any | A function that will be called when the specified delegate method is called. |
Returns
void
addNotificationObserver()
addNotificationObserver(notificationName: string, onReceiveCallback: (notification: NSNotification) => void): NotificationObserver;Defined in: application/application.d.ts:252
Adds an observer to the default notification center for the specified notification. For more information, please visit 'https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSNotificationCenter_Class/#//apple_ref/occ/instm/NSNotificationCenter/addObserver:selector:name:object:'
Parameters
| Parameter | Type | Description |
|---|---|---|
notificationName | string | A string containing the name of the notification. |
onReceiveCallback | (notification: NSNotification) => void | A callback function that will be called each time the observer receives a notification. |
Returns
NotificationObserver
applyCssClass()
applyCssClass(
rootView: View,
cssClasses: string[],
newCssClass: string,
skipCssUpdate?: boolean): void;Defined in: application/application-common.ts
Applies the the newCssClass to the rootView and removes all other css classes from cssClasses previously applied to the rootView.
Parameters
| Parameter | Type | Description |
|---|---|---|
rootView | View | - |
cssClasses | string[] | - |
newCssClass | string | - |
skipCssUpdate? | boolean | - |
Returns
void
Inherited from
ApplicationCommon.applyCssClass
closeWindow()
closeWindow(target?: any): void;Defined in: application/application.d.ts:291
Closes a secondary window/scene. If no target is provided, attempts to close a non-primary active scene.
Parameters
| Parameter | Type | Description |
|---|---|---|
target? | any | Optional target to resolve the window to close. Can be a NativeWindow, a View, a UIWindow, a UIWindowScene, or a string scene identifier. |
Returns
void
createRootView()
createRootView(
view?: View,
fireLaunchEvent?: boolean,
additionalLanchEventData?: any): View;Defined in: application/application-common.ts
Parameters
| Parameter | Type |
|---|---|
view? | View |
fireLaunchEvent? | boolean |
additionalLanchEventData? | any |
Returns
Inherited from
ApplicationCommon.createRootView
defaultDiscardSceneSessions()
defaultDiscardSceneSessions(application: UIApplication, sceneSessions: NSSet<UISceneSession>): void;Defined in: application/application.d.ts:236
NativeScript's default implementation of the UIApplicationDelegateapplicationDidDiscardSceneSessions method, which retires the windows belonging to the discarded sessions.
It is installed automatically on the application delegate class unless that class already implements the method, in which case forward to it from there so window bookkeeping stays correct.
Parameters
| Parameter | Type |
|---|---|
application | UIApplication |
sceneSessions | NSSet<UISceneSession> |
Returns
void
defaultSceneConfiguration()
defaultSceneConfiguration(
application: UIApplication,
connectingSceneSession: UISceneSession,
options: UISceneConnectionOptions): UISceneConfiguration;Defined in: application/application.d.ts:225
NativeScript's default implementation of the UIApplicationDelegateapplicationConfigurationForConnectingSceneSessionOptions method.
It is installed automatically on the application delegate class unless that class already implements the method. A delegate that does implement it can handle the scenes it cares about and forward the rest here:
applicationConfigurationForConnectingSceneSessionOptions(app, session, options) {
if (session.role === myCustomRole) {
return myConfig;
}
return Application.ios.defaultSceneConfiguration(app, session, options);
}onSceneConfiguration is consulted first. Scenes with the UIWindowSceneSessionRoleApplication role then get a configuration backed by NativeScript's SceneDelegate; every other role gets a bare configuration that NativeScript does not manage.
Parameters
| Parameter | Type |
|---|---|
application | UIApplication |
connectingSceneSession | UISceneSession |
options | UISceneConnectionOptions |
Returns
UISceneConfiguration
getAllScenes()
getAllScenes(): UIScene[];Defined in: application/application.d.ts:303
Gets all scenes for the application.
Returns
UIScene[]
Deprecated
Use getWindows() instead.
getAllWindows()
getAllWindows(): UIWindow[];Defined in: application/application.d.ts:297
Gets all windows for the application.
Returns
UIWindow[]
Deprecated
Use getWindows() instead.
getCssFileName()
getCssFileName(): string;Defined in: application/application-common.ts
Gets css file name for the application.
Returns
string
Inherited from
ApplicationCommon.getCssFileName
getLayoutDirection()
protected getLayoutDirection(): LayoutDirectionType;Defined in: application/application-common.ts
Returns
Inherited from
ApplicationCommon.getLayoutDirection
getMainEntry()
getMainEntry(): any;Defined in: application/application-common.ts
Returns
any
The main entry of the application
Inherited from
ApplicationCommon.getMainEntry
getNativeApplication()
getNativeApplication(): any;Defined in: application/application-common.ts
Returns
any
Inherited from
ApplicationCommon.getNativeApplication
getOrientation()
protected getOrientation(): "portrait" | "landscape" | "unknown";Defined in: application/application-common.ts
Returns
"portrait" | "landscape" | "unknown"
Inherited from
ApplicationCommon.getOrientation
getPrimaryScene()
getPrimaryScene(): any;Defined in: application/application.d.ts:321
Gets the primary scene for the application.
Returns
any
Deprecated
Use primaryWindow?.ios?.scene instead.
getPrimaryWindow()
getPrimaryWindow(): UIWindow;Defined in: application/application.d.ts:315
Gets the primary window for the application.
Returns
UIWindow
Deprecated
Use primaryWindow?.ios?.uiWindow instead.
getResources()
getResources(): any;Defined in: application/application-common.ts
Get application level static resources.
Returns
any
Inherited from
ApplicationCommon.getResources
getRootView()
getRootView(): View;Defined in: application/application-common.ts
Returns
Inherited from
getSystemAppearance()
protected getSystemAppearance(): "dark" | "light";Defined in: application/application-common.ts
Returns
"dark" | "light"
Inherited from
ApplicationCommon.getSystemAppearance
getWindowById()
getWindowById(id: string): NativeWindow;Defined in: application/application-common.ts
Get a registered NativeWindow by its id.
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Inherited from
ApplicationCommon.getWindowById
getWindowContentResolver()
getWindowContentResolver(): WindowContentResolver;Defined in: application/application-common.ts
Returns
The callback currently supplying window content, if any.
Inherited from
ApplicationCommon.getWindowContentResolver
getWindows()
Call Signature
getWindows(role: "all"): WindowBase[];Defined in: application/application-common.ts
Get the active windows, filtered by role.
Defaults to the view-carrying app windows (application and embedded). Pass 'all' to include every registered surface, including ones that carry no view tree.
Parameters
| Parameter | Type |
|---|---|
role | "all" |
Returns
Inherited from
Call Signature
getWindows(role?:
| WindowRole
| WindowRole[]): NativeWindow[];Defined in: application/application-common.ts
Get the active windows, filtered by role.
Defaults to the view-carrying app windows (application and embedded). Pass 'all' to include every registered surface, including ones that carry no view tree.
Parameters
| Parameter | Type |
|---|---|
role? | | WindowRole | WindowRole[] |
Returns
Inherited from
Call Signature
getWindows(role?:
| "all"
| WindowRole
| WindowRole[]): WindowBase[];Defined in: application/application-common.ts
Get the active windows, filtered by role.
Defaults to the view-carrying app windows (application and embedded). Pass 'all' to include every registered surface, including ones that carry no view tree.
Parameters
| Parameter | Type |
|---|---|
role? | | "all" | WindowRole | WindowRole[] |
Returns
Inherited from
getWindowScenes()
getWindowScenes(): UIWindowScene[];Defined in: application/application.d.ts:309
Gets all window scenes for the application.
Returns
UIWindowScene[]
Deprecated
Use getWindows() instead.
hasLaunched()
hasLaunched(): boolean;Defined in: application/application-common.ts
Returns
boolean
Inherited from
initRootView()
initRootView(rootView: View, window?: NativeWindow): void;Defined in: application/application-common.ts
Parameters
| Parameter | Type | Description |
|---|---|---|
rootView | View | - |
window? | NativeWindow | the window the root view belongs to. Supplies the window-scoped CSS classes; without it they come from the primary window. |
Returns
void
Inherited from
ApplicationCommon.initRootView
isUsingSceneLifecycle()
isUsingSceneLifecycle(): boolean;Defined in: application/application.d.ts:276
Checks if the application is using the scene lifecycle.
Returns
boolean
layoutDirection()
layoutDirection(): LayoutDirectionType;Defined in: application/application-common.ts
Returns
Deprecated
Use Application.primaryWindow?.layoutDirection() - or the NativeWindow of the relevant view - instead. Continues to reflect the primary window.
Inherited from
ApplicationCommon.layoutDirection
layoutDirectionChanged()
layoutDirectionChanged(rootView: View, newLayoutDirection: LayoutDirectionType): void;Defined in: application/application-common.ts
Updates root view classes including those of modals
Parameters
| Parameter | Type | Description |
|---|---|---|
rootView | View | the root view |
newLayoutDirection | LayoutDirectionType | the new layout direction change |
Returns
void
Inherited from
ApplicationCommon.layoutDirectionChanged
loadAppCss()
loadAppCss(): void;Defined in: application/application-common.ts
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
Inherited from
notifyLaunch()
protected notifyLaunch(additionalLanchEventData?: any): View;Defined in: application/application-common.ts
Parameters
| Parameter | Type |
|---|---|
additionalLanchEventData? | any |
Returns
Inherited from
ApplicationCommon.notifyLaunch
openWindow()
openWindow(options?: WindowOpenOptions): void;Defined in: application/application.d.ts:284
Opens a new window (scene).
Parameters
| Parameter | Type | Description |
|---|---|---|
options? | WindowOpenOptions | Options for the new window. options.data is serialized into the activating scene's NSUserActivity.userInfo. |
Returns
void
Overrides
orientation()
orientation(): "portrait" | "landscape" | "unknown";Defined in: application/application-common.ts
Returns
"portrait" | "landscape" | "unknown"
Deprecated
Use Application.primaryWindow?.orientation() - or the NativeWindow of the relevant view - instead. Continues to reflect the primary window.
Inherited from
orientationChanged()
orientationChanged(rootView: View, newOrientation: "portrait" | "landscape" | "unknown"): void;Defined in: application/application-common.ts
Parameters
| Parameter | Type |
|---|---|
rootView | View |
newOrientation | "portrait" | "landscape" | "unknown" |
Returns
void
Inherited from
ApplicationCommon.orientationChanged
removeNotificationObserver()
removeNotificationObserver(observer: any, notificationName: string): any;Defined in: application/application.d.ts:261
Removes the observer for the specified notification from the default notification center. For more information, please visit 'https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSNotificationCenter_Class/#//apple_ref/occ/instm/NSNotificationCenter/addObserver:selector:name:object:'
Parameters
| Parameter | Type | Description |
|---|---|---|
observer | any | The observer that was returned from the addNotificationObserver method. |
notificationName | string | A string containing the name of the notification. |
Returns
any
resetRootView()
resetRootView(entry?: string | NavigationEntry): void;Defined in: application/application-common.ts
Parameters
| Parameter | Type |
|---|---|
entry? | string | NavigationEntry |
Returns
void
Inherited from
ApplicationCommon.resetRootView
run()
run(entry?: string | NavigationEntry): void;Defined in: application/application-common.ts
Parameters
| Parameter | Type |
|---|---|
entry? | string | NavigationEntry |
Returns
void
Inherited from
setAutoSystemAppearanceChanged()
setAutoSystemAppearanceChanged(value: boolean): void;Defined in: application/application-common.ts
enable/disable systemAppearanceChanged
Parameters
| Parameter | Type |
|---|---|
value | boolean |
Returns
void
Inherited from
ApplicationCommon.setAutoSystemAppearanceChanged
setCssFileName()
setCssFileName(cssFileName: string): void;Defined in: application/application-common.ts
Sets css file name for the application.
Parameters
| Parameter | Type |
|---|---|
cssFileName | string |
Returns
void
Inherited from
ApplicationCommon.setCssFileName
setInBackground()
setInBackground(value: boolean, additonalData?: any): void;Defined in: application/application-common.ts
Parameters
| Parameter | Type |
|---|---|
value | boolean |
additonalData? | any |
Returns
void
Inherited from
ApplicationCommon.setInBackground
setLayoutDirection()
protected setLayoutDirection(value: LayoutDirectionType): void;Defined in: application/application-common.ts
Parameters
| Parameter | Type |
|---|---|
value | LayoutDirectionType |
Returns
void
Inherited from
ApplicationCommon.setLayoutDirection
setMaxRefreshRate()
setMaxRefreshRate(options?: {
max?: number;
min?: number;
preferred?: number;
}): void;Defined in: application/application-common.ts
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:
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>Parameters
| Parameter | Type | Description |
|---|---|---|
options? | { max?: number; min?: number; preferred?: number; } | { min?: number; max?: number; preferred?: number } |
options.max? | number | - |
options.min? | number | - |
options.preferred? | number | - |
Returns
void
Inherited from
ApplicationCommon.setMaxRefreshRate
setOrientation()
protected setOrientation(value: "portrait" | "landscape" | "unknown"): void;Defined in: application/application-common.ts
Parameters
| Parameter | Type |
|---|---|
value | "portrait" | "landscape" | "unknown" |
Returns
void
Inherited from
ApplicationCommon.setOrientation
setResources()
setResources(res: any): void;Defined in: application/application-common.ts
Set application level static resources.
Parameters
| Parameter | Type |
|---|---|
res | any |
Returns
void
Inherited from
ApplicationCommon.setResources
setSuspended()
setSuspended(value: boolean, additonalData?: any): void;Defined in: application/application-common.ts
Parameters
| Parameter | Type |
|---|---|
value | boolean |
additonalData? | any |
Returns
void
Inherited from
ApplicationCommon.setSuspended
setSystemAppearance()
protected setSystemAppearance(value: "dark" | "light"): void;Defined in: application/application-common.ts
Parameters
| Parameter | Type |
|---|---|
value | "dark" | "light" |
Returns
void
Inherited from
ApplicationCommon.setSystemAppearance
setWindowContentResolver()
setWindowContentResolver(resolver: WindowContentResolver): void;Defined in: application/application-common.ts
Sets the callback that supplies the UI for windows that need content. Pass null to remove a previously set resolver.
Parameters
| Parameter | Type |
|---|---|
resolver | WindowContentResolver |
Returns
void
Inherited from
ApplicationCommon.setWindowContentResolver
setWindowRootView()
setWindowRootView(window: UIWindow, view: View): void;Defined in: application/application.d.ts:328
Sets the root view for a specific window.
Parameters
| Parameter | Type | Description |
|---|---|---|
window | UIWindow | The window to set the root view for. |
view | View | The view to set as the root view. |
Returns
void
supportsMultipleScenes()
supportsMultipleScenes(): boolean;Defined in: application/application.d.ts:271
Checks if the application supports multiple scenes.
Returns
boolean
supportsScenes()
supportsScenes(): boolean;Defined in: application/application.d.ts:266
Checks if the application supports scenes.
Returns
boolean
systemAppearance()
systemAppearance(): "dark" | "light";Defined in: application/application-common.ts
Returns
"dark" | "light"
Deprecated
Use Application.primaryWindow?.systemAppearance() - or the NativeWindow of the relevant view - instead. Continues to reflect the primary window.
Inherited from
ApplicationCommon.systemAppearance
systemAppearanceChanged()
systemAppearanceChanged(rootView: View, newSystemAppearance: "dark" | "light"): void;Defined in: application/application-common.ts
Updates root view classes including those of modals
Parameters
| Parameter | Type | Description |
|---|---|---|
rootView | View | the root view |
newSystemAppearance | "dark" | "light" | the new appearance change |
Returns
void
Inherited from
- Previous
- InheritedProperty
- Next
- ItemSpec