Get started

Prerequisite

Before starting DriveKit Permissions Utils UI integration, make sure that you have initialized Common UI module, especially if you have disabled the SDK auto-initialization.

Integration

The Permissions Utils UI SDK is available on Swift Package Manager and Cocoapods master repo.

On a Github repository, you can find a demo app (for iOS and Android) and the source code of Permissions Utils UI that you can use as an example.

Swift Package Manager

Via Xcode:

  • In Xcode, if not yet done, add the DriveKitUI SDK by navigating to File > Add Package Dependencies… and in the prompt that appears, enter the DriveKitUI repository: https://github.com/DriveQuantPublic/drivekit-ui-ios.git

  • Include DriveKitPermissionsUtilsUI in your app.

Via Package.swift:

  • If not yet done, to integrate DriveKitUI to a Swift package via a Package.swift file, you can add DriveKitUI to the dependencies array of your package. For more details, see the Swift Package Manager documentation.

dependencies: [
  .package(name: "DriveKitUI",
           url: "https://github.com/DriveQuantPublic/drivekit-ui-ios.git",
           from: "2.0.0"),
  // ...
],
  • Then in your target, add DriveKitPermissionsUtilsUI to the dependencies array of that target:

.target(
  name: "MyTarget",
  dependencies: [
    .product(name: "DriveKitPermissionsUtilsUI", package: "DriveKitUI"),
    // ...
  ]
),

Cocoapods (deprecation scheduled for the end of 2025)

Add the following lines to your Podfile:

target 'MyTarget' do
  pod 'DriveKitPermissionsUtilsUI'
end

Then, run pod install

Initialization

If you have disabled the SDK auto-initialization, the Permissions Utils UI module must also be manually initialized. In the application's AppDelegate file, import DriveKitPermissionsUtilsUI:

import DriveKitPermissionsUtilsUI

Then, to initialize the Permissions Utils module in your app, you must call the initialization method in didFinishLaunchingWithOptions method of your AppDelegate:

import DriveKitCoreModule
import DriveKitCommonUI
import DriveKitPermissionsUtilsUI

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
   DriveKitUI.shared.initialize()
   DriveKitPermissionsUtilsUI.shared.initialize()
   ...
}

Last updated

Was this helpful?