Skip to content

Conversation

@Luflosi
Copy link
Contributor

@Luflosi Luflosi commented Jul 23, 2020

Here is an unfinished and not actually working commit that's supposed to fix the deprecation issue mentioned in #2805. Maybe you find it useful to develop actually working code.

@kovidgoyal
Copy link
Owner

Oh for fuck's sake more of Apple's silly users need to be protected from
their own software nonsense. Apparently now one needs to ask permission
before daring to display a notification.

https://developer.apple.com/documentation/usernotifications/asking_permission_to_use_notifications?language=objc

I will look into this someday, when the only alternative is gouging out
my own eyeballs.

@alexanderniebuhr
Copy link

@Luflosi just to clarify, do you have any problems with this PR?
I just pulled it and voila .. it does work. 👍

@Luflosi
Copy link
Contributor Author

Luflosi commented Jul 23, 2020

Do you mean that you can get a notification to display? In my testing it didn't work. It does compile without warnings though.

1 similar comment
@Luflosi
Copy link
Contributor Author

Luflosi commented Jul 23, 2020

Do you mean that you can get a notification to display? In my testing it didn't work. It does compile without warnings though.

@alexanderniebuhr
Copy link

negative. no notification - haven't tested it, cause I am not needing them for terminal ... also don't need update notifications

I had a look, it seems alright. Might be issue with privacy. For notifications to work, you need pop-up asking user for permission, which I am a fan of!
However don't know how to get this implemented right with python / obj-c projects. (haven't worked a lot with them, everything Xcode and currently converting Universal Apps for Apple chips)

sorry

@kovidgoyal
Copy link
Owner

I tried implementing this, after wasting eight hours of my life on it. I find that at least on Catalina permission for notifications is always denied, so this entire exercise is pointless. Read the commit message for details. If i missed something and someone can get this to work, patches welcome. In the meantime I am just going to turn of Werror for cocoa_window.m

2fafdae

@kovidgoyal kovidgoyal closed this Aug 19, 2020
@Luflosi Luflosi deleted the macos-deprecated-api branch August 19, 2020 14:57
@Luflosi
Copy link
Contributor Author

Luflosi commented Sep 22, 2020

Would you accept a PR that makes it possible to select the old API with a compile-time option?
It would be nice to have notifications for unsigned builds of kitty. Also, I couldn't find a way to make this even compile with Nix since the API seems to only be available since macOS 10.14 and Nix uses the macOS 10.12 SDK.

@kovidgoyal
Copy link
Owner

Since the API is deprecated it will presumably be removed by Apple, at
which point the compile time option will break and have to be removed.
I'd rather avoid such churn. Instead simply use compile time version
detection to choose the API.

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 this pull request may close these issues.

3 participants