#
Getting Started - Mobile SDK
Quick start guide for integrating VerifEye Mobile SDK into your iOS and Android applications.
#
📋 Prerequisites
#
iOS
- ✅ Xcode 12 or later
- ✅ iOS 12.0+ deployment target
- ✅ CocoaPods or Swift Package Manager
- ✅ A VerifEye account and API key
#
Android
- ✅ Android Studio 4.0 or later
- ✅ Android 6.0+ (API 23+)
- ✅ Gradle 6.0+
- ✅ A VerifEye account and API key
#
📥 Installation
#
iOS (CocoaPods)
# Podfile
platform :ios, '12.0'
target 'YourApp' do
use_frameworks!
pod 'VerifEye', '~> 1.0'
end
pod install
#
iOS (Swift Package Manager)
- In Xcode, go to File → Add Packages
- Enter:
https://github.com/Realeyes/verifeye-ios-sdk.git - Select version and add to your project
#
Android (Gradle)
// build.gradle (Project level)
allprojects {
repositories {
maven { url 'https://maven.verifeye.com/releases' }
}
}
// build.gradle (App level)
dependencies {
implementation 'com.verifeye:mobile-sdk:1.0.0'
}
#
🚀 Quick Start
#
iOS (Swift)
import VerifEye
class ViewController: UIViewController {
let liveness = VEFaceLiveness(apiKey: "YOUR_API_KEY")
override func viewDidLoad() {
super.viewDidLoad()
// Request camera permission
AVCaptureDevice.requestAccess(for: .video) { granted in
if granted {
self.startLiveness()
}
}
}
func startLiveness() {
liveness.start(from: self) { result in
switch result {
case .success(let data):
if data.isLive {
print("Live face detected! Confidence: \(data.confidence)")
} else {
print("Spoof detected!")
}
case .failure(let error):
print("Error: \(error.localizedDescription)")
}
}
}
}
#
Android (Kotlin)
import com.verifeye.FaceLiveness
import android.Manifest
import androidx.core.app.ActivityCompat
class MainActivity : AppCompatActivity() {
private lateinit var liveness: FaceLiveness
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
liveness = FaceLiveness(this, "YOUR_API_KEY")
// Request camera permission
ActivityCompat.requestPermissions(
this,
arrayOf(Manifest.permission.CAMERA),
CAMERA_PERMISSION_CODE
)
}
private fun startLiveness() {
liveness.start { result ->
when (result) {
is Result.Success -> {
if (result.data.isLive) {
Log.d("VerifEye", "Live face detected!")
} else {
Log.d("VerifEye", "Spoof detected!")
}
}
is Result.Error -> {
Log.e("VerifEye", "Error: ${result.exception.message}")
}
}
}
}
companion object {
private const val CAMERA_PERMISSION_CODE = 100
}
}
#
📱 React Native
#
Installation
npm install @verifeye/react-native
#
iOS Setup
cd ios && pod install && cd ..
#
Usage
import { FaceLiveness } from '@verifeye/react-native';
import { Button } from 'react-native';
function App() {
const startVerification = async () => {
try {
const result = await FaceLiveness.start({
apiKey: 'YOUR_API_KEY'
});
if (result.isLive) {
console.log('Live face detected!');
}
} catch (error) {
console.error('Verification failed:', error);
}
};
return (
<Button title="Start Verification" onPress={startVerification} />
);
}
#
🔧 Configuration
#
iOS Info.plist
Add camera permission description:
<key>NSCameraUsageDescription</key>
<string>We need camera access for face verification</string>
#
Android Manifest
Add camera permission:
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
#
📚 Next Steps
Explore the Mobile SDK features:
- Face Liveness Detection
- Face Match Verification
- Face Search
- DeepFake Detection
- Age/Gender Verification
#
🆘 Need Help?
Last updated: 2025-01-13