ReviewOS

also looking at this

craft-native/craft

fix(android): resolve share() with whether the person picked an app

#210
Merged glennmichael123 wants to merge fix/android-share-outcome into main
12 files +399 -56
packages/typescript/types/craft.d.tsmodified+7-2
Changes to packages/typescript/types/craft.d.ts
@@ -118,11 +118,16 @@ export interface CraftBridge {
118118 haptic(style: HapticStyle): void;
119119
120120 /**
121 * Open native share sheet
121 * Open the native share sheet.
122 *
123 * Resolves `true` when the person shares — finishes an activity on iOS,
124 * picks an app on Android — and `false` when they dismiss the sheet.
125 * Rejects when there is nothing to share, when the sheet cannot open, and on
126 * iOS when `enableShare` is off (`CAPABILITY_DISABLED`).
122127 * @param text - Text to share
123128 * @param title - Optional title
124129 */
125 share(text: string, title?: string): void;
130 share(text: string, title?: string): Promise<boolean>;
126131
127132 /**
128133 * Log message to native console (Xcode/Logcat)