KYCIS SDK Docs
iOS

Platform Config

iOS configuration with backend contract parity

Configuration Strategy

iOS config should mirror Android semantics:

Info.plist Configuration

<!-- SDK Configuration -->
<key>KYCISBackendBaseURL</key>
<string>https://kycis.zynnex.in/v1</string>

<key>KYCISClientID</key>
<string>your_client_id</string>

<key>KYCISMappingVersion</key>
<string>v1</string>

<key>KYCISConfigRefreshInterval</key>
<integer>60</integer>

Runtime Policy

struct RuntimePolicy {
    let backendBaseUrl: String
    let clientId: String?
    let mappingVersion: String?
    let appVersion: String?
    let triggerStartMode: TriggerStartMode
    let passiveEvalEnabled: Bool
    let passiveEvalIntervalSeconds: Int
}

enum TriggerStartMode {
    case immediate
    case cooldown(minIntervalSeconds: Int)
    case confirmUI(title: String, startCta: String, dismissCta: String)
}

Backend Contract Alignment

Event Semantics

Same as Android:

EventPurpose
identityUser identification
screen_schemaScreen structure registration
component_inputUser input hints (masked)
validation_failedField validation errors
error_reportedGeneric errors

Payload Fields

Same field semantics:

  • session_id — unique per app session
  • user_id — stable user identifier
  • screen / screen_id — current screen
  • component_id / component_type — UI component context
  • hint + masked — redacted input hints
  • traceparent, trace_id, request_id — correlation

HTTP Headers

Required headers on all SDK requests:

X-API-Key: your-api-key
X-KYCIS-SDK-Version: 1.0.0
X-Client-ID: your_client_id
Content-Type: application/json

Voice Configuration

LiveKit Integration

Same flow as Android:

  1. Get token/room from POST /v1/assistant/session/start
  2. Connect to LiveKit room
  3. Publish microphone track
  4. Listen for agent

Audio Session Configuration

let audioSession = AVAudioSession.sharedInstance()
try audioSession.setCategory(.playAndRecord, mode: .voiceChat)
try audioSession.setActive(true)

Remote Config

Same endpoint and behavior:

GET /v1/sdk/config
Headers:
  X-KYCIS-SDK-Version: 1.0.0
  X-Client-ID: your_client_id

Refresh periodically during active sessions.

Debug Configuration

For development:

#if DEBUG
let policy = RuntimePolicy(
    backendBaseUrl: "http://localhost:8000/v1",
    // ... other settings
)
#else
let policy = RuntimePolicy(
    backendBaseUrl: "https://kycis.zynnex.in/v1",
    // ... other settings
)
#endif

Security

  • Store API keys in Keychain, not plist
  • Use certificate pinning for production
  • Obfuscate SDK internals if needed

On this page