IModelApp Class

Global singleton that connects the user interface with the iTwin.js services. There can be only one IModelApp active in a session. All members of IModelApp are static, and it serves as a singleton object for gaining access to session information.

Before any interactive operations may be performed by the @itwin/core-frontend package, IModelApp.startup must be called and awaited. Applications may customize the frontend behavior of iTwin.js by supplying options to IModelApp.startup.

Methods

Name Description
constructor(): IModelApp Protected    
getAccessToken(): Promise<string> Static Get the user's access token for this IModelApp, or a blank string if none is available.  
makeLogoCard(opts: { heading: string | HTMLElement, iconSrc?: string | HTMLImageElement, iconWidth?: number, notice?: string | HTMLElement }): HTMLTableRowElement Static Make a new Logo Card. Beta  
queryRenderCompatibility(): WebGLRenderCompatibilityInfo Static Obtain WebGL rendering compatibility information for the client system.  
shutdown(): Promise<void> Static Must be called before the application exits to release any held resources.  
startup(opts?: IModelAppOptions): Promise<void> Static This method must be called before any other @itwin/core-frontend methods are used.  
stopEventLoop(): void Static Strictly for tests.  
translateStatus(status: number): string Static Localize an error status Beta  

Properties

Name Type Description
accuSnap Accessor StaticReadOnly AccuSnap The AccuSnap for this session.  
animationInterval Accessor Static undefined | BeDuration Controls how frequently the application polls for changes that may require a new animation frame to be requested.  
applicationId Accessor StaticReadOnly string The Id of this application.  
applicationLogoCard Static undefined | () => HTMLTableRowElement    
applicationVersion Accessor StaticReadOnly string The version of this application.  
authorizationClient Static undefined | AuthorizationClient Provides authorization information for various frontend APIs  
localization Accessor StaticReadOnly Localization The Localization for this session.  
locateManager Accessor StaticReadOnly ElementLocateManager    
notifications Accessor StaticReadOnly NotificationManager The NotificationManager for this session.  
onBeforeShutdown StaticReadonly BeEvent<() => void> Event raised just before the frontend IModelApp is to be shut down  
publicPath Accessor StaticReadOnly string The root URL for the assets 'public' folder.  
quantityFormatter Accessor StaticReadOnly QuantityFormatter The QuantityFormatter for this session.  
realityDataAccess Accessor StaticReadOnly undefined | RealityDataAccess Provides access to the RealityData service implementation for this IModelApp  
renderSystem Accessor StaticReadOnly RenderSystem The RenderSystem for this session.  
securityOptions Accessor StaticReadOnly FrontendSecurityOptions The requested security options for the frontend.  
sessionId Static string A uniqueId for this session  
terrainProviderRegistry Accessor StaticReadOnly TerrainProviderRegistry The TerrainProviderRegistry for this session.  
tileAdmin Accessor StaticReadOnly TileAdmin The TileAdmin for this session.  
toolAdmin Accessor StaticReadOnly ToolAdmin The ToolAdmin for this session.  
tools StaticReadonly ToolRegistry The ToolRegistry for this session.  
uiAdmin Accessor StaticReadOnly UiAdmin The UiAdmin for this session.  
userPreferences Accessor StaticReadOnly undefined | UserPreferencesAccess The UserPreferencesAccess for this session.  
viewManager Accessor StaticReadOnly ViewManager The ViewManager for this session.  

Defined in

Last Updated: 21 November, 2022