Enable Background Authorize for a custom BlackBerry
Dynamics app
BlackBerry
Dynamics
app- Configure your customBlackBerry Dynamicsapp to callGDiOS.authorizeAutonomously(iOS) when the app is started in the background in response to APNs, FCM, background fetch, or background tasks.
- Call this function from any callback that handles background launch (for example, oniOS, thedidReceiveRemoteNotification:orperformFetchWithCompletionHandler:function).
- OniOS, access thecanAuthorizeAutonomouslyproperty first, to verify that autonomous authorization is possible.
- Do the following:PlatformStepsiOSAdd the following to the info.plist file:GDEnableBackgroundAuthorize = YES
- Instruct your organization'sBlackBerry UEMadministrator to enable theBackground activitysetting in theBlackBerry Dynamicsprofile that is assigned to device users. This setting is available inUEM CloudorUEMversion 12.21 or later and requires theBlackBerry Dynamics SDKversion 14.0 or later. This setting must be enabled and applied to a device for Background Authorize to work in your customBlackBerry Dynamicsapp.
- When the app attempts to access its data from a cold start in the background, it sends aGDAppEventnotification with one of the followingGDAppEventTypesenumerations:
- GDAppEventBackgroundAuthorizedwhen authorized.
- GDAppEventBackgroundNotAuthorizedwhen not authorized.
You can checkGDAppResultCodeto determine the failure reason when the attempt is not authorized.