UAirship Class Reference
Inherits from | NSObject |
Declared in | UAirship.h |
Overview
UAirship manages the shared state for all Urban Airship services. [UAirship takeOff:] should be
called from within your application delegate’s application:didFinishLaunchingWithOptions:
method
to initialize the shared instance.
Tasks
Other Methods
-
config
property -
analytics
property -
actionRegistry
property -
applicationMetrics
property -
remoteNotificationBackgroundModeEnabled
property -
jsDelegate
property -
whitelist
property
Logging
Lifecycle
Instance Accessors
Properties
actionRegistry
The default action registry.
@property (nonatomic, strong, readonly) UAActionRegistry *actionRegistry
Declared In
UAirship.h
analytics
The shared analytics manager. There are not currently any user-defined events, so this is for internal library use only at this time.
@property (nonatomic, strong, readonly) UAAnalytics *analytics
Declared In
UAirship.h
applicationMetrics
Stores common application metrics such as last open.
@property (nonatomic, strong, readonly) UAApplicationMetrics *applicationMetrics
Declared In
UAirship.h
config
The application configuration. This is set on takeOff.
@property (nonatomic, strong, readonly) UAConfig *config
Declared In
UAirship.h
jsDelegate
A user configurable JavaScript delegate.
@property (nonatomic, weak, nullable) id<UAJavaScriptDelegate> jsDelegate
Discussion
NOTE: this delegate is not retained.
Declared In
UAirship.h
Class Methods
inAppMessaging
Returns the UAInAppMessaging
instance. Used for customizing
in-app notifications.
+ (null_unspecified UAInAppMessaging *)inAppMessaging
Declared In
UAirship.h
inbox
Returns the UAInbox
instance. Provides access to the inbox messages.
+ (null_unspecified UAInbox *)inbox
Return Value
The UAInbox
instance.
Declared In
UAirship.h
inboxUser
Returns the UAUser
instance.
+ (null_unspecified UAUser *)inboxUser
Return Value
The UAUser
instance.
Declared In
UAirship.h
push
Returns the UAPush
instance. Used for configuring and managing push
notifications.
+ (null_unspecified UAPush *)push
Return Value
The UAPush
instance.
Declared In
UAirship.h
setLogLevel:
Sets the log level for the Urban Airship library. The log level defaults to UALogLevelDebug
for development apps, and UALogLevelError
for production apps (when the inProduction
AirshipConfig flag is set to YES
). Values set with this method prior to takeOff
will be overridden
during takeOff.
+ (void)setLogLevel:(UALogLevel)level
Parameters
- level
The desired
UALogLevel
value.
Declared In
UAirship.h
setLogging:
Enables or disables logging. Logging is enabled by default, though the log level must still be set to an appropriate value.
+ (void)setLogging:(BOOL)enabled
Parameters
- enabled
If
YES
, console logging is enabled.
Declared In
UAirship.h
setLoudImpErrorLogging:
Enables or disables logging implementation errors with emoji to make it stand out in the console. It is enabled by default, and will be disabled for production applications.
+ (void)setLoudImpErrorLogging:(BOOL)enabled
Parameters
- enabled
If
YES
, loud implementation error logging is enabled.
Declared In
UAirship.h
shared
Returns the UAirship
instance.
+ (null_unspecified UAirship *)shared
Return Value
The UAirship
instance.
Declared In
UAirship.h
takeOff
Simplified takeOff
method that uses AirshipConfig.plist
for initialization.
+ (void)takeOff
Declared In
UAirship.h
takeOff:
Initializes UAirship and performs all necessary setup. This creates the shared instance, loads configuration values, initializes the analytics/reporting module and creates a UAUser if one does not already exist.
+ (void)takeOff:(nullable UAConfig *)config
Parameters
- config
The populated UAConfig to use.
Discussion
This method must be called from your application delegate’s
application:didFinishLaunchingWithOptions:
method, and it may be called
only once.
Warning: takeOff:
must be called on the main thread. This method will throw
an UAirshipTakeOffMainThreadException
if it is run on a background thread.
Declared In
UAirship.h