ReviewOS

also looking at this

craft-native/craft

feat(ios): haptic, whose reason expired when ios_config landed

#134
Merged glennmichael123 wants to merge fix/sdk-event-map into main
18 files +562 -163
packages/zig/src/bridge_mobile_contactpicker.zigmodified+14-6
Changes to packages/zig/src/bridge_mobile_contactpicker.zig
@@ -83,12 +83,20 @@
8383//! Until then, "the native call failed" is what a cancel says, and saying so
8484//! here is the point.
8585//!
86//! **`config.enableContacts` has no Zig mirror.** `ios.zig`'s `AppConfig` has
87//! no such field — the same gap `bridge_mobile_system.zig` records for
88//! `enableShare`. The Info.plist is read instead, and for this flag the mapping
89//! is exact: `packages/ios/src/index.ts:189` writes `NSContactsUsageDescription`
90//! if and only if `config.enableContacts`, with none of the sharing that made
91//! the location keys ambiguous.
86//! **`config.enableContacts` is read directly now, and the plist proxy below
87//! is what is left over.** `ios_config.gateFor` maps this action to
88//! `.contacts`, so `ios_dispatch.offerToModules` answers `CAPABILITY_DISABLED`
89//! before this module is asked. The paragraph here used to say the flag had no
90//! Zig mirror, which was true until `ios_config.zig` read
91//! `craft.config.json`.
92//!
93//! The `NSContactsUsageDescription` check further down was the stand-in for
94//! that flag — `packages/ios/src/index.ts:189` writes the key if and only if
95//! `config.enableContacts`, with none of the sharing that made the location
96//! keys ambiguous. It is now a second, weaker gate behind the real one, and it
97//! can only differ in the direction that refuses an action the config allows:
98//! an app whose Info.plist was not written by the SDK. Tracked in issue #131
99//! along with three more of the same shape.
92100//!
93101//! Two things about that gate have to be said plainly. First, the key is **not
94102//! a precondition of the API**: `CNContactPickerViewController` runs out of