AgentSDK.h
IntroductionUse the links in the table of contents to the left to access the documentation. ClassesProtocolsMethods
acceptTermsAndConditions- (void) acceptTermsAndConditions; DiscussionCalled when the user accepts the current Terms and Conditions.
allowUnenroll- (BOOL) allowUnenroll; Return ValueA boolean value denoting whether or not un-enrollment is allowed. DiscussionReturns whether the MobiControl administrator has allowed agent unenrollment using the "Advanced Settings > Agent Settings" policy. When un-enrollment is disabled the end user is not able to initiate un-enrollment from the "Device Configuration" screen of the MobiControl agent. An SDK-enabled App may wisht o link similar functionality to this setting. This setting does not prevent an end-user from removing the MobiControl Management Profile from the iOS Settings screen.
appAwake_multideclaration_block#ifdef MAC_LIBRARY - (void)appAwake; This method will be used by Mac for updating location from Mac Agent to Helper daemon */- (void) locationManagerdidUpdateLocations:(NSArray *)locations; - (void) locationManagerdidFailWithError:(NSError *)error; #else - (void) performBackgroundOperation:(void (^)(UIBackgroundFetchResult))completionHandler; #endif @@end DiscussioniOS SDK could perform some operation(s) (location data collection) at the Background. Background Fetch is an API involved here and used by SDK. Background Fetch is controlled by an Application (all settings, API calls, etc.). A Client is obligated to implement "application: performFetchWithCompletionHandler:" method of the UIApplicationDelegate and delegate the call to the performBackgroundOperation. That's to allow SDK to perform backgroung operation(s). The operation takes about 3 seconds authenticateClient:withType:- (void)authenticateClient:(AuthenticationData *)authenticationData withType:(AuthenticationType)authenticationType; ParametersDiscussionAuthenticates client data using a specific authentication type. During a Deployment Server connection attempt ConnectionStatus may indicate a requirement for the SDK-enabled App to authenticate the connection, usually when the authentication token provided in the App Config has expired. If authentication is required the type of authentication will correspond to the Add Device Rule that was initially used for enrollment or, if not found, the default Add Device Rule.
connectToDS- (void) connectToDS; DiscussionAttempts to connect to the Deployment Server using the stored server address. A connection is automatically established when the application is brought to the foreground so this method need only be called if the connection is lost or intentionally disconnected. The delegate connectionStatusUpdate will be called upon completion.
connectToDSManually- (void) connectToDSManually; DiscussionRegisters the delegate for this class. An object that adheres to the AgentSdkCoreProtocol.
connectToDSUsingAppConfig- (KAppConfigResults) connectToDSUsingAppConfig; Return ValueThe App configuration result of the attempt. DiscussionGets and stores Deployment Server connection parameters provided by MobiControl, and attempts a connection to the Deployment Server. Requires that the App be installed by MobiControl's App Catalog as "Managed". See the "MobiControl SDK for iOS Integration Guide" for the configuration syntax and additional details.
deRegisterDelegate:- (void) deRegisterDelegate:(id<AgentSdkCoreProtocol>)delegate; ParametersDiscussionDeregisters the delegate from this class.
disconnect- (void) disconnect; DiscussionDisconnects from the Deployment Server.
getAppCatalogLink- (NSString *) getAppCatalogLink; Return ValueThe URL to the Application Catalog. DiscussionGets the URL to the application catalog.
getEnrollmentState- (EnrollmentState) getEnrollmentState; Return ValueThe current enrollment state of the SDK-enabled application. Will return either Enrolled, Enrolling or Required. DiscussionGets the current enrollment state of the SDK-enabled application.
getInstance+ (AgentSdkCore*) getInstance; Return ValueThe AgentSdkCore singleton. DiscussionGets singleton of AgentSdkCore.
getTermsAndConditionsAcceptedDate- (NSDate *) getTermsAndConditionsAcceptedDate; Return ValueThe date when Terms and Conditions were accepted. DiscussionGets the date when Terms and Conditions were accepted.
getTermsAndConditionsLink- (NSString *) getTermsAndConditionsLink; Return ValueThe URL to the current Terms and Conditions. DiscussionGets the URL to the current the Terms and Conditions.
getTermsAndConditionStatus- (TermsAndConditionStatus) getTermsAndConditionStatus; Return ValueThe status of the current Terms and Conditions. DiscussionGets the current status of the Terms and Conditions. If no Terms and Conditions exist, method will return nil.
getUnverifiedDeploymentServerCertificate- (AgentSdkCertificateInfo *) getUnverifiedDeploymentServerCertificate; Return ValueThe unverified Deployment Server certificate. DiscussionGets the unverfied Deployment Server certificate in the event trust validation of the server failed.
getUnverifiedDeploymentServerName- (NSString *) getUnverifiedDeploymentServerName; Return ValueThe unverified Deployment Server information. DiscussionGet the unverified Deployment Server info (in response to a connectionStatusUpdate with status kConnectionStatusUnverified) in the event trust validation of the server failed.
isConfiguredWithDeploymentServer- (bool) isConfiguredWithDeploymentServer; Return ValueA Boolean value denoting whether or not the SDK-enabled App is configured with Deployment Server connection parameters. DiscussionChecks if the SDK-enabled App is configured with Deployment Server connection parameters. If return value is true, connectToDS will succeed. Otherwise, connectToDSUsingAppConfig should be called to obtain the connnection parameters.
isConnected- (BOOL) isConnected; Return ValueA Boolean value denoting whether or not the SDK-enabled App is connected to the Deployment Server. DiscussionChecks if the SDK-enabled App is connected to the Deployment Server.
registerDelegate:- (void) registerDelegate:(id<AgentSdkCoreProtocol>)delegate; ParametersDiscussionRegisters the delegate for this class.
rejectTermsAndConditions- (void) rejectTermsAndConditions; DiscussionCalled when the user rejects the current Terms and Conditions.
setAppCapability:-(void)setAppCapability:(APP_CAPABILITIES)appCapability; ParametersDiscussionUsed to set the application's required capabilities.
setUserResponseToUnverifiedDeploymentServer:- (void) setUserResponseToUnverifiedDeploymentServer:(BOOL)isDeploymentServerTrusted; ParametersDiscussionSaves the user response to an unverified Deployment Server connection (in response to a connectionStatusUpdate with status kConnectionStatusUnverified). Value is remembered for subsequent connection attempts.
Typedefs
APP_CAPABILITIEStypedef enum { kAPP_CAPABILITIES_ALL = 0xFFFFFFFF, kAPP_CAPABILITIES_REMOTEVIEW = 1, }APP_CAPABILITIES; Constants
DiscussionType used to represent the app's required capabilities. AuthenticationTypetypedef enum { kAuthenticationTypeSimple, kAuthenticationTypeAD, kAuthenticationTypeToken } AuthenticationType; Constants
DiscussionType used to represent current enrollment authentication status.
ConnectionStatustypedef NSString* ConnectionStatus; Constants
DiscussionRepresents the connection status between the SDK-enabled App and the Deployment Server as a result of connecting or disconnecting.
EnrollmentStatetypedef enum { kEnrollmentStateNotEnrolled, kEnrollmentStateEnrolling, kEnrollmentStateEnrolled } EnrollmentState; Constants
DiscussionType used to represent current enrollment status.
EnrollmentStatustypedef NSString* EnrollmentStatus; Constants
DiscussionType used to represent current enrollment status that is always sent after connecting to Deployment Server.
kAppConfigResultstypedef enum KAppConfigResults : NSInteger { KAppConfigDeviceLessThanIOS7, KAppConfigInitiationSuccess, KAppConfigNotFound, kAppConfigUnknownError, kAppConfigUnknownState, } KAppConfigResults; Constants
DiscussionUsed to obtain Deployment Server connection parameters. See Also
KAppConfigResultstypedef enum KAppConfigResults : NSInteger { KAppConfigDeviceLessThanIOS7, KAppConfigInitiationSuccess, KAppConfigNotFound, kAppConfigUnknownError, kAppConfigUnknownState, } KAppConfigResults; Constants
DiscussionUsed to obtain Deployment Server connection parameters. See Also RemoteViewStatustypedef NSString* RemoteViewStatus; Constants
DiscussionType used to represent the remote view connection status as a result of connecting or disconnecting.
TermsAndConditionStatustypedef NSString* TermsAndConditionStatus; Constants
DiscussionInfo regarding what the Deployment Server is telling the SDK-enabled App to do about Terms and Conditions.
PropertiesappConfigAvailable@property (readonly, atomic) BOOL appConfigAvailable; DiscussionA Boolean value denoting the availability of the App Configuration. |