For a Mac app, written in Cocoa/Objective-C, a common customer support problem is that they tried "uninstalling and re-installing" in hopes of getting back to a clean state. But the problem is that the new install is still reading the configuration files and database left by the previous install. Customer just hits the same issue that caused him to uninstall in the first place. Then I have to guide him through which files to delete to get back to an OK state and/or show him the proper way to reset from the UI.
While the real pain points and bugs get fixed over time, I'd like to know if it is possible to do either of the following:
- When
MyApp.app
is moved to the trash bin, is it possible for some code can run that cleans up any crud left by the app in the user's home directory? Or something in a manifest/pinfo file that can designate certain directories or files be removed?
OR
- When the application is started, that it can programatically detect that it has been "re-installed" such that it can do the necessary cleanup code for the new install?