The MyDataHelpsKit Software Development Kit allows you to develop custom participant experiences on Apple iOS devices.
MyDataHelpsClient
object for communication with MyDataHelps. This object can be retained for the lifetime of your app.ParticipantSession
using the access token. This is the primary interface for interacting with MyDataHelps. It can be retained for as long as the participant’s access token is valid; create a new ParticipantSession
when you renew the access token or when a different participant logs in.ParticipantSession
functions to perform MyDataHelps operations and requests for the participant.Example:
import MyDataHelpsKit
// Get a participant access token for an authenticated MyDataHelps user within your app
let tokenString = getAccessToken()
// Initialize a MyDataHelpsKit client and session using the participant access token.
let client = MyDataHelpsClient()
let session = ParticipantSession(client: client, accessToken: .init(token: tokenString))
// Example of using MyDataHelpsKit functionality:
session.getParticipantInfo { result in
switch result {
case let .success(model):
print("First Name: \(model.firstName ?? "(none)")")
print("Last Name: \(model.lastName ?? "(none)")")
case let .failure(error):
print(error)
}
}
import MyDataHelpsKit
// Get a participant access token for an authenticated MyDataHelps user within your app
let tokenString = getAccessToken()
// Initialize a MyDataHelpsKit client and session using the participant access token.
let client = MyDataHelpsClient()
let session = ParticipantSession(client: client, accessToken: .init(token: tokenString))
// Example of using MyDataHelpsKit functionality:
session.getParticipantInfo { result in
switch result {
case let .success(model):
print("First Name: \(model.firstName ?? "(none)")")
print("Last Name: \(model.lastName ?? "(none)")")
case let .failure(error):
print(error)
}
}
A complete example app can be found on GitHub.