Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Add mobile app review prompt implementation

Leendert de Borste7cfbf11ec05
diff --git a/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/nativevaultmanager/NativeVaultManager.kt b/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/nativevaultmanager/NativeVaultManager.kt
index 61ce58e79..f86c8b062 100644
--- a/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/nativevaultmanager/NativeVaultManager.kt
+++ b/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/nativevaultmanager/NativeVaultManager.kt
@@ -1630,6 +1630,45 @@ class NativeVaultManager(reactContext: ReactApplicationContext) :
}
}
+ /**
+ * Check whether this platform can ask the user for a store review. Not yet implemented for Android.
+ * TODO: implement for Google Play installs.
+ *
+ * @param promise The promise to resolve with boolean result
+ */
+ @ReactMethod
+ override fun isAppReviewAvailable(promise: Promise) {
+ promise.resolve(false)
+ }
+
+ /**
+ * Start the native review flow.
+ * TODO: implement for Google Play installs.
+ * @param promise The promise to resolve with whether a review flow was started
+ */
+ @ReactMethod
+ override fun requestAppReview(promise: Promise) {
+ promise.resolve(false)
+ }
+
+ /**
+ * Get the date this app was installed.
+ * @param promise The promise to resolve with the install date in milliseconds since epoch,
+ * or 0 when it cannot be determined
+ */
+ @ReactMethod
+ override fun getAppInstallDate(promise: Promise) {
+ try {
+ val packageInfo = reactApplicationContext.packageManager
+ .getPackageInfo(reactApplicationContext.packageName, 0)
+
+ promise.resolve(packageInfo.firstInstallTime.toDouble())
+ } catch (e: Exception) {
+ Log.e(TAG, "Error resolving app install date", e)
+ promise.resolve(0.0)
+ }
+ }
+
@ReactMethod
override fun authenticateUser(
title: String?,
diff --git a/apps/mobile-app/app/(tabs)/items/index.tsx b/apps/mobile-app/app/(tabs)/items/index.tsx
index fa14d15fa..dceae57bf 100644
--- a/apps/mobile-app/app/(tabs)/items/index.tsx
+++ b/apps/mobile-app/app/(tabs)/items/index.tsx
@@ -15,6 +15,7 @@ import { HapticsUtility } from '@/utils/HapticsUtility';
import { applyTypeFilter, isItemTypeFilter, type ItemFilterType } from '@/utils/ItemFilters';
import { VaultAuthenticationError } from '@/utils/types/errors/VaultAuthenticationError';
+import { useAppReviewPrompt } from '@/hooks/useAppReviewPrompt';
import { useColors } from '@/hooks/useColorScheme';
import { useMinDurationLoading } from '@/hooks/useMinDurationLoading';
import { useNavigationDebounce } from '@/hooks/useNavigationDebounce';
@@ -76,6 +77,7 @@ export default function ItemsScreen(): React.ReactNode {
const [itemsList, setItemsList] = useState<Item[]>([]);
const [folders, setFolders] = useState<Folder[]>([]);
const [isLoadingItems, setIsLoadingItems] = useMinDurationLoading(false, 200);
+ const [hasLoadedItems, setHasLoadedItems] = useState(false);
const [refreshing, setRefreshing] = useMinDurationLoading(false, 200);
const { executeVaultMutation } = useVaultMutate();
const [showFolderModal, setShowFolderModal] = useState(false);
@@ -107,6 +109,9 @@ export default function ItemsScreen(): React.ReactNode {
const authContext = useApp();
const dbContext = useDb();
+ // Prompt for a store review when the app has been installed and used long enough and supported by the current platform.
+ useAppReviewPrompt(hasLoadedItems);
+
const isAuthenticated = authContext.isLoggedIn;
const isDatabaseAvailable = dbContext.dbAvailable;
@@ -316,6 +321,7 @@ export default function ItemsScreen(): React.ReactNode {
setRecentlyDeletedCount(deletedCount);
setSortOrder(savedSortOrder);
setIsLoadingItems(false);
+ setHasLoadedItems(true);
} catch (err) {
console.error('Error loading items:', err);
const errorMessage = err instanceof Error ? err.message : String(err);
diff --git a/apps/mobile-app/app/(tabs)/settings/developer-tools.tsx b/apps/mobile-app/app/(tabs)/settings/developer-tools.tsx
index 5d05a0b7d..a3090b02f 100644
--- a/apps/mobile-app/app/(tabs)/settings/developer-tools.tsx
+++ b/apps/mobile-app/app/(tabs)/settings/developer-tools.tsx
@@ -1,17 +1,17 @@
import { Ionicons } from '@expo/vector-icons';
-import { router, useFocusEffect } from 'expo-router';
-import { useCallback, useState } from 'react';
+import { router } from 'expo-router';
+import { useCallback } from 'react';
import { StyleSheet, View } from 'react-native';
import Toast from 'react-native-toast-message';
+import { useAppReviewDebug } from '@/hooks/useAppReviewPrompt';
import { useColors } from '@/hooks/useColorScheme';
+import { useDeveloperToolsUnlock } from '@/hooks/useDeveloperToolsUnlock';
import { ThemedButton } from '@/components/themed/ThemedButton';
import { ThemedContainer } from '@/components/themed/ThemedContainer';
import { ThemedScrollView } from '@/components/themed/ThemedScrollView';
import { ThemedText } from '@/components/themed/ThemedText';
-import { AppReviewService, type AppReviewState } from '@/services/AppReviewService';
-import { DeveloperToolsService } from '@/services/DeveloperToolsService';
/**
* Row in one of the state readouts below.
@@ -27,31 +27,21 @@ type StateRow = {
*/
export default function DeveloperToolsScreen(): React.ReactNode {
const colors = useColors();
- const [reviewState, setReviewState] = useState<AppReviewState | null>(null);
-
- const loadReviewState = useCallback(async (): Promise<void> => {
- setReviewState(await AppReviewService.getState());
- }, []);
-
- useFocusEffect(
- useCallback(() => {
- loadReviewState();
- }, [loadReviewState])
- );
+ const { state: reviewState, reset: resetReviewState, requestNow: requestReviewNow } = useAppReviewDebug();
+ const { hide: hideDeveloperTools } = useDeveloperToolsUnlock();
/**
* Ask the OS for its review prompt right now, skipping every condition.
*/
const handleRequestReview = useCallback(async (): Promise<void> => {
- const requested = await AppReviewService.requestReviewNow();
- }, []);
+ await requestReviewNow();
+ }, [requestReviewNow]);
/**
* Forget the recorded uses and asks, as if the app was freshly installed.
*/
const handleResetReviewState = useCallback(async (): Promise<void> => {
- await AppReviewService.reset();
- await loadReviewState();
+ await resetReviewState();
Toast.show({
type: 'success',
@@ -59,16 +49,16 @@ export default function DeveloperToolsScreen(): React.ReactNode {
position: 'bottom',
visibilityTime: 2000,
});
- }, [loadReviewState]);
+ }, [resetReviewState]);
/**
* Hide the developer tools again, which also puts the unlock gesture back at the start. Useful
* to get the app into a clean state for app store screenshots.
*/
const handleHideDeveloperTools = useCallback(async (): Promise<void> => {
- await DeveloperToolsService.setEnabled(false);
+ await hideDeveloperTools();
router.back();
- }, []);
+ }, [hideDeveloperTools]);
const reviewRows: StateRow[] = reviewState ? [
{
diff --git a/apps/mobile-app/hooks/useAppReviewPrompt.ts b/apps/mobile-app/hooks/useAppReviewPrompt.ts
new file mode 100644
index 000000000..b0ae5a9da
--- /dev/null
+++ b/apps/mobile-app/hooks/useAppReviewPrompt.ts
@@ -0,0 +1,241 @@
+import AsyncStorage from '@react-native-async-storage/async-storage';
+import { useCallback, useEffect, useState } from 'react';
+import { AppState } from 'react-native';
+
+import { AppInfo } from '@/utils/AppInfo';
+
+import NativeVaultManager from '@/specs/NativeVaultManager';
+
+/**
+ * Storage keys for the app review prompt state.
+ */
+const KEYS = {
+ USE_COUNT: 'app_review_use_count',
+ FIRST_SEEN_AT: 'app_review_first_seen_at',
+ LAST_PROMPT_AT: 'app_review_last_prompt_at',
+ LAST_PROMPT_VERSION: 'app_review_last_prompt_version',
+} as const;
+
+const DAY_MS = 24 * 60 * 60 * 1000;
+
+/**
+ * How long the app must have been installed before the user is asked anything.
+ */
+const MIN_DAYS_INSTALLED = 7;
+
+/**
+ * How many times the vault must have been opened and loaded successfully before asking.
+ */
+const MIN_USE_COUNT = 15;
+
+/**
+ * Minimum time between two asks.
+ */
+const MIN_DAYS_BETWEEN_PROMPTS = 120;
+
+/**
+ * How long to wait after the vault is ready.
+ */
+const PROMPT_DELAY_MS = 2500;
+
+/**
+ * Guards against counting or asking twice within a single app launch.
+ */
+let countedThisLaunch = false;
+let promptedThisLaunch = false;
+
+/**
+ * Read a stored number, treating a missing or corrupt value as 0.
+ */
+async function readNumber(key: string): Promise<number> {
+ const value = await AsyncStorage.getItem(key);
+ const parsed = value ? parseInt(value, 10) : 0;
+ return Number.isFinite(parsed) ? parsed : 0;
+}
+
+/**
+ * Get the install date, falling back to the first time this ran when the platform cannot report it.
+ */
+async function getInstallDate(): Promise<number> {
+ const installDate = await NativeVaultManager.getAppInstallDate();
+ if (installDate > 0) {
+ return installDate;
+ }
+
+ const firstSeenAt = await readNumber(KEYS.FIRST_SEEN_AT);
+ if (firstSeenAt > 0) {
+ return firstSeenAt;
+ }
+
+ const now = Date.now();
+ await AsyncStorage.setItem(KEYS.FIRST_SEEN_AT, now.toString());
+ return now;
+}
+
+/**
+ * Whether all conditions for asking are met.
+ */
+async function shouldRequestReview(): Promise<boolean> {
+ const [useCount, lastPromptAt, lastPromptVersion] = await Promise.all([
+ readNumber(KEYS.USE_COUNT),
+ readNumber(KEYS.LAST_PROMPT_AT),
+ AsyncStorage.getItem(KEYS.LAST_PROMPT_VERSION),
+ ]);
+
+ if (useCount < MIN_USE_COUNT) {
+ return false;
+ }
+
+ if (lastPromptVersion === AppInfo.VERSION) {
+ return false;
+ }
+
+ if (lastPromptAt > 0 && Date.now() - lastPromptAt < MIN_DAYS_BETWEEN_PROMPTS * DAY_MS) {
+ return false;
+ }
+
+ return Date.now() - await getInstallDate() >= MIN_DAYS_INSTALLED * DAY_MS;
+}
+
+/**
+ * Count one successful use of the app, once per launch.
+ */
+async function recordSuccessfulUse(): Promise<void> {
+ if (countedThisLaunch) {
+ return;
+ }
+ countedThisLaunch = true;
+
+ try {
+ const useCount = await readNumber(KEYS.USE_COUNT);
+ await AsyncStorage.setItem(KEYS.USE_COUNT, (useCount + 1).toString());
+ } catch (error) {
+ console.error('Failed to record successful use for review prompt:', error);
+ }
+}
+
+/**
+ * Ask the OS to show its review prompt if all conditions are met, otherwise do nothing. Returns whether the OS accepted the request.
+ */
+async function maybeRequestReview(): Promise<void> {
+ try {
+ if (promptedThisLaunch || !await NativeVaultManager.isAppReviewAvailable()) {
+ return;
+ }
+
+ if (!await shouldRequestReview()) {
+ return;
+ }
+
+ promptedThisLaunch = true;
+
+ if (await NativeVaultManager.requestAppReview()) {
+ await AsyncStorage.multiSet([
+ [KEYS.LAST_PROMPT_AT, Date.now().toString()],
+ [KEYS.LAST_PROMPT_VERSION, AppInfo.VERSION],
+ ]);
+ }
+ } catch (error) {
+ console.error('Failed to request app review:', error);
+ }
+}
+
+/**
+ * Count a successful use of the app and, when it has been used enough, ask the OS to show its review prompt.
+ * @param isReady - Whether the vault is unlocked and the screen has finished loading its data
+ */
+export function useAppReviewPrompt(isReady: boolean): void {
+ useEffect(() => {
+ if (!isReady) {
+ return;
+ }
+
+ let cancelled = false;
+
+ recordSuccessfulUse();
+
+ const timer = setTimeout(async () => {
+ // Do not interrupt anything the user moved on to, or ask while the app is in the background.
+ if (cancelled || AppState.currentState !== 'active') {
+ return;
+ }
+
+ await maybeRequestReview();
+ }, PROMPT_DELAY_MS);
+
+ return (): void => {
+ cancelled = true;
+ clearTimeout(timer);
+ };
+ }, [isReady]);
+}
+
+/**
+ * A snapshot of everything the decision is based on.
+ */
+export type AppReviewState = {
+ isAvailable: boolean;
+ daysInstalled: number;
+ minDaysInstalled: number;
+ useCount: number;
+ minUseCount: number;
+ daysSinceLastPrompt: number | null;
+ minDaysBetweenPrompts: number;
+ lastPromptVersion: string | null;
+ currentVersion: string;
+ meetsCriteria: boolean;
+};
+
+type AppReviewDebug = {
+ state: AppReviewState | null;
+ reset: () => Promise<void>;
+ requestNow: () => Promise<boolean>;
+};
+
+/**
+ * Hook that exposes the review state and its manual triggers for debugging purposes.
+ */
+export function useAppReviewDebug(): AppReviewDebug {
+ const [state, setState] = useState<AppReviewState | null>(null);
+
+ const reload = useCallback(async (): Promise<void> => {
+ const [isAvailable, useCount, lastPromptAt, lastPromptVersion, installDate, meetsCriteria] = await Promise.all([
+ NativeVaultManager.isAppReviewAvailable(),
+ readNumber(KEYS.USE_COUNT),
+ readNumber(KEYS.LAST_PROMPT_AT),
+ AsyncStorage.getItem(KEYS.LAST_PROMPT_VERSION),
+ getInstallDate(),
+ shouldRequestReview(),
+ ]);
+
+ setState({
+ isAvailable,
+ daysInstalled: Math.floor((Date.now() - installDate) / DAY_MS),
+ minDaysInstalled: MIN_DAYS_INSTALLED,
+ useCount,
+ minUseCount: MIN_USE_COUNT,
+ daysSinceLastPrompt: lastPromptAt > 0 ? Math.floor((Date.now() - lastPromptAt) / DAY_MS) : null,
+ minDaysBetweenPrompts: MIN_DAYS_BETWEEN_PROMPTS,
+ lastPromptVersion,
+ currentVersion: AppInfo.VERSION,
+ meetsCriteria,
+ });
+ }, []);
+
+ useEffect(() => {
+ reload();
+ }, [reload]);
+
+ const reset = useCallback(async (): Promise<void> => {
+ countedThisLaunch = false;
+ promptedThisLaunch = false;
+ await AsyncStorage.multiRemove(Object.values(KEYS));
+ await reload();
+ }, [reload]);
+
+ const requestNow = useCallback((): Promise<boolean> => {
+ return NativeVaultManager.requestAppReview();
+ }, []);
+
+ return { state, reset, requestNow };
+}
diff --git a/apps/mobile-app/hooks/useDeveloperToolsUnlock.ts b/apps/mobile-app/hooks/useDeveloperToolsUnlock.ts
index 19f4c1539..ff8520c50 100644
--- a/apps/mobile-app/hooks/useDeveloperToolsUnlock.ts
+++ b/apps/mobile-app/hooks/useDeveloperToolsUnlock.ts
@@ -1,7 +1,12 @@
+import AsyncStorage from '@react-native-async-storage/async-storage';
import { useCallback, useEffect, useRef, useState } from 'react';
import Toast from 'react-native-toast-message';
-import { DeveloperToolsService } from '@/services/DeveloperToolsService';
+/**
+ * Storage key for the developer tools toggle. Kept out of LocalPreferencesService on purpose:
+ * that service holds account preferences that are wiped on logout, while this is a device setting.
+ */
+const STORAGE_KEY = 'developer_tools_enabled';
/**
* Taps needed on the settings logo or version footer to reveal the developer tools.
@@ -13,10 +18,34 @@ const REQUIRED_TAPS = 20;
*/
const TAP_TIMEOUT_MS = 3000;
+/**
+ * Read whether the developer tools have been unlocked on this device.
+ */
+async function readEnabled(): Promise<boolean> {
+ try {
+ return await AsyncStorage.getItem(STORAGE_KEY) === 'true';
+ } catch (error) {
+ console.error('Failed to read developer tools state:', error);
+ return false;
+ }
+}
+
+/**
+ * Store whether the developer tools are unlocked.
+ */
+async function writeEnabled(enabled: boolean): Promise<void> {
+ try {
+ await AsyncStorage.setItem(STORAGE_KEY, enabled.toString());
+ } catch (error) {
+ console.error('Failed to store developer tools state:', error);
+ }
+}
+
type DeveloperToolsUnlock = {
isEnabled: boolean;
registerTap: () => void;
refresh: () => void;
+ hide: () => Promise<void>;
};
/**
@@ -28,7 +57,7 @@ export function useDeveloperToolsUnlock(): DeveloperToolsUnlock {
const resetTimer = useRef<ReturnType<typeof setTimeout> | null>(null);
const refresh = useCallback((): void => {
- DeveloperToolsService.isEnabled().then(setIsEnabled);
+ readEnabled().then(setIsEnabled);
}, []);
useEffect(() => {
@@ -62,7 +91,7 @@ export function useDeveloperToolsUnlock(): DeveloperToolsUnlock {
tapCount.current = 0;
- DeveloperToolsService.setEnabled(true).then(() => {
+ writeEnabled(true).then(() => {
setIsEnabled(true);
Toast.show({
type: 'success',
@@ -73,5 +102,14 @@ export function useDeveloperToolsUnlock(): DeveloperToolsUnlock {
});
}, [isEnabled]);
- return { isEnabled, registerTap, refresh };
+ /**
+ * Hide the developer tools again, putting the unlock gesture back at the start.
+ */
+ const hide = useCallback(async (): Promise<void> => {
+ tapCount.current = 0;
+ await writeEnabled(false);
+ setIsEnabled(false);
+ }, []);
+
+ return { isEnabled, registerTap, refresh, hide };
}
diff --git a/apps/mobile-app/ios/NativeVaultManager/RCTNativeVaultManager.mm b/apps/mobile-app/ios/NativeVaultManager/RCTNativeVaultManager.mm
index 9a9e284f5..b9593a059 100644
--- a/apps/mobile-app/ios/NativeVaultManager/RCTNativeVaultManager.mm
+++ b/apps/mobile-app/ios/NativeVaultManager/RCTNativeVaultManager.mm
@@ -339,6 +339,20 @@
[vaultManager scanQRCode:prefixes statusText:statusText resolver:resolve rejecter:reject];
}
+// MARK: - App Store Review
+
+- (void)isAppReviewAvailable:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
+ [vaultManager isAppReviewAvailable:resolve rejecter:reject];
+}
+
+- (void)requestAppReview:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
+ [vaultManager requestAppReview:resolve rejecter:reject];
+}
+
+- (void)getAppInstallDate:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
+ [vaultManager getAppInstallDate:resolve rejecter:reject];
+}
+
// MARK: - Favicon
- (void)selectFaviconTarget:(NSArray<NSString *> *)urls resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
diff --git a/apps/mobile-app/ios/NativeVaultManager/VaultManager.swift b/apps/mobile-app/ios/NativeVaultManager/VaultManager.swift
index 6b10f08aa..903b49acb 100644
--- a/apps/mobile-app/ios/NativeVaultManager/VaultManager.swift
+++ b/apps/mobile-app/ios/NativeVaultManager/VaultManager.swift
@@ -9,6 +9,7 @@ import VaultUtils
import AVFoundation
import RustCoreFramework
import AuthenticationServices
+import StoreKit
/**
* This class is used as a bridge to allow React Native to interact with the VaultStoreKit class.
@@ -1068,6 +1069,50 @@ public class VaultManager: NSObject {
}
}
+ /**
+ * Whether this platform can ask the user for a store review. For iOS this is always true.
+ */
+ @objc
+ func isAppReviewAvailable(_ resolve: @escaping RCTPromiseResolveBlock,
+ rejecter reject: @escaping RCTPromiseRejectBlock) {
+ resolve(true)
+ }
+
+ /**
+ * Show Apple's native rating overlay. Returns whether the OS accepted the request.
+ */
+ @objc
+ func requestAppReview(_ resolve: @escaping RCTPromiseResolveBlock,
+ rejecter reject: @escaping RCTPromiseRejectBlock) {
+ DispatchQueue.main.async {
+ guard let scene = UIApplication.shared.connectedScenes
+ .compactMap({ $0 as? UIWindowScene })
+ .first(where: { $0.activationState == .foregroundActive }) else {
+ resolve(false)
+ return
+ }
+
+ AppStore.requestReview(in: scene)
+ resolve(true)
+ }
+ }
+
+ /**
+ * Get the date this app was installed by looking at the creation date of the app's documents directory.
+ */
+ @objc
+ func getAppInstallDate(_ resolve: @escaping RCTPromiseResolveBlock,
+ rejecter reject: @escaping RCTPromiseRejectBlock) {
+ guard let documentsUrl = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first,
+ let attributes = try? FileManager.default.attributesOfItem(atPath: documentsUrl.path),
+ let creationDate = attributes[.creationDate] as? Date else {
+ resolve(0)
+ return
+ }
+
+ resolve(creationDate.timeIntervalSince1970 * 1000)
+ }
+
@objc
func authenticateUser(_ title: String?,
subtitle: String?,
@@ -1302,11 +1347,6 @@ public class VaultManager: NSObject {
resolve(nil)
}
- // MARK: - Password Generator
-
- /// Generate a password or passphrase from a JSON-serialized PasswordSettings object.
- /// The "Type" field selects the generator ("basic" or "diceware").
- @objc
// MARK: - Favicon
/// Pick which of an item's URLs a favicon should be fetched from, and the Logos.Source
@@ -1329,6 +1369,11 @@ public class VaultManager: NSObject {
}
}
+ // MARK: - Password Generator
+
+ /// Generate a password or passphrase from a JSON-serialized PasswordSettings object.
+ /// The "Type" field selects the generator ("basic" or "diceware").
+ @objc
func generatePassword(_ settingsJson: String,
resolver resolve: @escaping RCTPromiseResolveBlock,
rejecter reject: @escaping RCTPromiseRejectBlock) {
diff --git a/apps/mobile-app/services/DeveloperToolsService.ts b/apps/mobile-app/services/DeveloperToolsService.ts
deleted file mode 100644
index 186ddc1f2..000000000
--- a/apps/mobile-app/services/DeveloperToolsService.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import AsyncStorage from '@react-native-async-storage/async-storage';
-
-/**
- * Storage key for the developer tools toggle.
- */
-const KEY = 'developer_tools_enabled';
-
-/**
- * Service that tracks whether the hidden developer tools screen is reachable.
- */
-export const DeveloperToolsService = {
- /**
- * Whether the developer tools should be shown in the settings list.
- */
- async isEnabled(): Promise<boolean> {
- try {
- return await AsyncStorage.getItem(KEY) === 'true';
- } catch (error) {
- console.error('Failed to read developer tools state:', error);
- return false;
- }
- },
-
- /**
- * Show or hide the developer tools.
- */
- async setEnabled(enabled: boolean): Promise<void> {
- try {
- await AsyncStorage.setItem(KEY, enabled.toString());
- } catch (error) {
- console.error('Failed to store developer tools state:', error);
- }
- },
-};
diff --git a/apps/mobile-app/specs/NativeVaultManager.ts b/apps/mobile-app/specs/NativeVaultManager.ts
index 4afb17917..3cfee71d7 100644
--- a/apps/mobile-app/specs/NativeVaultManager.ts
+++ b/apps/mobile-app/specs/NativeVaultManager.ts
@@ -141,6 +141,14 @@ export interface Spec extends TurboModule {
// statusText is the message to display on the scanner screen (defaults to "Scan QR code" if null/empty).
scanQRCode(prefixes: string[] | null, statusText: string | null): Promise<string | null>;
+ // App store review prompt
+ // Whether this platform can ask for a store review. Android is not implemented yet.
+ isAppReviewAvailable(): Promise<boolean>;
+ // Ask the OS to show its native review prompt.
+ requestAppReview(): Promise<boolean>;
+ // The install date as a unix timestamp in milliseconds, or 0 when it cannot be determined.
+ getAppInstallDate(): Promise<number>;
+
// Favicon URL handling and selection.
selectFaviconTarget(urls: string[]): Promise<string | null>;