Skip to content

sense-opensource/sense-device-identity-ios

Repository files navigation

Sense Device Identity iOS

Welcome to Sense’s open source repository

🖱️ Device Identity

IP Address Location Screen Resolution Connection Sense ID Media Call Status Location IP Address Memory Information Proximity Sensor Data System Storage Battery Informations Device Informations

Getting started with Sense

Sense - iOS SDK

Sense is a device intelligence and identification tool. This tool collects a comprehensive set of attributes unique to a device or browser, forming an identity that will help businesses. Requirements

Requirements

  • OS 12.0 or above
  • Swift version 5.0 and above

Note: If the application does not have the listed permissions, the values collected using those permissions will be ignored. To provide a valid device details, we recommend employing as much permission as possible based on your use-case.

Step 1 - Install SDK

 pod 'SenseOS', '~> 0.0.2'

Step 2 - Import SDK

 import SenseOS

Step 3 - Add Delegate Method

Add the delegate method in your Controller Class file

SenseOSDelegate

Step 4 - Get Device Details

Use the line below to invoke any button action or ViewDidLoad to get the DeviceDetails.

SenseOSSDK.getSenseDetails(withDelegate: self)
let config = SenseOSConfig()
SenseOSSDK.initSDK(senseConfig: config, withDelegate: self)

Step 5 - Location Permission (Optional)

You have to add this permission in Info.plist to get Device Location Information.

 <key>NSLocationWhenInUseUsageDescription</key>
 <string>This app needs access to your location to provide location-based services.</string>
 <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
 <string>Location access is required for enhanced app functionality.</string>
 <key>NSLocationWhenInUseUsageDescription</key>
 <string>Require to get user location</string>

Step 6 - Implement Delegate Method

Set and Implement our Delegate method to receive the Callback details

 extension ViewController: SenseOSDelegate{
    func onFailure(message: String) {
        // Failure Callback.
    }
    func onSuccess(data: [String : Any]) {
        // Success Callback
    }
}

Sample Program

Here you can find the demonstration to do the integration.

import UIKit
import SenseOS

class SenseOSController: UIViewController, SenseOSDelegate {

  override func viewDidLoad() {
      super.viewDidLoad()
	SenseOSSDK.getSenseDetails(withDelegate: self)
        let config = SenseOSConfig()
        SenseOSSDK.initSDK(senseConfig: config, withDelegate: self)
      
  }

  @objc func onSuccess(data: String) {     
      // Handle success callback
  }
  @objc func onFailure(message: String) {
      // Handle failure callback
  }
}

Plug and play, in just 4 steps

1️⃣ Visit the GitHub Repository
2️⃣ Download or Clone the Repository. Use the GitHub interface to download the ZIP file, or run.
3️⃣ Run the Installer / Setup Script. Follow the setup instructions provided below.
4️⃣ Start Testing. Once installed, begin testing and validating the accuracy of the metrics you're interested in.

With Sense, you can

✅ Predict user intent : Identify the good from the bad visitors with precision
✅ Create user identities : Tokenise events with a particular user and device
✅ Custom risk signals : Developer specific scripts that perform unique functions
✅ Protect against Identity spoofing : Prevent users from impersonation
✅ Stop device or browser manipulation : Detect user behaviour anomalies

Resources

MIT license :

Sense OS is available under the MIT license

Contributors code of conduct :

Thank you for your interest in contributing to this project! We welcome all contributions and are excited to have you join our community. Please read these code of conduct to ensure a smooth collaboration.

Where you can get support :

Gmail [email protected]

Public Support:

For questions, bug reports, or feature requests, please use the Issues and Discussions sections on our repository. This helps the entire community benefit from shared knowledge and solutions.

Community Chat:

Join our Discord server (link) to connect with other developers, ask questions in real-time, and share your feedback on Sense.

Interested in contributing to Sense?

Please review our Contribution Guidelines to learn how to get started, submit pull requests, or run the project locally. We encourage you to read these guidelines carefully before making any contributions. Your input helps us make Sense better for everyone!