Is there a way to query an object in another app?

I would like to know if there’s a way to query another app’s object.

For example, in my app, I can write something like this:

Code Block
NSArray * myWindow = NSApp.windows;

to access all my app windows.

But what if I want to access the windows of another app?

Is there a way to query the classes or objects of another app?


Answered by Claude31 in 642554022
I fear you can't do anything.

Unless they have defined such a service, which I would doubt.

Maybe you can contact them and expose your case. They may have a solution or consider implementing something in the future (if that's a small enough company, not a giant as Microsoft or Facebook).

Good luck.
What do you want to do exactly ?

What you can do is limited, for obvious security reasons (avoid some app to spy your mail for instance)..

Between 2 of your app, you can use app groups :
https ://www.appcoda. com/app-group-macos-ios-communication/

You can also provide and request services between apps:
https ://medium. com/@hoishing/providing-services-on-macos-bb82f5e8ca7a
Thank you Claude.

I'm looking for a way to help a visual impaired friend. We would like to write an app that would modify windows' title of other apps (at runtime) and also the main menu of other apps as well (the one on the menu bar).

As far as I'm concern, I don' think the macOS will let me do that. I've spend a fair amount of time reading and exploring classes but didn't succeed to find a way to do what I want.

That's why I'm asking here hoping an Apple engineer (or some knowledgeable folk) will give me a definitive answer without having me pay 99$ to become a member of the ADP to file a Technical Support Incident (TSI) or find another way to get an answer.

Thank you so very much to anyone who can give me a definitive answer.

Luke

modify windows' title of other apps (at runtime)

Is this other app one you developed ?
Or a third party.

If 3rd party, I fear there's no way, unless the other app accepts such service request (would be surprising).
@Claude31

It'a a third party !!
Accepted Answer
I fear you can't do anything.

Unless they have defined such a service, which I would doubt.

Maybe you can contact them and expose your case. They may have a solution or consider implementing something in the future (if that's a small enough company, not a giant as Microsoft or Facebook).

Good luck.
@Claude31

Merci beaucoup Claude.

Je vais relancer les ingénieurs Apple directement ici avec un nouveau 'post' et voir si j'obtient une réponse.

De fait, les ingénieurs d'Apple s'impliquent-ils ici ou sommes nous laissés à nous-mêmes ?

Luc
Is there a way to query an object in another app?
 
 
Q