mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-26 06:37:33 +00:00
feat(native): booking passes go straight into Apple Wallet
Opening a .pkpass in the iOS app brought up the generic share sheet. It now shows Wallet's own sheet with the pass and "Add", and a pass that is already in Wallet opens there instead of being offered twice (TrekShell.addToWallet, feature wallet). A broken pass or a device without Wallet falls back to the share sheet as before. Passes carry an "Apple Wallet" badge in the trip's files and a wallet icon where they hang on a booking, so it is clear what a tap does.
This commit is contained in:
@@ -81,6 +81,8 @@ export interface TrekShellPlugin {
|
||||
}): Promise<{ kind: 'bought' | 'cancelled' | 'pending' | 'failed'; jws?: string; transactionId?: string }>;
|
||||
/** iOS, feature storeKit: marks a purchase delivered once its instance exists. */
|
||||
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' }>;
|
||||
/** iOS, feature storeKit: the newest active subscription under `prefix` on this Apple ID, if any. */
|
||||
storeRestore(options: { prefix: string }): Promise<{ jws?: string; transactionId?: string }>;
|
||||
addListener(
|
||||
|
||||
Reference in New Issue
Block a user