Inherits from TiHost
Conforms to UIApplicationDelegate
Declared in TiApp.h

Overview

TiApp represents an instance of an application. There is always only one instance per application which could be accessed through app class method.

Tasks

Properties

controller

Returns the application’s root view controller.

@property (nonatomic, retain) TiRootViewController *controller

Declared In

TiApp.h

remoteNotification

Returns details for the last remote notification.

@property (nonatomic, readonly) NSDictionary *remoteNotification

Discussion

Dictionary containing details about remote notification, or nil.

Declared In

TiApp.h

window

Returns application’s primary window.

@property (nonatomic, retain) IBOutlet UIWindow *window

Discussion

Convenience method to access the application’s primary window

Declared In

TiApp.h

Class Methods

app

Returns singleton instance of TiApp application object.

+ (TiApp *)app

Declared In

TiApp.h

Instance Methods

hideModalController:animated:

Tells application to hide modal view controller.

- (void)hideModalController:(UIViewController *)controller animated:(BOOL)animated

Parameters

controller

The view controller to hide.

animated

If YES, animates the view controller as it’s hidden; otherwise, does not.

Declared In

TiApp.h

launchOptions

Returns application launch options

- (NSDictionary *)launchOptions

Return Value

The launch options dictionary.

Discussion

The method provides access to application launch options that became available when application just launched.

Declared In

TiApp.h

localNotification

Returns local notification that has bees sent on the application.

- (UILocalNotification *)localNotification

Return Value

The last local notification

Declared In

TiApp.h

remoteDeviceUUID

Returns remote UUID for the current running device.

- (NSString *)remoteDeviceUUID

Return Value

Current device UUID.

Declared In

TiApp.h

sessionId

Returns unique identifier for the current application launch.

- (NSString *)sessionId

Return Value

Current session id.

Declared In

TiApp.h

showModalController:animated:

Tells application to display modal view controller.

- (void)showModalController:(UIViewController *)controller animated:(BOOL)animated

Parameters

controller

The view controller to display.

animated

If YES, animates the view controller as it’s presented; otherwise, does not.

Declared In

TiApp.h

startNetwork

Tells application to show network activity indicator.

- (void)startNetwork

Discussion

Every call of startNetwork should be paired with stopNetwork.

See Also

Declared In

TiApp.h

stopNetwork

Tells application to hide network activity indicator.

- (void)stopNetwork

Discussion

Every call of stopNetwork should have corresponding startNetwork call.

See Also

Declared In

TiApp.h

userAgent

Returns user agent string to use for network requests.

- (NSString *)userAgent

Return Value

User agent string

Declared In

TiApp.h