Skip Navigation

Enable Background Authorize for a custom
BlackBerry Dynamics
app

  1. Configure your custom
    BlackBerry Dynamics
    app to call
    GDiOS.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, on
      iOS
      , the
      didReceiveRemoteNotification:
      or
      performFetchWithCompletionHandler:
      function).
    • On
      iOS
      , access the
      canAuthorizeAutonomously
      property first, to verify that autonomous authorization is possible.
  2. Do the following:
    Platform
    Steps
    iOS
    Add the following to the info.plist file:
    GDEnableBackgroundAuthorize = YES
  • Instruct your organization's
    BlackBerry UEM
    administrator to enable the
    Background activity
    setting in the
    BlackBerry Dynamics
    profile that is assigned to device users. This setting is available in
    UEM Cloud
    or
    UEM
    version 12.21 or later and requires the
    BlackBerry Dynamics SDK
    version 14.0 or later. This setting must be enabled and applied to a device for Background Authorize to work in your custom
    BlackBerry Dynamics
    app.
  • When the app attempts to access its data from a cold start in the background, it sends a
    GDAppEvent
    notification with one of the following
    GDAppEventTypes
    enumerations:
    • GDAppEventBackgroundAuthorized
      when authorized.
    • GDAppEventBackgroundNotAuthorized
      when not authorized.
    You can check
    GDAppResultCode
    to determine the failure reason when the attempt is not authorized.