FingerprintJS Pro iOS Integrations
An example app and packages demonstrating FingerprintJS Pro capabilities on the iOS platform. The repository illustrates how to retrieve a FingerprintJS Pro visitor identifier in a native mobile app. These integrations communicate with the FingerprintJS Pro API and require browser token. If you are interested in the Android platform, you can also check our FingerprintJS Pro Android integrations.
There are two typical use cases:
- Using our native library to retrieve a FingerprintJS Pro visitor identifier in the native code OR
- Retrieving visitor identifier using signals from the FingerprintJS Pro browser agent in the webview on the JavaScript level combined with vendor identifier.
Using the external library to retrieve a FingerprintJS Pro visitor identifier
This integration approach uses our library FingerprintJSPro. It collects various signals from the iOS system, sends them to the FingerprintJS Pro API for processing, and retrieves an accurate visitor identifier.
1. Installation
CocoaPods
Specify the following dependency in your Podfile
:
Swift Package Manager
Add the following dependency to your Package.swift
.
2. Import
3. Get the visitor identifier
You can find your browser api token in your dashboard.
Params
token: string
- API token from the FingerprintJS dashboardendpoint: URL?
-nil
for default endpoint, possible format for custom endpoint:URL(string: "https://fp.yourdomain.com")
region: String?
-nil
for the Global region,eu
for the European region
Using inside a webview with JavaScript
This approach uses signals from FingerprintJS Pro browser agent together with iOS device vendor identifier. The vendor identifier is added to the tag
field in the given format. FingerprintJS Pro browser agent adds an additional set of signals and sents them to the FingerprintJS Pro API. Eventually, the API returns accurate visitor identifier.
1. Add a JavaScript interface to your webview
2. Setup the JavaScript FingerprintJS Pro integration in your webview
Params
You can find your browser token in your dashboard.
Params format and properties are the same as in JS agent
The full example content view for SwiftUI with configured fingerprintjs-pro might look like:
Additional Resources
FingerprintJS Pro documentation
License
This library is MIT licensed.
GitHub
https://github.com/fingerprintjs/fingerprintjs-pro-ios-integrations