-
-
Notifications
You must be signed in to change notification settings - Fork 602
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
Add postDistributedNotifications matcher for testing DistributedNotificationCenter #786
Conversation
…ification (workaround for Catalina not calling observers, when observing name "nil")
Thanks for submitting the pull request!
We don't see such breakage on our CI tests so I'm confused 🤔 We use GitHub Actions and the environment is Catalina:
And also I can't find any description about the behavioral change at https://developer.apple.com/documentation/foundation/notificationcenter/1411723-addobserver. |
Then it is probably limited to DistributedNotificationCenter. It is indeed an undocumented change, but Apple acknowledged it exists. See: https://mjtsai.com/blog/2019/10/04/nsdistributednotificationcenter-no-longer-supports-nil-names/ for more. |
Thanks for the input, I didn't know |
Sounds good. |
Tried to implement your suggestion. Unfortunately users still won't be forced to use the function with the names parameter, as the |
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.
LGTM, thanks for the contribution! 👍
This is a workaround for postNotification not working at all on Catalina, due to Catalina not calling any observers subscribed to "nil" name.
Checklist - While not every PR needs it, new features should consider this list: