Then, this app will show as MyBash in Finder and double clicking it will run the MyBash script. MyBash is simply a bash script that is executable. Have an executable bash script and mimic the normal macOS app directory structure. It’s achingly simple and works in all macOS versions that I’ve tried with. In the end, I stumbled upon this answer: How to make a Mac OS X. “Are you sure you want to uninstall?” prompt,.Scratch Electron, what are people doing in general when it comes to uninstallers on macOS. Both, time-wise (development) and resource-wise (users' hard drives). It may come to no surprise that quite a few decide to build another Electron app for uninstalling and bundle it with the main app. So I turned to Google again to see what people are doing in such cases. Now comes the second problem: Electron does not provide any out-of-the-box support for uninstallers in macOS. It was then agreed to have an uninstaller for our app as well. “We can’t have the users uninstall our app too easily!”, he said. However, this approach was immediately rejected by product owner. For example, have a menu option to uninstall the app. One alternative to having a separate app for uninstalling is to initiate uninstall right from the running app. However, I don’t know of a way to clean system-wide stuff like drivers, when a user moves an app to a trash bin. There should be no uninstaller-type of thing in macOS, they say. As an aside, I should point out that many discourage having a ‘Windows uninstaller pattern’ in macOS. The uninstaller is right there at the top. Instead, I just use CMD + Space to bring up search bar and type the app name. Myself and many other macOS users don’t regularly browse the Applications folder in Finder. And the common approach I noticed is that they do in fact bundle uninstallers. Apps that add some system wide functionality on top of audio, file system, etc. Ok, so I checked how other macOS apps do this. Unfortunately, I could not find such an option. Wouldn’t it be nice, if I could - as an app developer - hook into a ‘user deleted the app’ event? Then our uninstall logic would run on that event. ![]() ![]() Users simply delete the app from Applications. ![]() But a common pattern for macOS applications is to not have any uninstaller. Normally, this wouldn’t be an issue, just bundle an uninstaller that removes those files when a user runs it. The problem is that during installation the app installed audio driver files into /Library/Audio/Plug-Ins/HAL. But there was a problem: when user deleted the app, the audio driver wasn’t deleted from the system. The app was already in development for some time and already used in production. Recently I was working on an Electron app that needed to work with system audio and for MacOS the authors have opted to use BlackHole audio driver.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |