• BlackBerry Dynamics
  • Runtime library for iOS applications
  • 7.1.0.193
GDState Class Reference

BlackBerry Dynamics run-time state. More...

#import <GDState.h>

Inherits NSObject.

Description

This class represents a number of aspects of the BlackBerry Dynamics run-time state. The representation is compliant with key-value observing (KVO). An instance of this class is also used as the object from which notifications of configuration changes are posted.

The following aspects of run-time state are represented here.

  • Authorization state.
  • Whether the BlackBerry Dynamics user interface is currently in front of the application user interface.

Changes to the following types of configuration are posted from here.

Synchronous access and notifications

To get a current state synchronously, read the instance's properties. To receive a notification whenever an aspect of the current state changes, use KVO or NSNotificationCenter programming interfaces, with the following notes.

Notes on KVO usage:

  • To get an object whose properties are suitable for observing, access the state (GDiOS) property.
  • Use the GDState constants to specify the paths of properties of the observable object.

Notes on NSNotificationCenter usage:

  • Set the notification name to one of the GDState constants.
  • Set the notification object to the GDState instance that is accessible as the state (GDiOS) property.
  • In addition to the base NSNotification, the notifications for state changes will include a userInfo dictionary with the following items.
    • Name of the property whose change triggered the notification, in the key named by the GDStateChangeKeyProperty constant.
    • Copy of the GDState instance as it was after the change, in the key named by the GDStateChangeKeyCopy constant.
See also
Key-Value Observing Programming Guide on the apple.com developer website.
NSNotificationCenter class reference on the apple.com developer website.

Alternatives

Using this class is an alternative to using some parts of using the GDiOSDelegate class.

If the application uses this class to monitor authorization, and doesn't implement GDiOSDelegate, then the BlackBerry Dynamics event receiver check must be switched off. Instructions for switching off are on the Build-Time Configuration page, under the Event Receiver Check heading.

See also
Sample code in the GreetingsServer application that comes with the BlackBerry Dynamics software development kit for iOS.

Properties

BOOL isAuthorized
 BlackBerry Dynamics authorization state. More...
 
GDAppResultCode reasonNotAuthorized
 Reason the user isn't authorized, if they aren't. More...
 
GDUserInterfaceState userInterfaceState
 Which user interface is in front. More...
 
GDLibraryScreen currentScreen
 Limited indication of which screen from the BlackBerry Dynamics user interface is in front, if any. More...
 
BBDActivationState activationState
 BlackBerry Dynamics activation state. More...
 
NSArray< NSString * > * activationProcessingDescriptions
 An Array containing static descriptions of Blackberry Dynamics activation processing states. More...
 
NSUInteger activationProcessingIndex
 An integer representing the current activation processing stage. More...
 

Property Documentation

◆ isAuthorized

- (BOOL) isAuthorized
readnonatomicassign

The BlackBerry Dynamics runtime sets this property to NO when the application starts.

The BlackBerry Dynamics runtime sets this property to YES when authorization processing completes with success. The property value remains the same when the inactivity time expires and the user interface is locked.

The BlackBerry Dynamics runtime sets this property to NO if the end user's authorization to use the application is permanently withdrawn. For example, when any of the following happen.

  • A remote lock container management command is received from the enterprise management console.
  • An enterprise policy violation is detected.

If this property has the value YES, then the prinicipal programming interfaces of BlackBerry Dynamics can be used by the application code. This includes access to the secure store and secure communication, for example.

See also
GDiOS for more details on authorization processing and states.

◆ reasonNotAuthorized

- (GDAppResultCode) reasonNotAuthorized
readnonatomicassign

The BlackBerry Dynamics runtime sets this property when the user isn't authorized, i.e. when the isAuthorized property is NO. The value set represents the reason that the user isn't authorized. It will be from the GDAppResultCode enumeration.

◆ userInterfaceState

- (GDUserInterfaceState) userInterfaceState
readnonatomicassign

The BlackBerry Dynamics runtime sets this property to GDUIStateGDLibraryInFront when any of its built-in screens is in front of the application user interface.

The BlackBerry Dynamics runtime sets this property to a different value otherwise. See the GDUserInterfaceState enumeration.

◆ currentScreen

- (GDLibraryScreen) currentScreen
readnonatomicassign

The BlackBerry Dynamics runtime sets this property when its user interface is in front, i.e. when it has set userInterfaceState to GDUIStateGDLibraryInFront. The value set gives a limited indication of which screen it is showing. See the GDLibraryScreen enumeration.

◆ activationState

- (BBDActivationState) activationState
readnonatomicassign

This property is used to indicate the current state of the BlackBerry Dynamics activation process.

◆ activationProcessingDescriptions

- (NSArray<NSString *>*) activationProcessingDescriptions
readnonatomicassign

NSArray of NSString descriptions of Blackberry Dynamics activation processing states. To retrieve the current activation processing state use activationProcessingIndex

◆ activationProcessingIndex

- (NSUInteger) activationProcessingIndex
readnonatomicassign

Use this index to access the descriptions contained within activationProcessingDescriptions


The documentation for this class was generated from the following file: