Get started
Prerequisite
Before starting DriveKit Challenge UI integration, make sure that you have initialized Challenge and Common UI modules.
Integration
To add the Challenge UI module to your app:
Swift Package Manager: Add
DriveKitChallengeUI
from repository:https://github.com/DriveQuantPublic/drivekit-ui-ios.git
as dependency.Cocoapods (deprecation scheduled for the end of 2025): add the following pod to your Podfile:
target 'my-target' do
pod 'DriveKitChallengeUI'
end
Then, run pod install.
Initialization
If you have disabled the SDK auto-initialization, the Challenge UI module must also be manually initialized. In the application's AppDelegate file, import DriveKitChallengeUI
:
import DriveKitChallengeUI
Then, to initialize Challenge UI module in your app, you must call the initialization method in didFinishLaunchingWithOptions
method of your AppDelegate:
import DriveKitCore
import DriveKitCommonUI
import DriveKitChallengeUI
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
DriveKit.shared.initialize()
DriveKitUI.shared.initialize()
DriveKitChallengeUI.shared.initialize()
...
}
Display Challenge List
To display the challenges list, just call the following method:
self.navigationController?.pushViewController(DriveKitChallengeUI.shared.getChallengeListViewController(), animated: true)
Last updated
Was this helpful?