參考
設定選項
建立 LapidClient 時傳入設定物件:iOS LapidConfiguration、Android LapidConfig、Web LapidClientOptions。只有 appKey、baseURL、驗證方式必填。
從設定檔建立
設定方式見 設定 appKey。
已棄用
releaseCheckInterval 的預設在 2026-11-04 由 300 秒改為 60 秒。
參考
建立 LapidClient 時傳入設定物件:iOS LapidConfiguration、Android LapidConfig、Web LapidClientOptions。只有 appKey、baseURL、驗證方式必填。
用途 | iOS LapidConfiguration | Android LapidConfig | Web LapidClientOptions | 預設 |
|---|---|---|---|---|
App 識別 | appKey | appKey | 無 | 必填 |
API 位址(不含 /v1) | baseURL | baseUrl | baseUrl | 必填 |
裝置驗證 | attestation(AppAttestProvider、DebugAttestationProvider) | attestation(PlayIntegrityProvider、DebugAttestationProvider) | 無 | 必填 |
token 來源 | 由 SDK 處理 | 由 SDK 處理 | tokenSource(getToken,選填 invalidate) | Web 必填 |
磁碟快取上限 | cacheLimitBytes | cacheMaxBytes | 無 | 50 MB |
快取目錄 | cacheDirectory | 固定 cacheDir/lapid | 無 | Caches/LapidSDK |
新版檢查間隔 | releaseCheckInterval | releaseCheckInterval | 無 | 60 秒 |
併發請求上限 | maxConcurrentRequests | 無 | 無 | 4 |
404 重試間隔 | notFoundRetryDelay | 固定 | 無 | 2 秒 |
使用 Secure Enclave | allowSecureEnclave | 無(優先 StrongBox) | 無 | true |
金鑰儲存 | secretStore | deviceKey | 無 | Keychain、Keystore |
網路層 | session(URLSession) | transport | fetch | 系統預設 |
驗證分塊雜湊 | 一律驗證 | 一律驗證 | verifyHashes | true |
逾時 | 請求 20 秒 | 連線 10 秒、讀取 20 秒 | timeoutMs | Web 無逾時 |
平台 | 方法 | 讀取來源 |
|---|---|---|
iOS | LapidConfiguration.fromInfoPlist(...) | Info.plist 的 LapidAppKey |
Android | LapidConfig.fromManifest(...) | manifest meta-data com.rytass.lapid.APP_KEY |
設定方式見 設定 appKey。
舊名稱 | 改用 |
|---|---|
iOS revocationCheckInterval | releaseCheckInterval |
Android startRevocationWatch | startReleaseWatch |
releaseCheckInterval 的預設在 2026-11-04 由 300 秒改為 60 秒。