LetsMove
LetsMove copied to clipboard
App not being deleted on macOS Big Sur and later
The framework copies the app to /Applications but doesn't remove it from ~/Downloads.
When an app is running with the attribute "com.apple.quarantine" (meaning downloaded from the Internet) it's running in so called translocation mode and the current workaround for this - trashing the app via AppleScript using Finder. Well, it no longer works on macOS Big Sur and Monterey obviously:
Trash AppleScript error: {
NSAppleScriptErrorAppName = Finder;
NSAppleScriptErrorBriefMessage = "Not authorized to send Apple events to Finder.";
NSAppleScriptErrorMessage = "Not authorized to send Apple events to Finder.";
NSAppleScriptErrorNumber = "-1743";
NSAppleScriptErrorRange = "NSRange: {267, 70}";
There's a solution but as a result a user must allow to control Finder (which is not cool unfortunately 😢 ):
![Screen Shot 2021-09-27 at 9 55 41 PM](https://user-images.githubusercontent.com/2600624/134976247-43c0396e-ca90-4953-967e-d1c775c2c38a.png)
You will need to:
- add "com.apple.security.automation.apple-events" attribute to your code signing entitlements
- add NSAppleEventsUsageDescription to the app plist file, e.g.
<key>NSAppleEventsUsageDescription</key>
<string>Please allow the app to move itself via Apple Script.</string>