VerisoulSDK is an iOS SDK designed to help detect and prevent fake users, bots, multi-accounting, fraud, and other malicious activities on your platform. It provides a seamless and easy-to-integrate solution to ensure that every user is legitimate, trusted, and unique.
- Bot Detection: Detects and blocks bot traffic automatically.
- Multi-Account Prevention: Identifies and blocks users creating multiple accounts.
- Fraud Prevention: Detects high-risk accounts to prevent fraudulent behavior.
- Quick Integration: Supports both CocoaPods and Swift Package Manager (SPM).
- Real-time Monitoring: Continuously monitors user behavior to identify suspicious activities at critical moments in an account’s lifecycle.
You can install VerisoulSDK in your iOS project using either CocoaPods or Swift Package Manager.
To integrate VerisoulSDK with CocoaPods:
- Ensure CocoaPods is installed on your machine. If not, run:
sudo gem install cocoapods
- Add VerisoulSDK to your Podfile:
pod 'VerisoulSDK', '~> 0.1'
- Run the following command to install the SDK:
pod install
- Open the .xcworkspace file in Xcode and start using the SDK.
To integrate VerisoulSDK using Swift Package Manager:
Open your project in Xcode.
Go to File > Add Packages.
Enter the repository URL for VerisoulSDK:
https://github.com/verisoul/ios-sdk.gitChoose the version you wish to use and add the package.
The SDK will automatically integrate into your project.
VerisoulSDK provides the following public methods:
- configure(env:projectId:bundleIdentifier:) Configures the SDK with the environment, project ID, and bundle identifier. This initializes the networking, device check, and device attestation components.
Parameters:
env (VerisoulEnvironment): The environment to configure the SDK with (e.g., dev, staging, prod). projectId (String): Your project's unique identifier. bundleIdentifier (String): The app's bundle identifier.
VerisoulSDK.shared.configure(env: .prod, projectId: "your-project-id",
bundleIdentifier: "com.example.app")SDK Configuration: The configure(env:projectId:bundleIdentifier:) method should be called once, typically during the app's initialization process (e.g., in the AppDelegate or SceneDelegate)
- session() async throws -> String Retrieves the session ID asynchronously. Waits up to 10 seconds for the session ID from the web view.
Returns: A string representing the session ID. Throws:
An error if the session ID cannot be retrieved within the timeout.
do {
let sessionId = try await VerisoulSDK.shared.session()
print("Session ID: \(sessionId)")
} catch {
print("Failed to retrieve session ID: \(error)")
}