iOS SDK
The Tutelar iOS SDK allows you to build delightful experiences in your native iOS
Features
Simplified Security: We make it simple for you to collect sensitive data such as device information of users.
Requirements
iOS
This framework requires several configurations to be able to work on iOS. Please make sure you have those requirement:
● Compatible with apps targeting iOS 13.0 and above.
● Use Swift version 5.0 and above
Step - 1 - Add Dependency
In the cocoapods section: section of your https://cocoapods.org/pods/tutelar find
TUTELAR and Integrate current pod version.
ex:
pod 'Tutelar', '~> 0.0.3'
Step - 2 - Import SDK
import Tutelar
Step - 3 - Initialize SDK
To initialize the SDK add the below line of code with the public key you retrieved from Tutelar merchant panel. If you don’t have a public key create new one.
let tutelar = Fingerprint (key: " Your Unique Public Key ")
Step - 4 - Get Device Details
Use the below line of code to get device details using button action
tutelar.getDeviceDetails(withDelegate: self )
Step - 5 - Implement Delegate Method
Use the below code to obtain the Device result.
extension ViewController: FingerprintDelegate{
func onFailure(message: String) {
// Failure Callback.
}
func onSuccess(data: String) {
// Success Callback
}
}
Step - 6- Add info.plist File
Optional : Use the below lines of code to get current location.
<key>NSLocationWhenInUseUsageDescription</key>
<string>Require to get user location</string>
Sample Device Fingerprint Data
{
"customer": {
"phone": "9042850403",
"name": "Nathan ",
"email": "[email protected]"
},
"deviceFingerPrint": {
"time": {
"timezone": "Asia\/Kolkata",
"timestamp": 1687255693166
},
"status": true,
"ipAddress": "103.42.72.86",
"device": {
"data_roaming": true,
"root_status": false,
"deviceMemory": "3660 mb",
"location_info": {
"latitude": "",
"longitude": "",
"address": ""
},
"ip_address": "172.18.24.6",
"microPhoneHardware": {
"hasMicrophone": true
},
"displayResolution": "375.0 x 812.0",
"brand": "Apple",
"deviceCharging": true,
"model": "iPhone",
"is_emulator": false,
"timezone": "Asia\/Kolkata",
"screenHeight": 812,
"deviceTypes": {
"isMac": false,
"isDesktop": false,
"isiPad": false,
"isiPod": false,
"isSmartTV": false,
"isMobile": false,
"isTablet": false,
"isiPhone": true,
"isLinux64": false,
"isLinux": false,
"isWindows": false
},
"videoHardware": {
"hasWebCam": true
},
"is_real_device": true,
"country_info": {
"country": "IN",
"display_country": "India",
"iso_3_country": "IN"
},
"system_storage": {
"total": "119.09 GB",
"used": "63.48 GB"
},
"platform": "iOS",
"external_storage": "",
"screen_brightness": 0.36149275302886963,
"touchSupport": true,
"board": "",
"network_type": "CTRadioAccessTechnologyLTE",
"language_info": {
"iso_3_language": "en",
"language": "en-IN",
"display_language": "English"
},
"deviceId": "6C75365E-077F-4694-9E26-5F49D122B1E8",
"os": "iOS 15.6.1",
"batteryLevel": "0.98",
"type": "",
"kernel_version": "21.6.0",
"devicePixelRatio": "375.0 x 812.0",
"timestamp": 1687255693.1973171,
"memory_information": {
"total_memory": "3660 mb",
"available_memory": "",
"used_memory": ""
},
"screenWidth": 375,
"manufacturer": "Apple",
"screen_size": "5.5",
"audioHardware": {
"hasSpeakers": true
},
"data_enabled": true
}
},
"shipping": {
"postalCode": "600398",
"address": "12b North street CIT ",
"state": "Tamilnadu ",
"method": "Delivery",
"name": "Nathan",
"phone": "9042858384",
"country": "India",
"email": "[email protected]",
"city": "Chennai ",
"period": "5"
},
"productDescription": "Television ",
"amount": "1",
"billing": {
"state": "Tamilnadu ",
"address": "12b North street CIT ",
"city": "Chennai ",
"country": "India",
"postalCode": "600398",
"name": "Nathan "
},
"merchant": {
"id": "TUTGOIBQAGO00001"
},
"orderId": 1687255693314.2939,
"mode": "test",
"productType": "TV",
“currencyCode”: “INR”,
"paymentData": {
"bin": "4242 4242 4242 4242",
"name": "Nathan",
"tokenHash": "ryvyIqXLkCYQxScj"
},
"paymentInstrument": "card"
}
Last updated