>> So far, i have been checking whether or not MS Teams is running by the 
>> following snippet (omitting some of the safety guards):
> 
> That code is answering the wrong question. It might appear to provide the 
> state of some running apps, but all it actually does is indicate the presence 
> of some particularly-named windows.

I know it is a very crude heuristic.
But so far it has worked well enough to keep it, I think.

> - What happens when the user happens to be editing a document in another app 
> (say, TextEdit) whose name happens to be "Microsoft Teams"? (Or "Zoom"? etc.)

Right, like I said, it's just a heuristic ...
But no harm will arise in those cases.

> - What happens when Microsoft revises their UI in a future version such that 
> the window is called something else?

Then I will need to update my app.

> The window-enumeration approach is coarse and fragile at best.

Yes, i know.

But not checking whether a video conferencing is taking place at the moment 
would annoy users (including myself) much more, because my app would then barge 
into a video conference (it goes full-screen automatically, depending on the 
user's preferences, which the other video conferencing parties won't see, but 
it's still kind of annoying).

Best regards, Gabriel

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to