Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

gdbleb

macrumors member
Original poster
Jul 16, 2008
67
29
NJ
Some apps have an "uninstall.app" application inside their .app folder structure. This seems to be invoked when you drag the .app folder to the trash. There is a .plist file that has a list of files/directories - /Library/... and ~/Library locations where further cleanup is performed.
Is this ability documented by Apple in developer.apple.com? I cannot find it.
Not interested in the mac app cleanup apps.
 

chrfr

macrumors G5
Jul 11, 2009
13,703
7,267
Some apps have an "uninstall.app" application inside their .app folder structure. This seems to be invoked when you drag the .app folder to the trash. There is a .plist file that has a list of files/directories - /Library/... and ~/Library locations where further cleanup is performed.
Is this ability documented by Apple in developer.apple.com? I cannot find it.
Not interested in the mac app cleanup apps.
It's not a feature that Apple has developed, so this won't be documented by Apple.
 
  • Like
Reactions: Reggaenald

svenmany

macrumors demi-god
Jun 19, 2011
2,278
1,519
Certainly the application receives some event from the OS when it is dragged to the trash. Otherwise, there would be nothing to trigger the invocation of the uninstall.app. Maybe it's a more general event and the choice to invoke the uninstall.app is just the way the application decides to handle that event.

There are also things that happen when an application is dragged *into* the Applications folder. Certainly Launch Services has a response to that. Perhaps there's an available hook in Launch Services that an application can set up.

I'm not a Mac developer (at all). I'm quite interested in this topic. If you figure it out could you post what you learn?
 

svenmany

macrumors demi-god
Jun 19, 2011
2,278
1,519
Follow-on question...

Does that application run any kind of service? If so, that service could easily register for file system events (FSEvent*) and handle them.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.