• BlackBerry Dynamics
  • Runtime library for iOS applications
  • 13.1.0.48
GDiOS.h
Go to the documentation of this file.
1 /*
2  * (c) 2024 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"
14 
15 /* \cond DOXYGEN_IGNORE */
16 // See: http://clang.llvm.org/docs/LanguageExtensions.html
17 #ifndef __has_extension
18 #define __has_extension(x) 0 // Compatibility with non-clang compilers.
19 #endif
20 /* \endcond */
21 
23 
24 
31 typedef NS_ENUM(NSInteger, GDServiceType)
32 {
37 };
38 
39 
40 NS_ASSUME_NONNULL_BEGIN
41 
51 @interface GDAuthDelegateInfo : NSObject
52 
60 @property (nonatomic, copy) NSString* name;
61 
69 @property (nonatomic, copy) NSString* address;
70 
78 @property (nonatomic, copy) NSString* applicationId;
79 
88 @property (nonatomic, assign) BOOL isAuthenticationDelegated;
89 
94 - (NSString *)description;
95 
96 @end
97 
105 @interface GDAppEvent : NSObject
106 {
107 
108  NSString* message;
109 
111 
113 }
114 
121 @property (nonatomic, copy) NSString* message;
122 
129 @property (nonatomic, assign) GDAppResultCode code;
130 /* error code 0, means success */
131 
138 @property (nonatomic, assign) GDAppEventType type;
139 
140 @end
141 
142 
152 @protocol GDiOSDelegate
153 @optional
154 
163 - (void)handleEvent:(GDAppEvent*)anEvent;
164 
165 @end
166 
272 @interface GDiOS : NSObject
273 
286 + (instancetype)sharedInstance;
287 
418 - (void)authorize:(id<GDiOSDelegate> _Nonnull)delegate;
419 
437 - (void)authorize;
438 
482 - (BOOL)authorizeAutonomously:(id<GDiOSDelegate> _Nonnull)delegate;
483 
497 - (BOOL)authorizeAutonomously;
498 
505 
569 typedef NSString *ActivationParameter;
576 
607 - (void)programmaticAuthorize:(NSDictionary<ActivationParameter, id> *)activationParameters;
608 
609 /* \cond DOXYGEN_IGNORE */
610 #if __has_extension(attribute_deprecated_with_message)
611 # define DEPRECATE_PROGRAMMATICAUTHORIZE __attribute((deprecated("Use -programmaticAuthorize:activationParameters instead.")))
612 #else
613 # define DEPRECATE_PROGRAMMATICAUTHORIZE __attribute((deprecated))
614 #endif
615 /* \endcond */
616 
628 - (void)programmaticAuthorize:(NSString *)userID withAccessKey:(NSString *)accessKey DEPRECATE_PROGRAMMATICAUTHORIZE;
629 
672 - (void)programmaticAuthorize:(NSString *)userID
673  withAccessKey:(NSString *)accessKey
674  networkOperationCenter:(NSURL *)nocAddress DEPRECATE_PROGRAMMATICAUTHORIZE;
675 
676 #undef DEPRECATE_PROGRAMMATICAUTHORIZE
677 
690 @property (nonatomic, assign, readonly, getter=isActivated) BOOL activationComplete;
691 
1003 - (NSDictionary<NSString *, id> *)getApplicationConfig;
1004 
1060 - (NSDictionary<NSString *, id> *)getApplicationPolicy;
1061 
1091 - (NSString*)getApplicationPolicyString;
1092 
1186 - (NSArray<GDServiceProvider *> *)getServiceProviders;
1187 
1223 - (NSArray<GDServiceProvider *> *)getServiceProvidersFor:(NSString*)serviceId andVersion:(nullable NSString*)version andServiceType:(GDServiceType)serviceType;
1224 
1225 
1226 #undef DEPRECATE_GETSERVICEPROVIDERSFOR
1227 
1244 typedef void (^GDGetEntitlementVersionsForBlock) (NSArray<GDVersion *>* _Nullable entitlementVersions, NSError* error);
1245 
1313 - (void)getEntitlementVersionsFor:(NSString*)identifier
1314  callbackBlock:(GDGetEntitlementVersionsForBlock)block;
1315 
1316 /* \cond DOXYGEN_IGNORE */
1317 #if __has_extension(attribute_deprecated_with_message)
1318 # define DEPRECATE_GETWINDOW __attribute((deprecated("Use the window property from the main app delegate instance.")))
1319 #else
1320 # define DEPRECATE_GETWINDOW __attribute((deprecated))
1321 #endif
1322 /* \endcond */
1323 
1354 - (UIWindow*)getWindow DEPRECATE_GETWINDOW;
1355 
1356 #undef DEPRECATE_GETWINDOW
1357 
1364 - (NSString*)getVersion;
1365 
1388 - (BOOL)showPreferenceUI:(nullable UIViewController*)baseViewController;
1389 
1422 - (void)configureUIWithLogo:(NSString*)imagePath
1423  bundle:(nullable NSBundle*)bundle
1424  color:(nullable UIColor*)color;
1425 
1438 @property (nullable, nonatomic, weak) id<GDiOSDelegate> delegate;
1439 
1482 @property (nonatomic, readonly) BOOL canAuthorizeAutonomously;
1483 
1502 - (BOOL)executeRemoteLock;
1503 
1529 - (void)executeBlock:(NSString *)blockId withTitle:(NSString *)title withMessage:(NSString *)message;
1530 
1539 - (void)executeUnblock:(NSString *)blockId;
1540 
1553 -(BOOL)executePendingConsoleMigration:(NSString *)destinationTenantID withUemServerAddress:(NSString *)uemServerAddress;
1554 
1567 @property (nonatomic, strong, readonly) GDState *state;
1568 
1598 
1599 
1600 @end
1601 
1602 NS_ASSUME_NONNULL_END
1603 
1604 #endif /* __GD_IOS_H__ */
GDAppEvent::message
NSString * message
Textual description of the event.
Definition: GDiOS.h:108
GDiOS::activationComplete
BOOL activationComplete
Application activation status.
Definition: GDiOS.h:690
GDiOS::ActivationParameterEnrollmentAddress
const ActivationParameter ActivationParameterEnrollmentAddress
Definition: GDiOS.h:574
GDiOS::ActivationParameterPassword
const ActivationParameter ActivationParameterPassword
Definition: GDiOS.h:575
-[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:88
GDAppEvent::type
GDAppEventType type
Numeric event type.
Definition: GDiOS.h:112
GDServiceTypeApplication
@ GDServiceTypeApplication
Application-based service.
Definition: GDiOS.h:34
GDiOS::ActivationParameterShowUserInterface
const ActivationParameter ActivationParameterShowUserInterface
Definition: GDiOS.h:573
GDServiceTypeServer
@ GDServiceTypeServer
Server-based service.
Definition: GDiOS.h:36
GTLauncherViewController
This class represents the main application view controller class comprised of a floating Launcher but...
Definition: GTLauncherViewController.h:261
GDiOS::ActivationParameterUserIdentifier
const ActivationParameter ActivationParameterUserIdentifier
Definition: GDiOS.h:570
-[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:272
GDiOS::ActivationParameter
NSString * ActivationParameter
String constants used as keys for programmatic activation parameters.
Definition: GDiOS.h:569
-[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:1482
GDiOS::state
GDState * state
Observable representation of authorization state and user interface state.
Definition: GDiOS.h:1567
GDiOS::delegate
id< GDiOSDelegate > delegate
Delegated event-handling.
Definition: GDiOS.h:1438
GDAppEvent::code
GDAppResultCode code
Numeric result code.
Definition: GDiOS.h:110
GDVersion.h
GDiOSDelegate-p
Handler for events dispatched from the BlackBerry Dynamics Runtime, including authorization events.
Definition: GDiOS.h:152
GDAppResultCode
GDAppResultCode
Constants for GDAppEvent result code.
Definition: GDAppResultCode.h:114
GDiOS::ActivationParameterNOCAddress
const ActivationParameter ActivationParameterNOCAddress
Definition: GDiOS.h:572
-[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:105
GDiOS::GDGetEntitlementVersionsForBlock
void(^ GDGetEntitlementVersionsForBlock)(NSArray< GDVersion * > *_Nullable entitlementVersions, NSError *error)
Type for getEntitlementsFor block parameter.
Definition: GDiOS.h:1244
-[GDiOS getServiceProviders]
NSArray< GDServiceProvider * > * getServiceProviders()
Get providers of shared services.
-[GDiOS getManagedLauncherViewController]
GTLauncherViewController * getManagedLauncherViewController()
Returns the GTLauncherViewController being managed by BlackBerry Dynamics, if any.
-[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:78
GDAuthDelegateInfo::address
NSString * address
Native application identifier of the auth delegate.
Definition: GDiOS.h:69
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.
GTLauncherViewController.h
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:51
GDiOS::ActivationParameterAccessKey
const ActivationParameter ActivationParameterAccessKey
Definition: GDiOS.h:571
GDAuthDelegateInfo::name
NSString * name
Name of the auth delegate application.
Definition: GDiOS.h:60
GDServiceType
GDServiceType
Constants for BlackBerry Dynamics service type.
Definition: GDiOS.h:31
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.