pod 'SenseSDK', '~> 1.0.1'pod updateimport SenseSDKfunc initiateSense(){
let senseConfig = SenseConfig()
senseConfig.apiKey = "Your Unique Public API Key"
senseConfig.senseInfo = false // true or false
senseConfig.allowGeoLocation = false // true or false
senseConfig.tag = "" // String whatever you need like Home
senseConfig.sessionId = "" //Optional used for Workflow
// senseConfig.metaInfo = [
// "phone": "9xxxxxxxxx",
// "name": "xxxxxxxxxxx"
// ]
// A collection of key-value pairs intended for storing supplementary data related
// to the request. The set supports up to 15 pairs, with each key
// and value limited to a maximum of 256 characters.
Sense.initSDK(senseConfig: senseConfig, withDelegate: self)
}SenseSDK.getSenseDetails(withDelegate: self)extension ViewController: SenseDelegate{
func onFailure(message: String) {
// Failure Callback.
}
func onSuccess(data: [String : Any]) {
// Success Callback
}
}<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><!-- Remote Access Apps -->
<string>tvcontrol1</string> <!-- TeamViewer -->
<string>anydesk</string> <!-- AnyDesk -->
<string>rustdesk</string> <!-- RustDesk -->
<!-- Meeting Apps -->
<string>zoommtg</string> <!-- Zoom -->
<string>msteams</string> <!-- Microsoft Teams -->
<string>slack</string> <!-- Slack -->
<string>skype</string> <!-- Skype --><key>LSApplicationQueriesSchemes</key>
<array>
<string>whatsapp</string>
<string>tez</string>
<string>phonepe</string>
<string>cred</string>
<string>amazon</string>
</array>import UIKit
import SenseSDK
class SenseController: UIViewController, SenseDelegate, SenseBehaviourDelegate {
@IBOutlet weak var txtUsername: UITextField!
@IBOutlet weak var txtPassword: UITextField!
@IBOutlet weak var scrollView: UIScrollView!
@IBOutlet weak var btnSense: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
SenseSDK.initKeyStrokeBehaviour(for: [txtUsername, txtPassword])
SenseSDK.initScrollBehaviour(for: [scrollView])
SenseSDK.initTouchBehaviour(for: self.view)
}
func initiateSense(){
let senseConfig = SenseConfig()
senseConfig.apiKey = "Your Unique Public API Key"
senseConfig.senseInfo = false // true or false
senseConfig.allowGeoLocation = false // true or false
senseConfig.tag = "" // String whatever you need like Home
senseConfig.sessionId = "" //Optional used for Workflow
// senseConfig.metaInfo = [
// "phone": "9xxxxxxxxx",
// "name": "xxxxxxxxxxx"
// ]
// A collection of key-value pairs intended for storing supplementary data
// related to the request. The set supports up to 15 pairs, with each
// key and value limited to a maximum of 256 characters.
Sense.initSDK(senseConfig: senseConfig, withDelegate: self)
}
@IBAction func btnSense(_ sender: Any) {
initiateSense()
SenseSDK.getSenseDetails(withDelegate: self)
}
@objc func onSuccess(data: String) {
// Handle success callback
}
@objc func onFailure(message: String) {
// Handle failure callback
}
func onFailureBehaviour(message: String) {
// Handle failure callback
}
func onSuccessBehaviour(data: String) {
// Handle success callback
}
}@IBOutlet weak var txtUsername: UITextField
@IBOutlet weak var txtPassword: UITextField
SenseSDK.initKeyStrokeBehaviour(for: [txtUsername, txtPassword]);@IBOutlet weak var scrollView: UIScrollView
SenseSDK.initScrollBehaviour(for: [scrollView]);SenseSDK.initTouchBehaviour(for: self.view)SenseSDK.getBehaviourData(withDelegate: self)
extension ViewController: SenseBehaviourDelegate{
func onFailureBehaviour(message: String) {
print("Failure data")
}
func onSuccessBehaviour(data: String) {
print("Success data")
}
}