• BlackBerry Dynamics
  • Runtime library for iOS applications
  • 7.1.0.193
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 "GDPortability.h"
12 #import "GDAppConfig.h"
13 #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 
49 typedef NS_ENUM(NSInteger, GDServiceProviderType)
50 {
56  GDServiceProviderApplication __deprecated_enum_msg("Use GDServiceTypeApplication instead.") = 0,
57 
63  GDServiceProviderServer __deprecated_enum_msg("Use GDServiceTypeServer instead"),
64 };
65 
66 
68 
74 @interface GDAppEvent : NSObject
75 {
76 
77  NSString* message;
78 
80 
82 }
83 
90 @property (nonatomic, copy) NSString* message;
91 
98 @property (nonatomic, assign) GDAppResultCode code;
99 /* error code 0, means success */
100 
107 @property (nonatomic, assign) GDAppEventType type;
108 
109 @end
110 
111 
120 @protocol GDiOSDelegate
121 @optional
122 
131 - (void)handleEvent:(GDAppEvent*)anEvent;
132 
133 @end
134 
636 @interface GDiOS : NSObject
637 
650 + (instancetype)sharedInstance;
651 
782 - (void)authorize:(id<GDiOSDelegate> _Nonnull)delegate;
783 
801 - (void)authorize;
802 
846 - (BOOL)authorizeAutonomously:(id<GDiOSDelegate> _Nonnull)delegate;
847 
861 - (BOOL)authorizeAutonomously;
862 
917 typedef NSString *ActivationParameter;
922 
953 - (void)programmaticAuthorize:(NSDictionary<ActivationParameter, id> *)activationParameters;
954 
955 /* \cond DOXYGEN_IGNORE */
956 #if __has_extension(attribute_deprecated_with_message)
957 # define DEPRECATE_PROGRAMMATICAUTHORIZE __attribute((deprecated("Use -programmaticAuthorize:activationParameters instead.")))
958 #else
959 # define DEPRECATE_PROGRAMMATICAUTHORIZE __attribute((deprecated))
960 #endif
961 /* \endcond */
962 
974 - (void)programmaticAuthorize:(NSString *)userID withAccessKey:(NSString *)accessKey DEPRECATE_PROGRAMMATICAUTHORIZE;
975 
1018 - (void)programmaticAuthorize:(NSString *)userID
1019  withAccessKey:(NSString *)accessKey
1020  networkOperationCenter:(NSURL *)nocAddress DEPRECATE_PROGRAMMATICAUTHORIZE;
1021 
1022 #undef DEPRECATE_PROGRAMMATICAUTHORIZE
1023 
1036 @property (nonatomic, assign, readonly, getter=isActivated) BOOL activationComplete;
1037 
1357 - (GD_NSDictionary(NSString *, id) *)getApplicationConfig;
1358 
1414 - (GD_NSDictionary(NSString *, id) *)getApplicationPolicy;
1415 
1445 - (NSString*)getApplicationPolicyString;
1446 
1541 
1577 - (GD_NSArray(GDServiceProvider *) *)getServiceProvidersFor:(NSString*)serviceId andVersion:(GD_NSNULLABLE NSString*)version andServiceType:(GDServiceType)serviceType;
1578 
1579 /* \cond DOXYGEN_IGNORE */
1580 #if __has_extension(attribute_deprecated_with_message)
1581 # define DEPRECATE_GETSERVICEPROVIDERSFOR __attribute((deprecated("Use getServiceProvidersFor:andVersion:andServiceType:")))
1582 #else
1583 # define DEPRECATE_GETSERVICEPROVIDERSFOR __attribute((deprecated))
1584 #endif
1585 /* \endcond */
1586 
1627 - (GD_NSArray(GDServiceProvider *) *)getServiceProvidersFor:(NSString*)serviceId andVersion:(GD_NSNULLABLE NSString*)version andType:(GDServiceProviderType)serviceProviderType DEPRECATE_GETSERVICEPROVIDERSFOR;
1628 
1629 #undef DEPRECATE_GETSERVICEPROVIDERSFOR
1630 
1647 typedef void (^GDGetEntitlementVersionsForBlock) (GD_NSArray(GDVersion *)* GD_NSNULLABLE_POINTER entitlementVersions, NSError* error);
1648 
1716 - (void)getEntitlementVersionsFor:(NSString*)identifier
1717  callbackBlock:(GDGetEntitlementVersionsForBlock)block;
1718 
1719 /* \cond DOXYGEN_IGNORE */
1720 #if __has_extension(attribute_deprecated_with_message)
1721 # define DEPRECATE_GETWINDOW __attribute((deprecated("Use the window property from the main app delegate instance.")))
1722 #else
1723 # define DEPRECATE_GETWINDOW __attribute((deprecated))
1724 #endif
1725 /* \endcond */
1726 
1757 - (UIWindow*)getWindow DEPRECATE_GETWINDOW;
1758 
1759 #undef DEPRECATE_GETWINDOW
1760 
1767 - (NSString*)getVersion;
1768 
1789 - (BOOL)showPreferenceUI:(GD_NSNULLABLE UIViewController*)baseViewController;
1790 
1846 - (BOOL)setUIAutoRotationForPortrait:(BOOL) portrait
1847  andPortraitUpsideDown:(BOOL) portraitUpsideDown
1848  andLandscapeRight:(BOOL) landscapeRight
1849  andLandscapeLeft:(BOOL)landscapeLeft;
1850 
1883 - (void)configureUIWithLogo:(NSString*)imagePath
1884  bundle:(GD_NSNULLABLE NSBundle*)bundle
1885  color:(GD_NSNULLABLE UIColor*)color;
1886 
1887 /* \cond DOXYGEN_IGNORE */
1888 #if __has_extension(attribute_deprecated_with_message)
1889 # define DEPRECATE_CONFIG_UI_WITH_BLOCK_MESSAGE __attribute__((deprecated("No longer supported")))
1890 # define DEPRECATE_CONFIG_UI_WITH_WIPE_MESSAGE __attribute__((deprecated("No longer supported")))
1891 #else
1892 # define DEPRECATE_CONFIG_UI_WITH_BLOCK_MESSAGE __attribute__((deprecated))
1893 # define DEPRECATE_CONFIG_UI_WITH_WIPE_MESSAGE __attribute__((deprecated))
1894 #endif
1895 /* \endcond */
1896 
1917 - (void)configureUIWithBlockedMessage:(GD_NSNULLABLE NSString*)message DEPRECATE_CONFIG_UI_WITH_BLOCK_MESSAGE;
1918 
1940 - (void)configureUIWithWipedMessage:(GD_NSNULLABLE NSString*)message DEPRECATE_CONFIG_UI_WITH_WIPE_MESSAGE;
1941 
1954 @property (GD_NSNULLABLE_PROP nonatomic, weak) id<GDiOSDelegate> delegate;
1955 
1956 /* \cond DOXYGEN_IGNORE */
1957 #if __has_extension(attribute_deprecated_with_message)
1958 # define DEPRECATE_LAUNCHOPTIONS __attribute__((deprecated("No longer required.")))
1959 #else
1960 # define DEPRECATE_LAUNCHOPTIONS __attribute__((deprecated))
1961 #endif
1962 /* \endcond */
1963 
1983 @property (GD_NSNULLABLE_PROP nonatomic, strong) GD_NSDictionary(NSObject *, id)* launchOptions DEPRECATE_LAUNCHOPTIONS;
1984 
2027 @property (nonatomic, readonly) BOOL canAuthorizeAutonomously;
2028 
2047 - (BOOL)executeRemoteLock;
2048 
2074 - (void)executeBlock:(NSString *)blockId withTitle:(NSString *)title withMessage:(NSString *)message;
2075 
2084 - (void)executeUnblock:(NSString *)blockId;
2085 
2086 
2098 -(BOOL)executePendingConsoleMigration:(NSString *)destinationTenantID;
2099 
2112 @property (nonatomic, strong, readonly) GDState *state;
2113 
2114 @end
2115 
2117 
2118 #endif /* __GD_IOS_H__ */
GDServiceProviderApplication
@ GDServiceProviderApplication
Application-based service.
Definition: GDiOS.h:56
GDiOS::GDGetEntitlementVersionsForBlock
void(^ GDGetEntitlementVersionsForBlock)(NSArray *entitlementVersions, NSError *error)
Type for getEntitlementsFor block parameter.
Definition: GDiOS.h:1647
GDAppEvent::message
NSString * message
Textual description of the event.
Definition: GDiOS.h:77
GD_NSNULLABLE
#define GD_NSNULLABLE
Definition: GDPortability.h:71
GDiOS::activationComplete
BOOL activationComplete
Application activation status.
Definition: GDiOS.h:1036
GD_NSNULLABLE_PROP
#define GD_NSNULLABLE_PROP
Definition: GDPortability.h:70
+[GDiOS sharedInstance]
instancetype sharedInstance()
Get a reference to the runtime interface object.
GDAppEvent::type
GDAppEventType type
Numeric event type.
Definition: GDiOS.h:81
GDServiceTypeApplication
@ GDServiceTypeApplication
Application-based service.
Definition: GDiOS.h:34
GDiOS::ActivationParameterShowUserInterface
const ActivationParameter ActivationParameterShowUserInterface
Definition: GDiOS.h:921
GDServiceTypeServer
@ GDServiceTypeServer
Server-based service.
Definition: GDiOS.h:36
GDiOS::ActivationParameterUserIdentifier
const ActivationParameter ActivationParameterUserIdentifier
Definition: GDiOS.h:918
-[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:636
GDiOS::ActivationParameter
NSString * ActivationParameter
String constants used as keys for programmatic activation parameters.
Definition: GDiOS.h:917
-[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:2027
GDServiceProviderType
GDServiceProviderType
Deprecated constants for BlackBerry Dynamics service provider type.
Definition: GDiOS.h:49
GDiOS::state
GDState * state
Observable representation of authorization state and user interface state.
Definition: GDiOS.h:2112
GDiOS::delegate
id< GDiOSDelegate > delegate
Delegated event-handling.
Definition: GDiOS.h:1954
GDAppEvent::code
GDAppResultCode code
Numeric result code.
Definition: GDiOS.h:79
GDVersion.h
GDiOSDelegate-p
Handler for events dispatched from the BlackBerry Dynamics Runtime, including authorization events.
Definition: GDiOS.h:120
GDAppResultCode
GDAppResultCode
Constants for GDAppEvent result code.
Definition: GDAppResultCode.h:114
GD_NSNULLABLE_POINTER
#define GD_NSNULLABLE_POINTER
Definition: GDPortability.h:77
-[GDiOS getServiceProviders]
NSArray * getServiceProviders()
Get providers of shared services.
GDiOS::ActivationParameterNOCAddress
const ActivationParameter ActivationParameterNOCAddress
Definition: GDiOS.h:920
-[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:74
-[GDiOS getApplicationPolicy]
GD_NSDictionary(NSString *, id getApplicationPolicy()
Get application-specific policy settings from the enterprise management console, as a collection.
GDServiceProviderServer
@ GDServiceProviderServer
Server-based service.
Definition: GDiOS.h:63
GD_NS_ASSUME_NONNULL_END
#define GD_NS_ASSUME_NONNULL_END
Definition: GDPortability.h:89
GDAppResultCode.h
-[GDiOS getWindow]
UIWindow * getWindow()
Get the UIWindow for the application (deprecated).
GD_NSArray
#define GD_NSArray(ObjectType)
Definition: GDPortability.h:112
GD_NSDictionary
#define GD_NSDictionary(KeyType, ObjectType)
Definition: GDPortability.h:109
GDState
BlackBerry Dynamics run-time state.
Definition: GDState.h:314
GDVersion
BlackBerry Dynamics entitlement version.
Definition: GDVersion.h:80
GDiOS::ActivationParameterAccessKey
const ActivationParameter ActivationParameterAccessKey
Definition: GDiOS.h:919
GDServiceType
GDServiceType
Constants for BlackBerry Dynamics service type.
Definition: GDiOS.h:31
GDServiceProvider
Service provider details.
Definition: GDServiceProvider.h:38
GDAppEventType
GDAppEventType
Constants for GDAppEvent type.
Definition: GDAppResultCode.h:15
-[GDiOS getApplicationConfig]
GD_NSDictionary(NSString *, id getApplicationConfig()
Get application configuration and other settings from the enterprise.
GD_NS_ASSUME_NONNULL_BEGIN
#define GD_NS_ASSUME_NONNULL_BEGIN
Definition: GDPortability.h:88
-[GDiOS getVersion]
NSString * getVersion()
Get the BlackBerry Dynamics runtime library version.
GDPortability.h