AdressCheck (Deprecated)

Analytics

Our SDKs by default collect information about the user and running environment to better map fraudsters and understand their behaviors. We recommend keeping this collection active as the sole purpose of this data is for fraud reduction, but if you wish, you can disable it by the parameter .setAnalyticsSettings(boolean useAnalytics).

Required permissions

In the info.plist file, add the permissions below:

Privacy - Location Always and When In Use Usage Description
Privacy - Location Always Usage Description
Privacy - Location Usage Description
Privacy - Location When In Use Usage Description

Runtime Permissions

Starting the SDK

In the application:didFinishLaunchingWithOptions: method of your AppDelegate file, enter:

import AddressCheck

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
    
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        
        //Inicializa SDK
        AddressCheck.initSDK()
        
        return true
    }
}

How to use

First create an object of type AddressCheck. This object is for you to configure all your business rules for the address check:

let AddressCheck = new AddressCheck.Builder(mobileToken: mobileToken, peopleId: peopleId)
    // see a table belowwe
    .build();

With this object created, and after collecting the address entered by your user, implement the delegate, and its mandatory methods, AddressCollectionDelegate to your class, create an object of type AddressCollection, passing the object created earlier, and assign the address, as in the example:

let addressCollection = AddressCollection(addressCheck: addressCheck)

addressCollection.delegate = self

let address = Address()
// see the table below

addressCollection.setAddress(address)

Address

For address submission, you must enter the following fields:

Address address = new Address()
address.locale = Locale.init(identifier: "pt-br")
address.countryName = COUNTRY_NAME
address.countryCode = COUNTRY_CODE
address.adminArea = ADMIN_AREA
address.subAdminArea = SUB_ADMIN_AREA
address.locality = LOCALITY
address.subLocality = SUB_LOCALITY
address.thoroughfare = THOROUGHFARE
address.subThoroughfare = SUB_THOROUGHFARE
address.postalCode = POSTAL_CODE

That's it! After that, our SDK is already evaluating your user's location in the background to verify that he actually lives at the address you entered.

Checking the Address Validation Status

To check the status of the address validation, use the following route:

Resource: https://api.mobile.combateafraude.com/address/{peopleId}?project=ios

Method: GET

Response

Status: 200 (OK)

Body

Last updated

Logo

2023 © Caf. - All rights reserved