mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-20 02:56:10 +00:00
feat(native): files open in the system viewer instead of the share sheet
A PDF, image or document opened in the app went straight to the share sheet. It now opens in Quick Look on iOS, to page through and zoom with its own share button, and in the app that views its type on Android. An app without the viewer (feature filePreview), or a type nothing on the device shows, gets the share sheet as before.
This commit is contained in:
@@ -103,6 +103,16 @@ export interface TrekShellPlugin {
|
||||
storeFinish(options: { transactionId: string }): Promise<void>;
|
||||
/** iOS, feature wallet: adds a .pkpass (base64) to Apple Wallet, or opens it there when it is already in. */
|
||||
addToWallet(options: { data: string }): Promise<{ result: 'added' | 'opened' | 'cancelled' }>;
|
||||
/**
|
||||
* Shows a file written to the app's cache (a file:// path) in the system's
|
||||
* viewer: Quick Look on iOS, the app that views the type on Android. Feature
|
||||
* "filePreview"; "unsupported" where nothing on the device shows the type.
|
||||
*/
|
||||
previewFile(options: {
|
||||
path: string;
|
||||
mimeType: string;
|
||||
title?: string;
|
||||
}): Promise<{ result: 'shown' | 'unsupported' }>;
|
||||
/** iOS, feature storeKit: the newest active subscription under `prefix` on this Apple ID, if any. */
|
||||
storeRestore(options: { prefix: string }): Promise<{ jws?: string; transactionId?: string }>;
|
||||
/** Feature watch: what the Apple Watch app shows (native/watch.ts), as JSON, sent on through WatchConnectivity. */
|
||||
|
||||
Reference in New Issue
Block a user