Skip to content
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

[flutter_local_notifications] suppress deprecation warnings on MACOS relating to old notification APIs #1740 #1858

Closed
ehagerty opened this issue Jan 3, 2023 · 5 comments · Fixed by #1965

Comments

@ehagerty
Copy link

ehagerty commented Jan 3, 2023

Forgive me if this is the incorrect way to suggest this - I'm incredibly grateful for the work you did #1740 and was hoping the same could be done to suppress warning when building for MACOS as well as we use both in production. Thanks for your time.

@MaikuB
Copy link
Owner

MaikuB commented Jan 24, 2023

Thanks for raising this. Would you be able to help by submitting a PR to address this?

@ehagerty
Copy link
Author

Thanks @MaikuB so much! Forgive me, but as I haven't done any coding myself on this, am I the right person to raise a PR?

@MaikuB
Copy link
Owner

MaikuB commented Jan 24, 2023

This is open-source so it means anyone can submit a PR. I learnt Swift as part of working on this plugin so to be frank, I would actually need to do research on how to even suppress the warnings on macOS. This plugin is maintained in my spare so any help is appreciated. Despite maintaining the plugin for years, my first opportunity to actually use it was only happened last year and even then the use case is basic

@ehagerty
Copy link
Author

@MaikuB then let me thank you a thousand times - this is a great plugin! We are so grateful to you for your work! I will try to complete this myself as you suggest. If I have questions, should I raise them here?

@MaikuB
Copy link
Owner

MaikuB commented Jan 24, 2023

You can but my suggestion would be to open a draft PR based on the your fork if the questions are to do with the code

Edit: appreciate the feedback :)

stevekohls added a commit to stevekohls/flutter_local_notifications that referenced this issue Apr 17, 2023
NSUserNotification was deprecated in macOS 10.14. Mark any OS X target methods
using this API as deprecated. This eliminates compile-time warnings when
building with 10.14 or higher.
MaikuB pushed a commit that referenced this issue Apr 19, 2023
* Add some MARKs

Helps to navigate in Xcode when you can see groupings of code.

* Mark macOS NSUserNotification methods unavailable (#1858)

NSUserNotification was deprecated in macOS 10.14. Mark any OS X target methods
using this API as deprecated. This eliminates compile-time warnings when
building with 10.14 or higher.

* Fix deprecation warning statements

Specified the wrong version! Fixed, and added the introduction version as well.
Also switching from OSX to macOS. All Swift documentation uses macOS and not
OSX. Figured best to follow the official docs, even though OSX is valid.

* Use macOS versus OSX for Swift availability

Following the previous commit, standardize on using "macOS" for availability in
Swift code. This matches the official Swift language documentation, versus
"OSX" which, while valid, is present for backward compatibility, but not
mentioned in the Swift docs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants