feat(native): an app lock with Face ID, Touch ID or the device passcode

A switch in the account settings, inside the app on a device that can unlock
that way (iOS LocalAuthentication, Android BiometricPrompt with the screen
lock as fallback). Turning it on asks once, so nobody locks themselves out.
With it on, TREK asks at launch and after half a minute in the background
before showing anything, and the app switcher shows a blurred cover (iOS) or
no snapshot (Android) instead of the screen. The setting stays on the
device, not the account.
This commit is contained in:
Maurice
2026-11-06 13:21:19 +01:00
parent dec6babe1d
commit 017f229cfc
42 changed files with 721 additions and 2 deletions
+6
View File
@@ -36,6 +36,12 @@ export interface TrekShellPlugin {
getTileCacheUsage(): Promise<{ bytes: number; limit: number }>;
/** iOS, feature tileCache: empties the map tile store. */
clearTileCache(): Promise<void>;
/** Feature biometricLock: which biometry the device offers for the app lock. */
biometryInfo(): Promise<{ available: boolean; type: string }>;
/** Feature biometricLock: Face ID, Touch ID or the passcode. Rejects with CANCELLED or FAILED. */
authenticateBiometric(options: { reason: string }): Promise<{ ok: true }>;
/** Feature biometricLock: a blurred cover in the app switcher while the lock is on. */
setPrivacyCover(options: { enabled: boolean }): Promise<void>;
}
export const TrekShell = registerPlugin<TrekShellPlugin>('TrekShell');