Device Intelligence helps prevent fraudsters from hacking, breaching, or spamming your application while providing detailed insights into every customer accessing your iOS app. By integrating the Device Intelligence module, you can effectively safeguard against account takeovers, multiple account signups, and fraudulent payments.
To implement SEON SDK for iOS, follow the steps below.
To be compatible with iOS 26, please update to at least version 5.6.2!
On v5.5.0 there's a known issue of not getting behaviour result when there's no location permission and you haven't explicitly set geolocationEnabled to false. Please update to v5.5.1 for the fixed version.
If you're using Swift Package Manager with an SDK version ranging from `5.2.0`-`5.4.2` and you encounter an error related to the revision id not matching the previously recorded value, then you should delete the Swift security fingerprint cache for this library.
You should delete the seon-ios-sdk-swift-package-{commit-hash}.json file located at:
~/Library/org.swift.swiftpm/security/fingerprints
You could also delete the caches if needed:
rm -rf ~/Library/Caches/org.swift.swiftpm
Or you can delete every fingerprint (not advised):
rm -rf ~/Library/org.swift.swiftpm/security/fingerprints
- iOS 15.0 or higher
- (optional) Access WiFi Information entitlement for
wifi_mac_addressandwifi_ssid - (optional) Core Location permission for
device_location,wifi_mac_addressandwifi_ssid(starting from iOS 13)
NOTE: If the listed permissions are not available for the application, the values collected using those permissions will be ignored. We recommend using as much permission as possible based on your use-case to provide reliable Device Intelligence.
The recommended approach for installing SeonSDK is via the CocoaPods package manager, as it provides flexible dependency management and simple installation.
Install CocoaPods if not already available:
gem install cocoapods
To integrate SeonSDK into your Xcode project using CocoaPods, specify it in your Podfile:
pod 'SeonSDK', '~> 5.8.0'
Then you can use install as usual:
pod install
URL for the repository: https://github.com/seontechnologies/seon-ios-sdk-swift-package
To be able to use the SDK in projects written in Swift you should add the use_frameworks ! attribute to the Podfile:
use_frameworks!
After that the SDK can be imported like any other library:
import SeonSDK
Alternatively a bridging header file can be used importing the SDK there:
#import <SeonSDK/SEONFingerprint.h>
If you opt to use a bridging header, the path to the header must be set in Build Settings -> Objective-C Bridging Header
/* CONFIGURATION */
let seonfp = SEONFingerprint.sharedManager()
// Enable logging
seonfp.setLoggingEnabled(loggingEnabled: true)
// Set session_id
seonfp.sessionId = "CUSTOM_SESSION_ID"
/* INVOCATION */
// Compute fingerprint asynchronously
seonfp.getFingerprintBase64 { seonFingerprint, error in
if let error{
// Handle the error
} else{
//set seonFingerprint as the value for the session
//property of your Fraud API request.
}
}
...
@import SeonSDK;
...
/* CONFIGURATION */
// Enable logging
[[SEONFingerprint sharedManager] setLoggingEnabled:true]
// Set session_id
[[SEONFingerprint sharedManager] setSessionId:@"[CUSTOM_SESSION_ID]"];
/* INVOCATION */
// Compute fingerprint asynchronously
[[SEONFingerprint sharedManager]
getFingerprintBase64:^(NSString *seonFingerprint, NSError *error) {
if (error == nil){
//set seonFingerprint as the value for the session
//property of your Fraud API request.
} else{
// Handle error
}
}];
Note: iOS SDK Version 5.5.0 or higher and the following Geolocation integration setup is required to use the Geofence API. For further information please visit https://docs.seon.io/api-reference/geofence-api
Important: Collecting consent and necessary permissions from the end user for location tracking is required.
Use the SEONGeolocationfig object the customise how the geolocation is collected or just use the instance as-is for default values. The following properties are available on object:
geolocationEnabled- Explicit property to set geolocation collection. Defaults to false/NO.prefetchEnabled- By setting it true the geolocation service is going to pre-fetch a valid location as soon as theSEONFingerprintobject is created. Defaults to false/NO.maxGeolocationCacheAgeSec- Sets the maximum allowed age of a location object in seconds. Default value is 60.geoLocationServiceTimeoutMs- Sets the maximum time in millisecondsgetFingerprintBase64orstopBehaviourMonitoringcan wait for a valid location. Default value is 3000.
Make sure you call setGeolocationConfig on SEONFingerprint before calling getFingerprintBase64 or stopBehaviourMonitoring for the SDK to enrich the collected device information with location data.
For the most accurate results when using the Geofence API, prefer Behaviour Monitoring over simply calling getFingerprintBase64, see the relevant section in the documentation about how to set up and use Behaviour Monitoring.
The following Geolocation specific error codes can occur:
1008:Authorization Error - Permission Denied: The user has denied the use of location services for the app or they have disabled it globally in the Settings.1009:Authorization Error - Not Determined: The user has not chosen whether the app can use location services.1010:Authorization Error - Restricted: The app is not authorized to use location services due to active restrictions.1011:Location Error - No Location: Failed to get location for device.1012:Location Error - Timeout: The location service has timed out.1013:Location Error - Location Services Disabled: The user has disabled location services by toggling the Location Services switch off in privacy settings.
Please note that if either of the previously listed Geolocation errors occur, the SDK should still return a valid fingerprint object which can be used as the session property for the regular Fraud API requests if needed.
// Prompt the user for appropriate location permission(s)
// ...
// Customize how geolocation is collected by modifying the default values of `SEONGeolocationConfig`
let config = SEONGeolocationConfig() // creates a config object with the default values
config.geolocationEnabled = true // Enable the Geolocation feature
config.prefetchEnabled = false // Disable pre-fetching a valid location
config.geolocationServiceTimeoutMs = 3000 // Timeout for the location service in milliseconds
config.maxGeoLocationCacheAgeSec = 60 // Maximum allowed age of a location object in seconds
// Set the geolocation config for the SEONFingerprint object
SEONFingerprint.sharedManager().setGeolocationConfig(config)
// Simply call getFingerprintBase64 with location data enriched
SEONFingerprint.sharedManager().getFingerprintBase64 { fingerPrint, error in
if let error = error {
// Handle any errors
print("Error fetching fingerprint: \(error.localizedDescription)")
} else if let fingerPrint = fingerPrint {
// Use the received fingerprint value in your session property for your Fraud API request
print("Received fingerprint: \(fingerPrint)")
}
}
// Prompt the user for appropriate location permission(s)
// ...
// Customise how geolocation is collected by modifying the default values of `SEONGeolocationConfig`
SEONGeolocationConfig *config = [[SEONGeolocationConfig alloc]init]; // creates a config object with the default values.
config.geolocationEnabled = YES; // Enable the Geolocation feature.
config.prefetchEnabled = NO; // Pre-fetch a valid location
config.geolocationServiceTimeoutMs = 3000; // Timeout for the location service.
config.maxGeoLocationCacheAgeSec = 60; // Maximum allowed age of a location object in seconds.
// Set the geolocation config for the SEONFingerprint object.
[[SEONFingerprint sharedManager] setGeolocationConfig:config];
// Simply call getFingerprintBase64 with location data enriched.
[[SEONFingerprint sharedManager] getFingerprintBase64:^(NSString *fingerPrint, NSError *error) {
if (error != nil) {
// Handle any errors
} else if (fingerprint) {
// Use the received fingerprint value in your session property for your Geofence API or Fraud API request.
}
}];
behaviour Monitoring allows the SEON SDK to be able to detect potentially suspicious user behaviour on the device. The SDK collects data during the session, which is then analyzed to identify potentially fraudulent environments and actions. This feature enhances the SDK’s ability to prevent fraud by detecting various forms of automated or suspicious activity, such as bot usage or device farms.
Note: For the result of the behaviour evaluation, we are introducing a new response field in the Fraud API response named
suspicious_flags. It's available in sessions generated by iOS SDK version 5.4.0 or later when the session had been generated by the newstartBehaviourMonitoringandstopBehaviourMonitoringinterfaces. On an iOS simulator and Android emulators the returned values are either not available or just simulated, please use a physical device for testing behaviour based functionalities.
The monitoring should be started with calling startBehaviourMonitoring wherever you would like to detect suspicious activity in your application and should be stopped with stopBehaviourMonitoring whenever it's reasonable. The returned session string should be then used in a Fraud API request as usual.
"possible_automation": Suggests that automation tools or scripts may be controlling the device."possible_device_farm": Suggests that the device might be part of a device farm used for fraudulent activities."possible_vishing": Flags possible vishing (voice phishing) activity, where the user might be coerced into providing sensitive information.- To be continuously improved and extended with new signals
// Start behaviour monitoring
do {
try seonfp.startBehaviourMonitoring()
} catch let error {
// Handle potential errors
print("Failed to start behaviour monitoring: \(error.localizedDescription)")
}
// Stop behaviour monitoring and get the fingerprint session result to be sent in
// with the Fraud API request
seonfp.stopBehaviourMonitoring { resultWithFingerprint, error in
if let error = error {
// Handle any errors
print("Error stopping behaviour monitoring: \(error.localizedDescription)")
} else {
// Use resultWithFingerprint in your Fraud API request
print("behaviour monitoring fingerprint: \(resultWithFingerprint)")
}
}
// Start behaviour monitoring
NSError *error = [[SEONFingerprint sharedManager] startBehaviourMonitoring];
if (error) {
// Handle potential errors
NSLog(@"Failed to start behaviour monitoring: %@", error.localizedDescription);
}
// Stop behaviour monitoring and get the fingerprint session result to be sent in
// with the Fraud API request
[[SEONFingerprint sharedManager] stopBehaviourMonitoring:^(NSString *resultWithFingerprint, NSError *error) {
if (error == nil) {
// Use resultWithFingerprint in your Fraud API request
NSLog(@"behaviour monitoring fingerprint: %@", resultWithFingerprint);
} else {
// Handle any errors
NSLog(@"Error stopping behaviour monitoring: %@", error.localizedDescription);
}
}];
- Introduced
system_integrityfield, visit SEON DOCS for further information. - Internal changes and improvements for upcoming features.
⚠️ IMPORTANT! This version was built against a yet unsupported iOS SDK 27. Use v5.8.1 instead.⚠️
- Revert minimum deployment target back from 15.6 to iOS 15.0.
- Fixed rare invalid geolocation states.
- Fixed setDnsTimeoutMs interface.
- Internal changes and improvements for upcoming features.
- Minor fixes and improvements.
- Introduced
mobile_detailsfield, enriching the Fraud API response with more device data. - Added
dnsTimeoutMsproperty to theSEONFingerprintobject. You can optionally set a custom timeout with this property for the SDK's network call.Note: Passing 0 here effectively skips the network logic which in turn won't populate the Fraud API fields with deviceip_ and dnsip_ prefixes
- Fixed a contention bug on some busy devices where the SDK has been configured to run with Geolocation features.
- Improved
device_nameresolution for newer devices. - Internal changes and improvements for upcoming features.
- Minor fixes and improvements.
- Updated
device_namefield to include the latest devices. - Fixed rare local network permission prompt.
- Minor improvements.
⚠️ IMPORTANT! This version includes necessary fixes to be compliant and compatible with iOS 26!⚠️
- Fixed an iOS app deployment issue ( ITMS-91011 ) related to the arm64e architecture slice
- Fixed an issue related to minimum deployment target version ( ITMS-90208 ) by raising it to 15.0 to match Apple's guidelines.
- Fixed crash on x86 architectures (Rosetta Simulator).
- Fixed location error propagation.
- Fixed state issue if GeolocationConfig is being set before each fingerprint call.
- Minor improvements for Behaviour Monitoring.
- Minor fixes.
IMPORTANT: Direct initialization of the
SEONFingerprintclass using[[SEONFingerprint alloc] init]or[SEONFingerprint new](Objective-C) /SEONFingerprint()(Swift) is now explicitly disabled and will result in a compile-time error.
Please make sure you obtain the SDK instance only via the shared singleton accessor:
[SEONFingerprint sharedManager](Objective-C) orSEONFingerprint.sharedManager()(Swift).
- Enhanced jailbreak detection.
- Improved compromised environment detection.
- Added gzip compression for session payloads to reduce transmission size.
- Restricted instantiation of the
SEONFingerprintobject. - Fixed output values for the
kernel_nameandkernel_archfields. - Fixed a rare crash related to rapid deallocations.
- Fixed a rare crash related to DeviceCheck framework.
- Fixed timing/concurrency related crashes.
- Fixed a bug where logging couldn't be disabled after it has been enabled in a session.
- Removed error message when calling
startBehaviourMonitoring. Now the SDK only displays a warning message when logging has been enabled. On a Simulator the SDK can only use default sensor values, please use a phyiscal device to test and debug the behaviour monitoring feature. - Improved jailbreak detection.
- Removed deprecated logs when logging is enabled.
- Internal changes and improvements.
- Fixed an audio issue occurring while using some hearing aids.
- Minor improvements.
- Changed the default value for the geolocationEnabled property to false/NO.
- Fixed a bug where there is no response received when calling stopBehaviourMonitoring if there is no granted location permission present or the geolocationEnabled property is not disabled explicitly.
IMPORTANT: This version is going to introduce a new Fraud API response field named
true_device_id.
- Compatibiity with SEON's Geofence API.
- Improved Geolocation collection.
- Extended the SDK's error object with Geolocation specific errors.
- Added
SEONGeolocationConfigobject and a corresponding setter to the SDK's interface with the following properties:geolocationEnabled- Explicit property to set geolocation collection. Defaults to true/YES.prefetchEnabled- By setting it true the geolocation service is going to pre-fetch a valid location as soon as theSEONFingerprintobject is created. Defaults to false/NO.maxGeolocationCacheAgeSec- Sets the maximum allowed age of a location object in seconds. Default value is 60.geoLocationServiceTimeoutMs- Sets the maximum time in millisecondsgetFingerprintBase64orstopBehaviourMonitoringcan wait for a valid location. Default value is 3000.
- Deprecated
setGeolocationTimeoutin favour ofsetGeolocationConfig,geoLocationServiceTimeoutMsshould be set on the config object instead. - Improved thread safety.
- Minor fixes and improvements.
- Improved thread management.
- Internal changes for React Native support.
- Fix invalid error message when calling
startBehaviourMonitoring
- Added Behaviour Monitoring feature, which allows detection of suspicious device behaviour.
- New
suspicious_flagsfield in the Fraud API response. Possible values include:"possible_automation": Indicates potential automation tool or script usage."possible_device_farm": Suggests the device might be part of a device farm."possible_vishing": Flags possible vishing activity.
- Added public interfaces for behaviour monitoring:
- Swift:
- startBehaviourMonitoring()
- stopBehaviourMonitoring(completionHandler: @escaping (String?, Error?) -> Void)
- Objective-C:
- -(NSError*)startBehaviourMonitoring;
- -(void)stopBehaviourMonitoring:(void(^)(NSString* resultWithFingerprint,NSError* error))completionHandler;
- Swift:
- Fixed potential memory leak.
- Fixed occasional "(null)" values in
proxy_addresswhen both proxy and vpn is enabled. - Internal improvements and changes for upcoming features.
- Added VPN detection logic and the related response field:
vpn_stateReturns the vpn connection state of the device. The possible return values are:"UNKNOWN""CONNECTED""NOT_CONNECTED"
- Added proxy detection logic and the following related response fields:
proxy_stateReturns the proxy connection state of the device. The possible return values are:"UNKNOWN""CONNECTED""NOT_CONNECTED"
proxy_addressReturns a String value of the connected proxy's host address followed by the port. The value can be null if no proxy connection has been found. Example value:"111.11.11.11:8008"- Internal changes for upcoming features.
- Added GeoLocation feature, the SDK now optionally can retrieve the device's location. See the documentation about how to use it.
- Internal performance improvements and changes for upcoming features
- Fixed rare threading related issue
- Added codesign signature to XCFramework binary to attest to the validity of the SDK
- Fixed test coverage reports not showing up when the SDK is linked
- Raised minimum deployment target from iOS 11.0 to iOS 12.0
device_locationContains additional device location datapoints. Refer documentation for details. This is currently an opt-in feature
- Fix rare failure on devices with Auto Proxy configuration.
- Fix test coverage report generation in XCode.
- Internal improvements.
-
Significantly improved the uniqueness and stability of the
device_hashproperty. With the current change the value should persist through app reinstalls.Note: This is NOT a breaking change for the
device_hashproperty. The value only changes for a small subset of devices, where thedevice_hashwasn't unique previously.
- Fix
system_uptimeto correctly return the elapsed time in seconds since the last cold boot instead of the unix timestamp.
- Internal improvements.
- Internal changes for upcoming features.
-
getFingerprintBase64’s completion handler now returns an NSError object which contains details about possible integration and runtime errors. For now the following errors are forwarded by the SDK:
SEONErrorInvalidSessionIDSEONErrorFingerprintFailed
- Introducing screen capturing detection
- Introducing call status detection
- Introducing various new response fields, listed below
- General performance improvements
- Improved stability of device hash
- Improved error handling
- Added PrivacyInfo manifest
is_biometrics_enabledFlags whether biometrics on the phone are enabled or not. This will help determining the end user’s security awareness.is_passcode_enabledFlags whether a passcode is enabled or not on the phone. This will help determining the end user’s security awareness.is_ios_app_on_macFlags when the host process is an iOS app running on a Mac. The value of the property is true for apps built using Mac Catalyst.is_on_callFlags if the phone is on a call during the transaction. High value security information which can be tied to fraud.is_screen_capturedFlags if the phone’s screen is captured during the transaction. High value security information which can be tied to fraud.can_send_mailFlags if the phone is set up for email sending.can_send_textFlags if the phone is set up for text sending. Information whether the device is set up for use properly, false values for either is suspicious if the device is a phone.timezone_identifierReturns the current system time zone’s geopolitical region ID. Eg.:Europe/Budapest
The following fields are no longer collected and removed from the Fraud API response to comply with Apple’s required reason API policy:
free_storagetotal_storagelast_boot_timecarrier_namecarrier_country
- Added class name prefixes to avoid collision with other frameworks
- Fixed minor bug where fingerprint generation could cause cuts in audio playback
- Added missing network configurations
- Added missing devices from
device_name's output
- Internal changes to prepare for upcoming features and improvements
- Changed fingerprint method to be async, improving speed and reliability
- device_ip fields are now available
- Performance improvements
- Swift integration improvements
- Minor fixes and integration improvements
- XCFramework support
- iOS 14 compatibility
- Stability and performance improvements
- Removed background HTTP request for data transmission, the SDK returns an encrypted, base64 encoded string to use with SEON's REST API
- Removed public key support
- Bugfixes and security improvements
- iOS 14 compatibility
- Stability and compatibility improvements
- Bugfixes and security improvements
- Bugfixes and performance improvements
- Bugfixes and performance improvements
startAnalyzingWithSessionmethod has been removed- Added
scanFingerprintmethod - Added public key support
- Enhanced logging settings
- Bugfixes and performance improvements
- Fix bug related to enabled proximity sensor
- Bugfixes and performance improvements
- First stable build