Repository navigation
Let a notification service ask for no alert under a declared filtering policy - #75
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #75 +/- ##
==========================================
+ Coverage 94.15% 94.25% +0.10%
==========================================
Files 39 39
Lines 4840 4930 +90
Branches 58 58
==========================================
+ Hits 4557 4647 +90
Misses 244 244
Partials 39 39 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A
#[pushups::notification_service]callback now returnsResult<Rendering, Error>, whereRendering::Show(Notification)keeps the current behaviour andRendering::NoAlertasks for no alert. An error or an empty title never means suppression.iOS has no API to read an extension's signed entitlements, so the extension declares Apple's filtering policy itself with the
PushupsNotificationFilteringkey in itsInfo.plist, andRenderingContext::suppression()reports it. Under the declarationNoAlertcompletes with a fresh emptyUNNotificationContent, which is Apple's suppression contract, and settlesSuppressionRequested. Without it the original alert stays and the outcome isSuppressionUndeclared. Nothing in the SDK claims the alert actually disappeared, because that depends on Apple grantingcom.apple.developer.usernotifications.filtering, the extension being signed with it and the sender usingapns-push-type: alert.ios/check-filtering.shcompares the declaration with the signed entitlement in a built.appexand fails when they disagree, for release owners to run before shipping.ci/apple/run.shruns it against the iOS extension signed in all four combinations, and the native harness now checks bothNoAlertcases.