Device Connect IOS SDK is used to collect anonymised non-PII data from the devices of the users after taking explicit user consent.
Device Connect IOS SDK works on IOS 14.0 and Xcode 14.1.
Add the SDK to the application using Cocopods.
- Edit the
pod
file and addpod 'RiskManager'
Call createUser
method to create the user. It takes Client Api Key and Customer Id as the arguments.
The response to this method (success or failure) can be captured using the callback.
Finbox.createUser(apiKey: "API_KEY", customerId: "CUSTOMER_ID") { token in
// Authentication is success
} error: { code in
// Authentication failed
}
This is to be called only on a successful response to createUser
method's callback. On calling this the syncs will start for all the data sources configured as per permissions. The method below syncs data in the background at regular intervals.
let finbox = FinBox()
finbox.startPeriodicSync()
If you have already set up the sync for the user, cancel the syncs using stopPeriodicSync
method.
finbox.stopPeriodicSync()
By default sync frequency is set to 8 hours, you can modify it by passing preferred time in seconds as an argument to setSyncFrequency
method once the user is created.
finbox.setSyncFrequency(12 * 60 * 60)
In case the user data needs to be removed on the device so that you can re-sync the entire data, use the method resetData
.
FinBox.resetData()
In case the user choose to be forgotten, use the method forgetUser
. This will delete the user details in our system.
FinBox.forgetUser()