That facility sort of exists for sandboxed Mac apps, since all incidental files related to the app are under a single container that iirc is deleted if the corresponding app is removed.
Re:Background Music, an OS X audio utility
by Razengan on Sunday April 17, 2016 @06:03PM
(#11516537)
Ah then "uninstallation" isn't needed at all, unless it pumps a lot of stuff into ~/Library/Application Support or somewhere, kind of like what Xcode does (I think it forgets about outdated and huge documentation downloads sometimes.)
Maybe Apple could provide a builtin mechanism in MacOS (as I assume/hope it's about to be called) that watches for a .app bundle being dragged into the Trash, and offers the user a chance to remove any auxiliary files created by that app, and run its uninstallation scripts if any, when the Trash is being emptied?
Of course it will have to be seamless and resistant to developer abuse (or malice) and not make everything too Windows'y.