also looking at this
fix(ios): hand the page the answers native was already sending
#222
18 files
+597
-164
| @@ -127,7 +127,14 @@ export function useHaptic() { | ||
| 127 | 127 | console.warn('Craft not ready'); |
| 128 | 128 | return; |
| 129 | 129 | } |
| 130 | await craft.haptic(type); | |
| 130 | try { | |
| 131 | await craft.haptic(type); | |
| 132 | } | |
| 133 | catch (error) { | |
| 134 | // Feedback: an app built with haptics off plays nothing, the same as | |
| 135 | // Craft not being ready. Any other failure still reaches the caller. | |
| 136 | if ((error as { code?: string } | null)?.code !== 'CAPABILITY_DISABLED') throw error; | |
| 137 | } | |
| 131 | 138 | }, |
| 132 | 139 | [craft, isReady] |
| 133 | 140 | ); |