Apple recommends to stop bundle self-modification as soon as possible:
"If you used custom resource rules because your program modifies itself
as it is running, you should stop doing this as soon as possible. If you
transport such a modified app to another computer by web download,
email, AirDrop, etc., the modified copy at the receiving end will be
quarantined. This will trigger the Gatekeeper check the first time the
app is run on the receiving machine, and the app will not be allowed to
run because of the broken signature."
Q1: My question is about the standard practice of saving the data outside the bundle. Namely, how to handle program removal. When the data is saved inside the bundle, removing the bundle means also removing the data. But when data is saved into ~/Library/Application Support, it means we need some kind of uninstaller and instead of a single bundle we have a directory containing both the bundle and its uninstaller. When installed in /Applications this directory is displayed as two applications in Launchpad: the main bundle and the uninstaller, which doesn't look nice to me. Or is it ok? What's the standard way to handle situations like this one? Perhaps it's somehow possible to make macOS silently call the uninstaller when the user removes the main bundle from the Launchpad?
Q2: I've also read somewhere (cannot find the link atm) that with the upcoming macOS Catalina the bundle signatures will be periodically checked by the OS, so self-modifying bundles may have issues running even without being sent over the internet. Is it true?
PS. This question was originally posted in the wrong place here:
UPD: As I understand the standard way for Q1 is to use App Store installation. In that case there's a little near the application icon in Launchpad when Option is pressed and the uninstallation is handled by the OS. For other installers downloaded from the internet there's little that could be done to handle uninstallation automatically by the OS. Am I correct?