also looking at this
fix(android): resolve share() with whether the person picked an app
#210
12 files
+399
-56
| @@ -118,11 +118,16 @@ export interface CraftBridge { | ||
| 118 | 118 | haptic(style: HapticStyle): void; |
| 119 | 119 | |
| 120 | 120 | /** |
| 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`). | |
| 122 | 127 | * @param text - Text to share |
| 123 | 128 | * @param title - Optional title |
| 124 | 129 | */ |
| 125 | share(text: string, title?: string): void; | |
| 130 | share(text: string, title?: string): Promise<boolean>; | |
| 126 | 131 | |
| 127 | 132 | /** |
| 128 | 133 | * Log message to native console (Xcode/Logcat) |