DeviceAnalyser (Deprecated)

Get relevant information from an iOS device.

  • Geolocation: Device Analyser is capable of obtaining geolocation data with high accuracy.

Required permissions

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

Permission

Required?

Privacy - Location When In Use Usage Description

Yes

Instantiating the DeviceAnalyser object

First, create an object of type DeviceAnalyser. This object is for you to configure all your business rules for the SDK:

var deviceAnalyser = new DeviceAnalyserSdk.init()

LocationListener

Result

Data type

location

On success, returns a CLLocation object with the geolocation data:

  • location.coordinate.latitude

  • location.coordinate.longitude

CLLocation

failure

In case of error, returns an SDKFailure object

SDKFailure

Example of use

var deviceAnalyser: DeviceAnalyserSdk! // Keep the reference in your viewController

func starDeviceAnalyser(){
    self.deviceAnalyser = DeviceAnalyserSdk.init()
    self.deviceAnalyser.getLocation() {
        (location, failure) in
        // Get the location
    }
}

Last updated

Logo

2023 © Caf. - All rights reserved