feat(native): share a booking document to TREK and import it into a trip

TREK now appears under "Open in" and in the share sheet for PDFs, calendar
entries, Wallet passes and mails (iOS document types, Android VIEW and SEND
filters). The native side reads the file (up to 15 MB) and hands it to the UI,
which asks which trip it belongs to, upcoming trips first, then opens that
trip's booking import with the file already chosen.
This commit is contained in:
Maurice
2026-11-06 13:28:00 +01:00
parent 56f9a92054
commit 825469a7f2
45 changed files with 521 additions and 3 deletions
+3
View File
@@ -9,6 +9,7 @@ import { installNativeGeolocation } from './geolocation';
import { keepOfflineShellFresh } from './offlineShell';
import { isNativeApp, isNativeIos } from './platform';
import { reportNativeFailure } from './reportFailure';
import { startSharedFiles } from './sharedFiles';
import { isUnimplemented } from './trekShell';
/** Long enough that the warm-up never competes with the first screen's requests. */
@@ -27,6 +28,8 @@ export function startNativeApp(): void {
void checkAppUpdate(fetchServerFeatures);
// The app's own location under navigator.geolocation, where the binary has it.
void loadNativeCapabilities().then(() => installNativeGeolocation());
// Booking documents shared to TREK, waiting for a trip to import into.
void startSharedFiles();
// A tap on the status bar scrolls the list under it back to the top, as in
// every iOS app (the status-bar plugin fires statusTap on iOS).