Repository navigation
Description
Goal
While the iPhone app is in front, a notification for a delivery check the extension verified and answered is not presented as a banner and makes no sound. Every other notification, verified or not, is presented as today.
Context
- Give the iPhone app Requests, History and Macs tabs #346 (PR Give the iPhone app Requests, History and Macs tabs #358) presents every notification in front with banner, list and sound (Rework the iPhone approver experience #344, decision 8). Right after pairing, the Mac sends a delivery check, so the pairing's last screen gets a generic "a paired device sent a message" banner.
- Showing banners only for requests the extension verified was tried in Give the iPhone app Requests, History and Macs tabs #358 and reverted, because it would also silence a real request whose details the extension could not verify. This task narrows the exception to the one case that is known to be harmless: a delivery check the extension verified and answered (
NotificationProcessoroutcome.answeredDeliveryCheck). - The extension has no filtering entitlement (Spec: iPhone approver (multi-device stage 4) #308, decision 7), so a delivery check still shows its generic notification while the app is in the background. That stays as is.
Scope
May change:
iOS/AskKeyiOSNotificationService/Sources/(mark the content it delivers for.answeredDeliveryCheck, for example with a dedicated category identifier)iOS/AskKeyiOSKit/App/AskKeyAppDelegate.swift(userNotificationCenter(_:willPresent:): no banner or sound for that mark; list only, or nothing)- Tests for both targets
Must not change: how any other notification is presented, the extension's verification, the CloudKit subscription's notification info except as needed below.
Security
The app must be able to trust the mark. Only the extension sets it, and only after it verified and answered the delivery check. Content that reaches the app without passing through the extension, such as a timed-out extension where iOS shows the original payload, must never carry it. Check what the subscription's notification info puts in the original payload, and make sure the mark cannot come from there.
Acceptance
bash scripts/build-ios.sh test
python3 scripts/check_hygiene.py- A verified, answered delivery check is not presented as a banner in front, with a test.
- A request notification, a generic notification and a delivery check the extension could not answer are still presented with banner, list and sound, with tests.
- The mark cannot appear on content the extension did not produce, with a test or a documented reason.
- All four CI jobs are green.
Activity