Get started
Last updated
Was this helpful?
Last updated
Was this helpful?
Before starting DriveKit Challenge module integration, make sure that you have , especially if you have .
If you use DriveKit Challenge without having initialized DriveKit, the SDK may not work properly in your application.
To add the Challenge module to your app:
Swift Package Manager: Add DriveKitChallenge
from repository: https://github.com/DriveQuantPublic/drivekit-sdk-spm.git
as dependency.
Cocoapods: add the following pod to your Podfile:
Then, run pod install
.
To synchronize the list of challenges, call the following method:
You can retrieve the list of challenges stored in the DriveKit local database by calling the previous method but with the SynchronizationType
parameter to .cache
.
You need to call the following method if you want to get more details and statistics about a defined challenge:
This method have the following parameters:
challengeId
String
Unique identifier of the challenge
synchronizationType
SynchronizationType
Can be .defaultSync
or .cache
.
- .defaultSync
will synchronize the challenge detail by calling the DriveQuant servers
- .cache
will retrieve the challenge detail already synchronized in the local database.
You can retrieve the details of a given challenge stored in the DriveKit local database by calling the previous method but with the SynchronizationType
parameter to .cache
.
To be able to join a given challenge, you can call the following method:
This method have the following parameter:
challengeId
String
Unique identifier of the challenge
and models are described in the part.
Take a look at the of our DriveKit Demo App to see how it is implemented.
and models are described in the part.
Take a look at the of our DriveKit Demo App to see how it is implemented.
enum values are described in the part.
Take a look at the of our DriveKit Demo App to see how it is implemented.