Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/zig/src/bridge_mobile_display.zig
Original file line number Diff line number Diff line change
Expand Up @@ -600,9 +600,10 @@ fn applyBadge(count: i64) !i64 {
/// what happened rather than swallowing it.
///
/// The completion handler is `nullable` in the header, so nil is legal and no
/// block is needed. Note that `requestAuthorizationWithOptions:`, which Swift
/// also calls, is *not* nullable there — passing nil to that one crashes, which
/// is part of why authorization is not attempted here.
/// block is needed. `requestAuthorizationWithOptions:`, which the spec also
/// calls, is *not* nullable there — passing nil to that one crashes, which is
/// why it needs a real block. It has one now: `requestBadgeAuthorization`
/// above asks before this writes, so this function no longer runs unasked.
fn setBadgeThroughNotificationCenter(count: c_long) bool {
const UNCenterClass = objc.objc_getClass("UNUserNotificationCenter") orelse return false;
const sel_current = objc.sel_registerName("currentNotificationCenter") orelse return false;
Expand Down
16 changes: 10 additions & 6 deletions packages/zig/src/bridge_mobile_permissions.zig
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@
//! those took actions *away* from the shim because the shim's answers were
//! fabricated or broken; these shim answers are real, and taking them away
//! would trade working behaviour for a tidier table. The cost is that the
//! conformance ratchet keeps counting `openSettings` as not-yet-migrated —
//! which is the truth.
//! conformance ratchet keeps counting the payload values above — location,
//! photos, contacts, calendar, reminders — against `requestPermission`, which
//! is the truth. It no longer applies to `openSettings`: that one is claimed,
//! and the ratchet counts it as migrated.
//!
//! ## What is carried across exactly
//!
Expand Down Expand Up @@ -123,10 +125,12 @@ const Id = ?*anyopaque;

/// The action names, spelled exactly as the Swift `case` labels spell them.
///
/// `openSettings` is deliberately absent — see the module comment. Adding it
/// here without first giving `ios_async` a boolean-literal reply would ship
/// the truthy-`"denied"` bug, and the conformance scan would count the action
/// as migrated while the shim was still the only honest server of it.
/// All three are claimed. `openSettings` was not, and this comment said so
/// long after it stopped being true — the module comment above records both
/// the original objection and why a module-owned global block answered it.
/// A doc comment that contradicts the `A` block three lines below it is worse
/// than none: `scheduleNotification` sat with the shim for days after its
/// blocker was fixed because nobody re-read the note that described it.
pub const A = struct {
pub const check_permission = "checkPermission";
pub const request_permission = "requestPermission";
Expand Down
Loading