ReviewOS

also looking at this

craft-native/craft

fix(ios): hand the page the answers native was already sending

#222
Merged glennmichael123 wants to merge fix/ios-unanswered-posts into main
18 files +597 -164
packages/typescript/types/craft.d.tsmodified+16-4
Changes to packages/typescript/types/craft.d.ts
@@ -114,8 +114,11 @@ export interface CraftBridge {
114114 /**
115115 * Trigger haptic feedback
116116 * @param style - Feedback style: 'light', 'medium', 'heavy', 'success', 'warning', 'error', 'selection'
117 * @returns On iOS, a promise that resolves `true` once UIKit has taken the
118 * haptic, and rejects with `CAPABILITY_DISABLED` when `enableHaptics` is off.
119 * Android returns nothing yet (#219).
117120 */
118 haptic(style: HapticStyle): void;
121 haptic(style: HapticStyle): Promise<boolean> | void;
119122
120123 /**
121124 * Open the native share sheet.
@@ -189,13 +192,20 @@ export interface CraftBridge {
189192
190193 /**
191194 * Start speech recognition
195 * @returns On iOS, a promise that resolves `true` once native has taken the
196 * request, and rejects with `CAPABILITY_DISABLED` when
197 * `enableSpeechRecognition` is off. `true` does not mean audio is flowing:
198 * a declined prompt or a missing recognizer still arrives as
199 * `craftSpeechError`, and transcripts as `craftSpeechResult`. Android returns
200 * nothing yet (#219).
192201 */
193 startListening(): void;
202 startListening(): Promise<boolean> | void;
194203
195204 /**
196205 * Stop speech recognition
206 * @returns On iOS, a promise that resolves `true`. Android returns nothing yet (#219).
197207 */
198 stopListening(): void;
208 stopListening(): Promise<boolean> | void;
199209
200210 // ==================== Files ====================
201211
@@ -478,8 +488,10 @@ export interface CraftBridge {
478488 /**
479489 * Vibrate with pattern
480490 * @param pattern - Array of durations in ms [on, off, on, off, ...]
491 * @returns On iOS, a promise that resolves `true` once the pattern is
492 * scheduled. Android returns nothing yet (#219).
481493 */
482 vibrate(pattern: number[]): void;
494 vibrate(pattern: number[]): Promise<boolean> | void;
483495
484496 /**
485497 * Open URL in external browser