How to prevent a Network Extension icon bouncing inside of a dock
Asked Answered
H

0

0

I have System network extension that connects to specific resource. What is happening is when connection is done, extension's icon (white box starts jumping in dock). After the connection is closed, icon removes from dock.

I am not sure what info I should add here, the connection is done in background.

I am not sure if this is desired behavior or is it configurable?

I tried something with requestUserAttention(_:) and cancelUserAttentionRequest(_:) but with no luck (I tried to make a new attention request, then to cancel it, plus to just call cancelUserAttentionRequest).

I found a similar unanswered question here, so I raised a bounty on it.

I am not sure if some code related to connecting or disconnecting is required, but I also can't post it here exact as it is. Its just a custom framework that is used for connection and I only have an access to a wrapper that uses it.

Halvaard answered 7/10, 2024 at 10:23 Comment(4)
Does your extension have NSApplication subclass created? Share this codeTent
It doesn't have NSApplication subclass created. I didn't know I should do that @TentHalvaard
you shouldnt have to, but you can solve using that - ill write what i think is the solution, but theres two option, so before i write every thing, does not having an icon at all is also an option?Tent
@Tent I need to have app icon. But (network) system extension icon (white box) shouldn't be next to it. Also, as I said, network system extension icon is bouncing. So I want that one completely removed. If possible... I tried to subclass NSApplication, and to overried requestUserAttention method, and to return 0. But that didn't work. Method is not called at all. Maybe I am doing something wrong.Halvaard

© 2022 - 2025 — McMap. All rights reserved.