DeviceConnect IOS SDK enables the collection of anonymized, non-PII data from user devices, ensuring compliance with privacy policies by obtaining explicit user consent before initiating data sync processes.
Device Connect IOS SDK works on IOS 16.1 and Xcode 14.1.
Add the SDK to the application using Swift Package Manager (Preferred) or Cocopods.
-
In Xcode, select File > Add Packages...
-
Enter the Risk Manager URL for this repository
- Edit the
podfile and addpod 'RiskManager
::: warning NOTE Following will be shared by FinBox team at the time of integration:
CLIENT_API_KEY:::
To create a user, call the createUser method with the following arguments:
- Client API Key
- Customer ID
::: danger IMPORTANT
CUSTOMER_IDMust be alphanumeric (no special characters).- Should not exceed 64 characters.
- Must not be
nullor an empty string"". :::
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
}You can read about the errors in the Error Codes section.
The startPeriodicSync method should be invoked only after receiving a successful response from the createUser method callback. This method initiates background syncing for all data sources based on the permissions granted by the user. Data is synced at regular intervals in the background, ensuring continuous and seamless data collection.
let finbox = FinBox()
finbox.startPeriodicSync()::: tip RECOMMENDATION To handle cross-login scenarios:
When a user logs back into the app with fresh credentials:
- Call the
createUsermethod to register the new user. - Follow it by
startPeriodicSyncto resume data syncing for the new user. Even though the SDK automatically adapts to a new user, this approach minimizes potential delays in syncing during the first session :::
Make sure to cancel data synchronization tasks when the user logs out of the app by using the stopPeriodicSync method. This ensures that no background sync operations continue unnecessarily, maintaining data security.
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)If you need to clear a user's data stored on the device and initiate a fresh data sync, use the resetData method. This ensures that all previous data is removed, and syncing starts from scratch.
FinBox.resetData()If a user requests to be forgotten, use the forgetUser method. This will delete all user details from our system, ensuring this meets digital guidelines for right to be forgotten.
FinBox.forgetUser()