AppConnect-related notifications

Your app receives notifications about changes to:

the ready status of the AppConnect singleton

the user’s authorization status

app-specific configuration

data loss prevention policies

secure services status

the secure file I/O policy

the log level

app state changes due to AppConnect events

Upon receiving a notification, your app:

1. Makes appropriate changes to its logic, display, and data.
2. In most cases, calls an API to inform the AppConnect library about its success or failure in making the changes.

Notification methods in the AppConnectDelegate protocol

Your app receives notifications by implementing the AppConnectDelegate protocol.

Your app must implement the notification callback methods for:

handling the change to the ready status of the AppConnect singleton:

-appConnectIsReady:

handling authorization status changes:

-appConnect:authStateChangedTo:withMessage:

Your app optionally implements the notification callback methods for handling app-specific configuration changes, data loss prevention policy changes, secure services changes, log level changes and changes to the app state due to AppConnect events:

 

-appConnect:configChangedTo:

 

-appConnect:openInPolicyChangedTo:newWhitelist:

 

-appConnect:openInAttemptedWhenACOpenInPolicyBlocked:

 

-appConnect:openURLAttemptedWhenUnauthorizedForURL:

 

-appConnectAttemptedDragAndDropToNonAppConnectApp:

 

-appConnect:pasteboardPolicyChangedTo:

 

-appConnect:copyAttemptedWhenUnauthorized:

 

-appConnect:printPolicyChangedTo:

 

-appConnect:secureServicesAvailabilityChangedTo:

 

-appConnect:secureFileIOPolicyChangedTo:

 

-appConnect:logLevelChangedTo:

 

-applicationWillResignActiveForAppConnect:

 

-applicationDidBecomeActiveFromAppConnect:

 

You implement only the optional callback methods that your application needs. For example, if your application does not copy content to the iOS pasteboard, do not implement -appConnect:pasteboardPolicyChangedTo:.

Notification acknowledgments

Your app must inform the AppConnect library of your app’s success or failure in applying changes it receives in notifications. Depending on the type of notification, your app calls one of the following methods of the AppConnect singleton object:

 

-authStateApplied:message:

 

-configApplied:message:

 

-openInPolicyApplied:message:

 

-pasteboardPolicyApplied:message:

 

-printPolicyApplied:message:

 

-secureFileIOPolicyApplied:message:

No notification acknowledgments exist for ready status notifications, log level notifications, or notifications of app state changes due to AppConnect events.

Each method takes a parameter that is an ACPolicyState enumeration value:

typedef enum {
    ACPOLICY_UNSUPPORTED = 0, // The policy is not supported by this application
    ACPOLICY_APPLIED     = 1, // The policy was applied successfully
    ACPOLICY_ERROR       = 2, // An error occurred applying the policy
} ACPolicyState;

Typically, you pass either ACPOLICY_APPLIED or ACPOLICY_ERROR. If you do not implement one of the optional notification methods, the AppConnect library behaves as if your app had passed ACPOLICY_UNSUPPORTED.