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

[Bug]: systray.mm:21:63: error: use of u ndeclared identifier 'UNNotificationPresentationOptionBanner' with macOS < 11.0 #4557

Closed
4 of 8 tasks
ra1nb0w opened this issue May 18, 2022 · 5 comments · Fixed by #4563
Assignees

Comments

@ra1nb0w
Copy link

ra1nb0w commented May 18, 2022

⚠️ Before submitting, please verify the following: ⚠️

Bug description

Compiling nextcloud client 3.5.1 on macOS 10.14 I get the following error:

:info:build /opt/local/var/macports/build/_Users_rainbow_sources_github_macports-ports_www_nextcloud-client/nextcloud-client/work/desktop-3.5.1/src/gui/systray.mm:21:63: error: use of u
ndeclared identifier 'UNNotificationPresentationOptionBanner'; did you mean 'UNNotificationPresentationOptionBadge'?
:info:build     completionHandler(UNNotificationPresentationOptionSound + UNNotificationPresentationOptionBanner);
:info:build                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Version 3.4.4 was working perfectly.

This happen because UNNotificationPresentationOptionBanner is available from macOS 11.0+ and therefore using that API doesn't respect the system requirement (macOS 10.12+)

Steps to reproduce

Build the software as described in the guide.
This is part of macports port update.

Expected behavior

The software should compile without any issue.

Which files are affected by this bug

systray.mm

Operating system

Mac OS

Which version of the operating system you are running.

10.14

Package

Compiled it myself

Nextcloud Server version

24.0.0

Nextcloud Desktop Client version

3.5.1

Is this bug present after an update or on a fresh install?

Fresh desktop client install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

Are you using an external user-backend?

  • Default internal user-backend
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Nextcloud Server logs

No response

Additional info

No response

@claucambra
Copy link
Collaborator

Hi @ra1nb0w ,

We now have a fix for builds on macOS 10.14 and up which should hopefully be merged soon. Unfortunately, with us now using the UserNotification framework for notifications we will not be able to support macOS versions pre-10.14 and will update our system requirements to reflect this.

Thank you for reporting this issue!

@ra1nb0w
Copy link
Author

ra1nb0w commented May 18, 2022

Thank you Claudio. I note this requirement change in macports and I will wait the merge.

@mascguy
Copy link

mascguy commented Jul 11, 2022

Folks, we're still seeing build failures for 10.14 and 10.15, due to identifier UNNotificationPresentationOptionBanner.

Should the fix use a preprocessor availability block instead, like this?

#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000
    completionHandler(UNNotificationPresentationOptionSound + UNNotificationPresentationOptionBanner);
#else
    completionHandler(UNNotificationPresentationOptionSound + UNNotificationPresentationOptionAlert);
#endif

@claucambra
Copy link
Collaborator

Hi @mascguy I have opened #4720 with your suggested changes to fix this issue, thanks for sharing

@mascguy
Copy link

mascguy commented Jul 12, 2022

Hi @mascguy I have opened #4720 with your suggested changes to fix this issue, thanks for sharing

No problem, thank you for the quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants