iOS SDK
Runtime Application Self-Protection for iOS. Detects threats continuously with zero impact on app performance.
1
Add the SDK
- Copy
VeilSDK.xcframeworkinto your project directory. - In Xcode: target → General → Frameworks, Libraries, and Embedded Content
- Tap + → Add Files → select
VeilSDK.xcframework - Set embed option to Embed & Sign
2
Initialize
Call in your AppDelegate. Pass the root view controller via on: to enable security alert popups.
import VeilSDK
Veil.shared.initializeSDK(
clientId: "your-client-id",
appId: "your-app-id",
appName: "My App",
packageName: Bundle.main.bundleIdentifier ?? "",
apiKey: "td_live_...",
policy: .warnOnly,
on: viewController
) { response, error in
if let r = response, !r.isSafe {
// threat detected — r.riskLevel, r.threatCodes
}
}3
Choose a policy
Control how the SDK reacts when threats are detected.
| Policy | Behaviour |
|---|---|
| .silent | Detect silently — no UI shown |
| .warnOnly | Show dismissible warning (default) |
| .blockOnHigh | Block app on high severity threats |
| .blockOnCritical | Block app on critical threats only |
Need full API documentation?
Complete reference, threat coverage, and compliance guides are available after onboarding.