Skip Navigation

Manually add the
BlackBerry Dynamics SDK
to your
Swift
project

  1. In your code, import the
    BlackBerry Dynamics Runtime
    module:
    import GD.Runtime
  2. Modify the
    AppDelegate
    class to implement the
    GDiOSDelegate
    protocol to implement a
    handleEvent
    (
    anEvent:
    ) method:
    class AppDelegate: UIResponder, UIApplicationDelegate, GDiOSDelegate { [...] func handle(_ anEvent:GDAppEvent) { [...] } }
  3. Add a variable to your
    AppDelegate
    :
    var good: GDiOS?
  4. Add the following code to the
    didFinishLaunchingWithOptions
    function:
    self.good = GDiOS.sharedInstance() // Get BlackBerry Dynamics shared instance self.good!.delegate = self // Set delegate self.good!.authorize() // Authorize
  5. In the
    Info.plist
    file, add the entitlment ID (
    GDApplicationID
    ) and entitlement version (
    GDApplicationVersion
    ). For more information, see Using an entitlement ID and version to uniquely identify a BlackBerry Dynamics app.
  6. Define URL types with the same ID as the bundle ID and URL schemes with the required schemes described in Declaring a URL type to support BlackBerry Dynamics features.
  7. Build your project.