• BlackBerry Dynamics
  • Runtime library for iOS applications
  • 10.2.0.83
GDiOS.h
Go to the documentation of this file.
1 /*
2  * (c) 2018 BlackBerry Limited. All rights reserved.
3  *
4  */
5 
6 #ifndef __GD_IOS_H__
7 #define __GD_IOS_H__
8 
9 #import <UIKit/UIKit.h>
10 #import "GDAppResultCode.h"
11 #import "GDAppConfig.h"
12 #import "GDVersion.h"
13 
14 /* \cond DOXYGEN_IGNORE */
15 // See: http://clang.llvm.org/docs/LanguageExtensions.html
16 #ifndef __has_extension
17 #define __has_extension(x) 0 // Compatibility with non-clang compilers.
18 #endif
19 /* \endcond */
20 
22 
23 
30 typedef NS_ENUM(NSInteger, GDServiceType)
31 {
36 };
37 
38 
39 NS_ASSUME_NONNULL_BEGIN
40 
46 @interface GDAppEvent : NSObject
47 {
48 
49  NSString* message;
50 
52 
54 }
55 
62 @property (nonatomic, copy) NSString* message;
63 
70 @property (nonatomic, assign) GDAppResultCode code;
71 /* error code 0, means success */
72 
79 @property (nonatomic, assign) GDAppEventType type;
80 
81 @end
82 
83 
92 @protocol GDiOSDelegate
93 @optional
94 
103 - (void)handleEvent:(GDAppEvent*)anEvent;
104 
105 @end
106 
608 @interface GDiOS : NSObject
609 
622 + (instancetype)sharedInstance;
623 
754 - (void)authorize:(id<GDiOSDelegate> _Nonnull)delegate;
755 
773 - (void)authorize;
774 
818 - (BOOL)authorizeAutonomously:(id<GDiOSDelegate> _Nonnull)delegate;
819 
833 - (BOOL)authorizeAutonomously;
834 
898 typedef NSString *ActivationParameter;
905 
936 - (void)programmaticAuthorize:(NSDictionary<ActivationParameter, id> *)activationParameters;
937 
938 /* \cond DOXYGEN_IGNORE */
939 #if __has_extension(attribute_deprecated_with_message)
940 # define DEPRECATE_PROGRAMMATICAUTHORIZE __attribute((deprecated("Use -programmaticAuthorize:activationParameters instead.")))
941 #else
942 # define DEPRECATE_PROGRAMMATICAUTHORIZE __attribute((deprecated))
943 #endif
944 /* \endcond */
945 
957 - (void)programmaticAuthorize:(NSString *)userID withAccessKey:(NSString *)accessKey DEPRECATE_PROGRAMMATICAUTHORIZE;
958 
1001 - (void)programmaticAuthorize:(NSString *)userID
1002  withAccessKey:(NSString *)accessKey
1003  networkOperationCenter:(NSURL *)nocAddress DEPRECATE_PROGRAMMATICAUTHORIZE;
1004 
1005 #undef DEPRECATE_PROGRAMMATICAUTHORIZE
1006 
1019 @property (nonatomic, assign, readonly, getter=isActivated) BOOL activationComplete;
1020 
1332 - (NSDictionary<NSString *, id> *)getApplicationConfig;
1333 
1389 - (NSDictionary<NSString *, id> *)getApplicationPolicy;
1390 
1420 - (NSString*)getApplicationPolicyString;
1421 
1515 - (NSArray<GDServiceProvider *> *)getServiceProviders;
1516 
1552 - (NSArray<GDServiceProvider *> *)getServiceProvidersFor:(NSString*)serviceId andVersion:(nullable NSString*)version andServiceType:(GDServiceType)serviceType;
1553 
1554 
1555 #undef DEPRECATE_GETSERVICEPROVIDERSFOR
1556 
1573 typedef void (^GDGetEntitlementVersionsForBlock) (NSArray<GDVersion *>* _Nullable entitlementVersions, NSError* error);
1574 
1642 - (void)getEntitlementVersionsFor:(NSString*)identifier
1643  callbackBlock:(GDGetEntitlementVersionsForBlock)block;
1644 
1645 /* \cond DOXYGEN_IGNORE */
1646 #if __has_extension(attribute_deprecated_with_message)
1647 # define DEPRECATE_GETWINDOW __attribute((deprecated("Use the window property from the main app delegate instance.")))
1648 #else
1649 # define DEPRECATE_GETWINDOW __attribute((deprecated))
1650 #endif
1651 /* \endcond */
1652 
1683 - (UIWindow*)getWindow DEPRECATE_GETWINDOW;
1684 
1685 #undef DEPRECATE_GETWINDOW
1686 
1693 - (NSString*)getVersion;
1694 
1715 - (BOOL)showPreferenceUI:(nullable UIViewController*)baseViewController;
1716 
1749 - (void)configureUIWithLogo:(NSString*)imagePath
1750  bundle:(nullable NSBundle*)bundle
1751  color:(nullable UIColor*)color;
1752 
1765 @property (nullable, nonatomic, weak) id<GDiOSDelegate> delegate;
1766 
1767 /* \cond DOXYGEN_IGNORE */
1768 #if __has_extension(attribute_deprecated_with_message)
1769 # define DEPRECATE_LAUNCHOPTIONS __attribute__((deprecated("No longer required.")))
1770 #else
1771 # define DEPRECATE_LAUNCHOPTIONS __attribute__((deprecated))
1772 #endif
1773 /* \endcond */
1774 
1794 @property (nullable, nonatomic, strong) NSDictionary<NSObject *, id>* launchOptions DEPRECATE_LAUNCHOPTIONS;
1795 
1838 @property (nonatomic, readonly) BOOL canAuthorizeAutonomously;
1839 
1858 - (BOOL)executeRemoteLock;
1859 
1885 - (void)executeBlock:(NSString *)blockId withTitle:(NSString *)title withMessage:(NSString *)message;
1886 
1895 - (void)executeUnblock:(NSString *)blockId;
1896 
1909 -(BOOL)executePendingConsoleMigration:(NSString *)destinationTenantID withUemServerAddress:(NSString *)uemServerAddress;
1910 
1923 @property (nonatomic, strong, readonly) GDState *state;
1924 
1925 @end
1926 
1927 NS_ASSUME_NONNULL_END
1928 
1929 #endif /* __GD_IOS_H__ */
GDAppEvent::message
NSString * message
Textual description of the event.
Definition: GDiOS.h:49
GDiOS::activationComplete
BOOL activationComplete
Application activation status.
Definition: GDiOS.h:1019
GDiOS::ActivationParameterEnrollmentAddress
const ActivationParameter ActivationParameterEnrollmentAddress
Definition: GDiOS.h:903
GDiOS::ActivationParameterPassword
const ActivationParameter ActivationParameterPassword
Definition: GDiOS.h:904
-[GDiOS getApplicationConfig]
NSDictionary< NSString *, id > * getApplicationConfig()
Get application configuration and other settings from the enterprise.
+[GDiOS sharedInstance]
instancetype sharedInstance()
Get a reference to the runtime interface object.
GDAppEvent::type
GDAppEventType type
Numeric event type.
Definition: GDiOS.h:53
GDServiceTypeApplication
@ GDServiceTypeApplication
Application-based service.
Definition: GDiOS.h:33
GDiOS::ActivationParameterShowUserInterface
const ActivationParameter ActivationParameterShowUserInterface
Definition: GDiOS.h:902
GDServiceTypeServer
@ GDServiceTypeServer
Server-based service.
Definition: GDiOS.h:35
GDiOS::ActivationParameterUserIdentifier
const ActivationParameter ActivationParameterUserIdentifier
Definition: GDiOS.h:899
-[GDiOS authorize]
void authorize()
Connect to the BlackBerry Dynamics infrastructure, without specifying a delegate.
GDiOS
BlackBerry Dynamics Runtime object interface, including authorization.
Definition: GDiOS.h:608
GDiOS::ActivationParameter
NSString * ActivationParameter
String constants used as keys for programmatic activation parameters.
Definition: GDiOS.h:898
-[GDiOS executeRemoteLock]
BOOL executeRemoteLock()
Lock the application permanently.
-[GDiOS authorizeAutonomously]
BOOL authorizeAutonomously()
Connect to the BlackBerry Dynamics infrastructure in background, without specifying a delegate.
GDAppConfig.h
GDiOS::canAuthorizeAutonomously
BOOL canAuthorizeAutonomously
Whether it is possible to authorize autonomously.
Definition: GDiOS.h:1838
GDiOS::state
GDState * state
Observable representation of authorization state and user interface state.
Definition: GDiOS.h:1923
GDiOS::delegate
id< GDiOSDelegate > delegate
Delegated event-handling.
Definition: GDiOS.h:1765
GDAppEvent::code
GDAppResultCode code
Numeric result code.
Definition: GDiOS.h:51
GDVersion.h
GDiOSDelegate-p
Handler for events dispatched from the BlackBerry Dynamics Runtime, including authorization events.
Definition: GDiOS.h:92
GDAppResultCode
GDAppResultCode
Constants for GDAppEvent result code.
Definition: GDAppResultCode.h:114
GDiOS::ActivationParameterNOCAddress
const ActivationParameter ActivationParameterNOCAddress
Definition: GDiOS.h:901
-[GDiOS getApplicationPolicyString]
NSString * getApplicationPolicyString()
Get application-specific policy settings from the enterprise management console, as JSON.
GDAppEvent
Event dispatched from the BlackBerry Dynamics runtime.
Definition: GDiOS.h:46
GDiOS::GDGetEntitlementVersionsForBlock
void(^ GDGetEntitlementVersionsForBlock)(NSArray< GDVersion * > *_Nullable entitlementVersions, NSError *error)
Type for getEntitlementsFor block parameter.
Definition: GDiOS.h:1573
-[GDiOS getServiceProviders]
NSArray< GDServiceProvider * > * getServiceProviders()
Get providers of shared services.
-[GDiOS getApplicationPolicy]
NSDictionary< NSString *, id > * getApplicationPolicy()
Get application-specific policy settings from the enterprise management console, as a collection.
GDiOS::launchOptions
NSDictionary< NSObject *, id > * launchOptions
Application launch options (deprecated).
Definition: GDiOS.h:1794
GDAppResultCode.h
-[GDiOS getWindow]
UIWindow * getWindow()
Get the UIWindow for the application (deprecated).
GDState
BlackBerry Dynamics run-time state.
Definition: GDState.h:314
GDVersion
BlackBerry Dynamics entitlement version.
Definition: GDVersion.h:78
GDiOS::ActivationParameterAccessKey
const ActivationParameter ActivationParameterAccessKey
Definition: GDiOS.h:900
GDServiceType
GDServiceType
Constants for BlackBerry Dynamics service type.
Definition: GDiOS.h:30
GDServiceProvider
Service provider details.
Definition: GDServiceProvider.h:37
GDAppEventType
GDAppEventType
Constants for GDAppEvent type.
Definition: GDAppResultCode.h:15
-[GDiOS getVersion]
NSString * getVersion()
Get the BlackBerry Dynamics runtime library version.