Overview

The credoSDK for iOS is designed to capture the digital footprint of an iOS smartphone and upload it to the credolab web-service for future processing of scores and fragments.

The diagram below shows the overview of how your mobile app can work with credoSDK for iOS:

How will your mobile app work with credoSDK for iOS

Standard flow for mobile:
1. Initialize credoapp SDK
2. Collect credolab dataset
2.1  Check reference number uniqueness
2.2 Collect dataSet
3. Login
4. Get credolab score

Download

Click here to download the SDK modules.

There are 6 different modules, one for each of the 6 permissions that the SDK can access:
1. Core

2. Contacts

3. Calendar Event

4. Calendar Reminder

5. Media

6. Music

Since the purpose of this SDK integration is to collect metadata for credit scoring purposes, we recommend you to download and integrate as many modules as possible into your mobile app. However, we recognise that you might not want to add any friction to the current user experience or that you might not want to enable a "dangerous permission". As such, you are free to limit the permissions to the ones that your mobile app already requires.

Rest assured that we collect only metadata, not personal data, and that we can calculate an alternative credit score even if you integrate only the core module.

Integration Guideline

What is a module?

You can easily customise the the SDK by adding different modules based on the permissions used in the application. Each module is presented as an AAR file that extracts different data types according to the table below:

Credoapp SDK Modules

Module Name Description Total Fields Permissions
CredoAppCore
CredoAppService.Builder
CredoAppResult
CredoAppService 
Main module. Required

Extracts various metadata connected with device characteristics and configuration. This includes info about device brand, model, total and available free memory, and other data describing device.
95 Not Required
CredoAppContacts
ContactsModule
Additional module.

Metadata connected with Contacts and Contacts Group presented on the device.
60 NSContactsUsageDescription
CredoAppCalendarEvents
CalendarEventsModule
Additional module.

Extracts metadata connected with calendar evets information presented on the device. This includes metadata of calendar events such as whether event has organizer, location, and alarm or not, and etc.
32 NSCalendarsUsageDescription
CredoAppCalendarReminders
CalendarRemindersModule

Additional module.

Extracts metadata connected with calendar reminders information presented on the device. This includes metadata of calendars reminders such as whether reminder has notes, attendees, and alarm or not, and etc.
24 NSRemindersUsageDescription
CredoAppMedia
MediaModule
Additional module.

Extracts metadata connected with with pictures, music, audios, and videos that are located in the device.
48 NSPhotoLibraryUsageDescription
CredoAppMusic
MusicModule
Additional module.

Extracts metadata connected with audios that are located on the device.
42 NSAppleMusicUsageDescription

How to integrate the credoapp SDK into an Android App

Preconditions

  1. Obtain a unique credoapp authentication key from credolab Representative(s) and use it during the data collection process. If you sign up via website, credolab Representative(s) will send you the authentication key 1-3 days upon sign up.
  2. For free trial user, the URL for the integration: https://scoring-sales.credolab.com/
  3. Download credoapp SDK
  4. The minimum deployment target iOS must be set to 9 or higher to use these libraries. 
  5. Programming language Swift
  6. Declare permissions to info.plist file from permissions table

Integrate the credoapp SDK into iOS application

  1. Add credoapp SDK modules xcframework files to project Frameworks group

Logging credoapp SDK events (optional)

Credolab highly recommends to log SDK events to gain information for identification and analysis of a particular case. You can use a framework of your choice for this purpose.. An example is below:

log("LogType_CurrentTime_ActionName_RecordNumber")log("LogType_CurrentTime_CredoappExceptionType_CredoappExceptionMessage_RecordNumber")


How to use credoapp SDK

To start work with CredoApp SDK firstly you will need to create an instance of CredoAppService.


CredoAppService basic method:

  • execute. This method is intended to collect data from the device and upload it to the credolab web-service.


How to create CredoAppService instance:



CredoAppService.Builder(url: serverURL, authKey: authKey)
                .addModule(MusicModule())
                .addModule(ContactsModule())
                .addModule(CalendarRemindersModule())
                .addModule(CalendarEventsModule())
                .addModule(MediaModule())
                .build()


How to access modules?


import CredoAppCore
import CredoAppMusic
import CredoAppContacts
import CredoAppCalendarReminders
import CredoAppCalendarEvents
import CredoAppMedia


An Example of credoapp usage in Swift:


Credoapp API Description

Credoapp Builder

credoapp.CredoAppService.Builder

Builder is responsible for creating the CredoAppService class instance.

Class builder

Description:

Creates an instance of CredoAppService with target configuration.

Signature:


CredoAppService.Builder(url : String, authKey : String) 

Parameters

Name Description Type
url The URL of credolab service.  string 
authkey  An authentication key can be obtained from the credolab team.  string 

Methods

addModule

Description:

Adds a module to the builder configuration.

Signature:


addModule(module: Module) : CredoAppService.Builder

Parameters:

Name Description Type
recordNumber Requires one of the defined modules String

Returns: credoapp.CredoAppService.Builder

setForceResolvePermissions

Description:

Sets the permissions request behavior.  

Signature:


setForceResolvePermissions(force: Bool) : CredoAppService.Builder

Parameters:

Name Description Type
force If ‘true’ then SDK requests permissions automatically otherwise SDK omits requesting permissions. Default value is ‘true’ Bool

build

Description:

Instantiates CredoAppService class instance.

Signature:


build(): CredoAppService

Parameters:

No

Returns:

Type Description
CredoAppService Creates an instance of CredoAppService with target configuration.

Credoapp Service

credoapp.CredoAppService

CredoAppService enables the capture of a client digital footprint with a view to future processing of it at credolab web-service.


Methods

execute

Description:

Collects and uploads data from the phone to the credolab web-service. This method performs networking operations and must be called not on UI thread.


Signature:


execute(referenceNumber: String) : CredoAppResult

Parameters:

Name Description Type
referenceNumber Unique identifier intended to associate dataset, uploaded to credolab web-service, with a record on the lender side. (The max length of 100 characters) string

Returns:

Type Description
CredoAppResult Returns if execute action is succeeded.
CredoAppResult.Error Returns an error if something went wrong. Please refer to the error codes table.

Credoapp Result Success

credoapp.CredoAppResult<T>.Success

CredoAppResult.Success enum states for successful operation and may contain a value


Fields

Value

Description:

Returns operation value.

Signature:


value : T

Parameters:

No

Returns:

Type Description
T Returns value of generic type.

Credoapp Result Error

credoapp.CredoAppResult.Error

CredoAppResult.Error enum states for unsuccessful operation and contains details


Fields

message

Description:

Returns message value of error.

Signature:


message : String

Parameters:

No

Returns:

Type Description
string Returns message value of error.

Code

Description:

Returns a code value of error.

Signature:


code : Int

Parameters:

No

Returns:

Type Description
Int Returns code of error. Please refer to the error codes table

Error Codes

Status Code Reason Description
30 Duplicated areas error The extracting areas are duplicated.
40 Value is invalid The value is invalid.

Example:
Auth key is invalid
URL is invalid
41  Reference number is not unique or invalid Reference number already exists.

Example:
ReferenceNumber is not unique or invalid
42 Forbidden action error The subscription configuration is incorrect or has no sufficient rights. 
50 Server error  Something is wrong with the server. 
80 Network error Something is wrong with the network.
90  Unknown error  Unexpected error occured.