Repository navigation
[flutter_local_notifications] Ignore UNErrorDomain errors when adding iOS notifications #2846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 3 commits
773b412
63fcfa8
d256458
747a495
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -999,7 +999,10 @@ - (void)addNotificationRequest:(NSString *)identifier | |
| [UNUserNotificationCenter currentNotificationCenter]; | ||
| [center addNotificationRequest:notificationRequest | ||
| withCompletionHandler:^(NSError *_Nullable error) { | ||
| if (error == nil) { | ||
| // iOS 27 returns errors where earlier versions failed silently, | ||
| // such as when notifications aren't authorized, so errors in this | ||
| // domain are ignored | ||
| if (error == nil || [error.domain isEqualToString:UNErrorDomain]) { | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can be ignored as the PR description is out of date. @vlaushkin could you update the PR title and description so it matches the change in direction?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated the title and description. |
||
| result(nil); | ||
| return; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vlaushkin can you update the readme?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the readme in 747a495 to also mention badge-only and scheduled notifications.