mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-13 15:51:00 +00:00
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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user