Skip to content

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

Add deploy to phone task (#771)

Leendert de Borst098cf162fd28
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 2ac634ecf..688c863e6 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -113,7 +113,7 @@
}
},
{
- "label": "Run iOS App",
+ "label": "Run debug iOS App (simulator)",
"type": "shell",
"command": "npx",
"args": ["expo", "run:ios"],
@@ -126,6 +126,34 @@
"cwd": "${workspaceFolder}/mobile-app"
}
},
+ {
+ "label": "Run debug iOS App (device)",
+ "type": "shell",
+ "command": "npx",
+ "args": ["expo", "run:ios", "--device"],
+ "problemMatcher": [],
+ "group": {
+ "kind": "build",
+ "isDefault": true
+ },
+ "options": {
+ "cwd": "${workspaceFolder}/mobile-app"
+ }
+ },
+ {
+ "label": "Run release iOS App (device)",
+ "type": "shell",
+ "command": "npx",
+ "args": ["expo", "run:ios", "--device", "--configuration", "Release"],
+ "problemMatcher": [],
+ "group": {
+ "kind": "build",
+ "isDefault": true
+ },
+ "options": {
+ "cwd": "${workspaceFolder}/mobile-app"
+ }
+ },
{
"label": "Run Android App",
"type": "shell",
@@ -139,6 +167,6 @@
"options": {
"cwd": "${workspaceFolder}/mobile-app"
}
- }
+ },
]
}
diff --git a/mobile-app/utils/SqliteClient.tsx b/mobile-app/utils/SqliteClient.tsx
index a07304a46..681a99844 100644
--- a/mobile-app/utils/SqliteClient.tsx
+++ b/mobile-app/utils/SqliteClient.tsx
@@ -31,8 +31,15 @@ class SqliteClient {
*/
public async initializeFromBase64(base64String: string): Promise<void> {
try {
+ // Ensure SQLite directory exists
+ const sqliteDir = `${FileSystem.documentDirectory}SQLite`;
+ const dirInfo = await FileSystem.getInfoAsync(sqliteDir);
+ if (!dirInfo.exists) {
+ await FileSystem.makeDirectoryAsync(sqliteDir, { intermediates: true });
+ }
+
// For in-memory database, we need to create a temporary file first
- const tempFileUri = `${FileSystem.documentDirectory}SQLite/temp.db`;
+ const tempFileUri = `${sqliteDir}/temp.db`;
console.log('Writing database to temporary file');
await FileSystem.writeAsStringAsync(tempFileUri, base64String, {
encoding: FileSystem.EncodingType.Base64,