• BlackBerry Dynamics
  • Runtime library for iOS applications
  • 12.0.1.79
GDiOS.h
Go to the documentation of this file.
1 /*
2  * (c) 2023 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 
50 @interface GDAuthDelegateInfo : NSObject
51 
59 @property (nonatomic, copy) NSString* name;
60 
68 @property (nonatomic, copy) NSString* address;
69 
77 @property (nonatomic, copy) NSString* applicationId;
78 
87 @property (nonatomic, assign) BOOL isAuthenticationDelegated;
88 
93 - (NSString *)description;
94 
95 @end
96 
104 @interface GDAppEvent : NSObject
105 {
106 
107  NSString* message;
108 
110 
112 }
113 
120 @property (nonatomic, copy) NSString* message;
121 
128 @property (nonatomic, assign) GDAppResultCode code;
129 /* error code 0, means success */
130 
137 @property (nonatomic, assign) GDAppEventType type;
138 
139 @end
140 
141 
151 @protocol GDiOSDelegate
152 @optional
153 
162 - (void)handleEvent:(GDAppEvent*)anEvent;
163 
164 @end
165 
271 @interface GDiOS : NSObject
272 
285 + (instancetype)sharedInstance;
286 
417 - (void)authorize:(id<GDiOSDelegate> _Nonnull)delegate;
418 
436 - (void)authorize;
437 
481 - (BOOL)authorizeAutonomously:(id<GDiOSDelegate> _Nonnull)delegate;
482 
496 - (BOOL)authorizeAutonomously;
497 
504 
568 typedef NSString *ActivationParameter;
575 
606 - (void)programmaticAuthorize:(NSDictionary<ActivationParameter, id> *)activationParameters;
607 
608 /* \cond DOXYGEN_IGNORE */
609 #if __has_extension(attribute_deprecated_with_message)
610 # define DEPRECATE_PROGRAMMATICAUTHORIZE __attribute((deprecated("Use -programmaticAuthorize:activationParameters instead.")))
611 #else
612 # define DEPRECATE_PROGRAMMATICAUTHORIZE __attribute((deprecated))
613 #endif
614 /* \endcond */
615 
627 - (void)programmaticAuthorize:(NSString *)userID withAccessKey:(NSString *)accessKey DEPRECATE_PROGRAMMATICAUTHORIZE;
628 
671 - (void)programmaticAuthorize:(NSString *)userID
672  withAccessKey:(NSString *)accessKey
673  networkOperationCenter:(NSURL *)nocAddress DEPRECATE_PROGRAMMATICAUTHORIZE;
674 
675 #undef DEPRECATE_PROGRAMMATICAUTHORIZE
676 
689 @property (nonatomic, assign, readonly, getter=isActivated) BOOL activationComplete;
690 
1002 - (NSDictionary<NSString *, id> *)getApplicationConfig;
1003 
1059 - (NSDictionary<NSString *, id> *)getApplicationPolicy;
1060 
1090 - (NSString*)getApplicationPolicyString;
1091 
1185 - (NSArray<GDServiceProvider *> *)getServiceProviders;
1186 
1222 - (NSArray<GDServiceProvider *> *)getServiceProvidersFor:(NSString*)serviceId andVersion:(nullable NSString*)version andServiceType:(GDServiceType)serviceType;
1223 
1224 
1225 #undef DEPRECATE_GETSERVICEPROVIDERSFOR
1226 
1243 typedef void (^GDGetEntitlementVersionsForBlock) (NSArray<GDVersion *>* _Nullable entitlementVersions, NSError* error);
1244 
1312 - (void)getEntitlementVersionsFor:(NSString*)identifier
1313  callbackBlock:(GDGetEntitlementVersionsForBlock)block;
1314 
1315 /* \cond DOXYGEN_IGNORE */
1316 #if __has_extension(attribute_deprecated_with_message)
1317 # define DEPRECATE_GETWINDOW __attribute((deprecated("Use the window property from the main app delegate instance.")))
1318 #else
1319 # define DEPRECATE_GETWINDOW __attribute((deprecated))
1320 #endif
1321 /* \endcond */
1322 
1353 - (UIWindow*)getWindow DEPRECATE_GETWINDOW;
1354 
1355 #undef DEPRECATE_GETWINDOW
1356 
1363 - (NSString*)getVersion;
1364 
1387 - (BOOL)showPreferenceUI:(nullable UIViewController*)baseViewController;
1388 
1421 - (void)configureUIWithLogo:(NSString*)imagePath
1422  bundle:(nullable NSBundle*)bundle
1423  color:(nullable UIColor*)color;
1424 
1437 @property (nullable, nonatomic, weak) id<GDiOSDelegate> delegate;
1438 
1481 @property (nonatomic, readonly) BOOL canAuthorizeAutonomously;
1482 
1501 - (BOOL)executeRemoteLock;
1502 
1528 - (void)executeBlock:(NSString *)blockId withTitle:(NSString *)title withMessage:(NSString *)message;
1529 
1538 - (void)executeUnblock:(NSString *)blockId;
1539 
1552 -(BOOL)executePendingConsoleMigration:(NSString *)destinationTenantID withUemServerAddress:(NSString *)uemServerAddress;
1553 
1566 @property (nonatomic, strong, readonly) GDState *state;
1567 
1568 @end
1569 
1570 NS_ASSUME_NONNULL_END
1571 
1572 #endif /* __GD_IOS_H__ */
GDAppEvent::message
NSString * message
Textual description of the event.
Definition: GDiOS.h:107
GDiOS::activationComplete
BOOL activationComplete
Application activation status.
Definition: GDiOS.h:689
GDiOS::ActivationParameterEnrollmentAddress
const ActivationParameter ActivationParameterEnrollmentAddress
Definition: GDiOS.h:573
GDiOS::ActivationParameterPassword
const ActivationParameter ActivationParameterPassword
Definition: GDiOS.h:574
-[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.
GDAuthDelegateInfo::isAuthenticationDelegated
BOOL isAuthenticationDelegated
Flag if authentication is delegated.
Definition: GDiOS.h:87
GDAppEvent::type
GDAppEventType type
Numeric event type.
Definition: GDiOS.h:111
GDServiceTypeApplication
@ GDServiceTypeApplication
Application-based service.
Definition: GDiOS.h:33
GDiOS::ActivationParameterShowUserInterface
const ActivationParameter ActivationParameterShowUserInterface
Definition: GDiOS.h:572
GDServiceTypeServer
@ GDServiceTypeServer
Server-based service.
Definition: GDiOS.h:35
GDiOS::ActivationParameterUserIdentifier
const ActivationParameter ActivationParameterUserIdentifier
Definition: GDiOS.h:569
-[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:271
GDiOS::ActivationParameter
NSString * ActivationParameter
String constants used as keys for programmatic activation parameters.
Definition: GDiOS.h:568
-[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:1481
GDiOS::state
GDState * state
Observable representation of authorization state and user interface state.
Definition: GDiOS.h:1566
GDiOS::delegate
id< GDiOSDelegate > delegate
Delegated event-handling.
Definition: GDiOS.h:1437
GDAppEvent::code
GDAppResultCode code
Numeric result code.
Definition: GDiOS.h:109
GDVersion.h
GDiOSDelegate-p
Handler for events dispatched from the BlackBerry Dynamics Runtime, including authorization events.
Definition: GDiOS.h:151
GDAppResultCode
GDAppResultCode
Constants for GDAppEvent result code.
Definition: GDAppResultCode.h:114
GDiOS::ActivationParameterNOCAddress
const ActivationParameter ActivationParameterNOCAddress
Definition: GDiOS.h:571
-[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:104
GDiOS::GDGetEntitlementVersionsForBlock
void(^ GDGetEntitlementVersionsForBlock)(NSArray< GDVersion * > *_Nullable entitlementVersions, NSError *error)
Type for getEntitlementsFor block parameter.
Definition: GDiOS.h:1243
-[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.
GDAuthDelegateInfo::applicationId
NSString * applicationId
Entitlement identifier of the auth delegate.
Definition: GDiOS.h:77
GDAuthDelegateInfo::address
NSString * address
Native application identifier of the auth delegate.
Definition: GDiOS.h:68
GDAppResultCode.h
-[GDiOS getWindow]
UIWindow * getWindow()
Get the UIWindow for the application (deprecated).
-[GDiOS getAuthDelegate]
GDAuthDelegateInfo * getAuthDelegate()
Get a pointer to the GDAuthDelegateInfo structure.
-[GDAuthDelegateInfo description]
NSString * description()
Description of the GDAuthDelegateInfo.
GDState
BlackBerry Dynamics run-time state.
Definition: GDState.h:322
GDVersion
BlackBerry Dynamics entitlement version.
Definition: GDVersion.h:18
GDAuthDelegateInfo
Provide information about the authentication delegate app, if one exists.
Definition: GDiOS.h:50
GDiOS::ActivationParameterAccessKey
const ActivationParameter ActivationParameterAccessKey
Definition: GDiOS.h:570
GDAuthDelegateInfo::name
NSString * name
Name of the auth delegate application.
Definition: GDiOS.h:59
GDServiceType
GDServiceType
Constants for BlackBerry Dynamics service type.
Definition: GDiOS.h:30
GDServiceProvider
Service provider details.
Definition: GDServiceProvider.h:40
GDAppEventType
GDAppEventType
Constants for GDAppEvent type.
Definition: GDAppResultCode.h:15
-[GDiOS getVersion]
NSString * getVersion()
Get the BlackBerry Dynamics runtime library version.