miliuco Posted January 12 Share Posted January 12 (edited) Many of the apps we create as amateurs are not notarized by Apple. Currently, an Apple Developer account is required to notarize Mac applications. However, many developers don't want to register with the Apple Developer Program, either because of the cost or because they (we) develop small apps that are distributed for free. com.apple.quarantine When a file is downloaded from the Internet, an extended attribute named com.apple.quarantine is added to it so that Gatekeeper requests confirmation before executing them. In pre-Sequoia versions, the Gatekeeper warning for files downloaded from the Internet had a simple solution: accepting the warning when opening the file or right-clicking on the file -> Open. But in Sequoia and Tahoe, the warning is more serious and might upset the user. It may display this message: The application is damaged and cannot be opened. Or this one: Could not verify that Download Full Installer does not contain malicious software. With the recommendation in both cases to move the file to the Trash. If the app is notarized, the warning is more benign, reminiscent of the pre-Sequoia versions, but still present. Users who have Gatekeeper disabled will not see this warning. However, disabling Gatekeeper globally to run a single application is not a valid recommendation. The need to remove the attribute doesn't happen if you download the source code, compile the app using Xcode, and save the product for regular use. When you build an app in Xcode and set it to “Sign to Run Locally”, Xcode signs it with a trusted local certificate, so the system allows it to run. If Hardened Runtime is disabled, the app does not need Apple notarization and will still run normally on your Mac. That’s why you don’t get the security warning. How to fix the Gatekeeper issue? System Settings -> Security and Privacy First, go to Privacy & Security to see if there's a message about blocking the downloaded application with Open Anyway option. This is the easiest way to fix it. By clicking Open Anyway, macOS will ask again if you want to open the file and, if you answer yes, it will ask for the user password and open it. xattr command line tool xattr handles extended attributes, which are additional metadata attached to files and directories beyond standard information like name or size. This tool is built into macOS natively. With xattr you can remove the com.apple.quarantine attribute from any file downloaded from Internet and the task is quite simple. xattr without arguments displays extended attributes: > sudo xattr /Applications/Xattr\ Editor.app > com.apple.quarantine xattr -cr removes all extended attributes: > sudo xattr -cr /Applications/Xattr\ Editor.app After this, xattr no longer displays com.apple.quarantine extended attribute: > sudo xattr /Applications/Xattr\ Editor.app > (no output) Xattr Editor Xattr Editor is a simple GUI application to view/edit extended file attributes on macOS, for those users who might find a graphical interface more convenient (where they can drag and drop a file and view its extended attributes) rather than opening Terminal and interacting with xattr. With the added advantage that attributes can be edited one by one, adding, modifying, or deleting any of them. The drawback of Xattr Editor is that, as an application downloaded from the internet, it also displays the Gatekeeper warning on its first run. This is unavoidable since the app is only ad-hoc signed and not notarized. So the first time you run Xattr Editor, you have to use System Settings or the xattr command in Terminal. After that, the app runs up fine and allows you to drag and drop other apps (it actually works for any file with the com.apple.quarantine attribute, whether it's an application or another type) onto the Xattr Editor window, making it very easy to use. Xattr Editor how-to It's really simple to use. When you start the app, a window appears where you can drag and drop files. Spoiler You can also use the File >> Open menu (Cmd + O), which allows you to select a file instead of dragging it onto the window. Either way, the main window opens with the extended attribute(s) (if any) and their properties. Spoiler You can add, rename, delete, or modify properties of existing attributes. When removing an attribute, the user receives feedback. E.g., removing the com.apple.quarantine attribute: Spoiler Result Either way, System Settings, Xattr Editor or xattr, from this point on, the downloaded app will run without security prompts because the com.apple.quarantine attribute has been removed. Credits rcsiko is the author of the original repository xattr-editor, which hasn't been updated in 7 years. I've created my fork based on the original, which contains the most important part of the source code, bringing it up to date: Add app icon in Assets.xcassets Fix swiftlint warnings and refactor Swift code Add user feedback (alert) for attribute removal Fix error warning in attribute renaming Clear the attribute value field when deleting attributes Re-show drop file window when closing attribute inspector Improve README and documentation Update screenshots. Updated repo and release https://github.com/perez987/xattr-editor https://github.com/perez987/Xattr-Editor/releases/tag/1.0 Xattr.Editor.zip Edited January 13 by miliuco Add Max.1974 text 2 2 Link to comment https://www.insanelymac.com/forum/topic/362207-xattr-editor-graphical-app-to-remove-comapplequaratine-attribute/ Share on other sites More sharing options...
Max.1974 Posted January 13 Share Posted January 13 (edited) @Miliuco Hello, my friend. It is great to know that you are developing your own applications. I truly admire your work. You are a very organized and knowledgeable person in the Hackintosh community, and you absolutely deserve that recognition. I am sure your project will be a success. Good luck! I would also like to leave a few words for anyone who wants to develop applications in Xcode without having Gatekeeper blocking them. Here are a few tips. macOS blocks apps that are not properly code-signed — that’s what Gatekeeper does. When you build an app in Xcode and set it to “Sign to Run Locally”, Xcode signs it with a trusted local certificate, so the system allows it to run. If Hardened Runtime is disabled, the app does not need Apple notarization and will still run normally on your Mac. That’s why you don’t get the security warning. If the app is not signed at all, macOS treats it as unsafe and Gatekeeper will block it. Even though your work is built on updating and improving another repository, it is still extremely valuable and deserves full recognition. Congratulations on this great achievement! 🤩 Edited January 13 by Max.1974 2 Link to comment https://www.insanelymac.com/forum/topic/362207-xattr-editor-graphical-app-to-remove-comapplequaratine-attribute/#findComment-2846308 Share on other sites More sharing options...
miliuco Posted January 13 Author Share Posted January 13 @Max.1974 Thank you, very kind. The explanation about the app built in Xcode and Gatekeeper, although familiar, is very concise and informative. Since it's missing from my text, with your permission I'll copy it verbatim to complete the post. 1 Link to comment https://www.insanelymac.com/forum/topic/362207-xattr-editor-graphical-app-to-remove-comapplequaratine-attribute/#findComment-2846333 Share on other sites More sharing options...
miliuco Posted January 13 Author Share Posted January 13 New! Project migrated from AppKit/XIB to SwiftUI to bring it up to date with Apple's modern development language. Same functionality using Apple's current UI frameworks. Updated repo and release https://github.com/perez987/xattr-editor https://github.com/perez987/Xattr-Editor/releases/tag/2.0 1 Link to comment https://www.insanelymac.com/forum/topic/362207-xattr-editor-graphical-app-to-remove-comapplequaratine-attribute/#findComment-2846381 Share on other sites More sharing options...
Max.1974 Posted January 13 Share Posted January 13 @Miliuco thanks my brother!! Link to comment https://www.insanelymac.com/forum/topic/362207-xattr-editor-graphical-app-to-remove-comapplequaratine-attribute/#findComment-2846382 Share on other sites More sharing options...
miliuco Posted January 14 Author Share Posted January 14 (edited) Complete SwiftUI migration from XIB-storyboard. Spoiler Spoiler Spoiler Edited January 14 by miliuco Typo 1 Link to comment https://www.insanelymac.com/forum/topic/362207-xattr-editor-graphical-app-to-remove-comapplequaratine-attribute/#findComment-2846430 Share on other sites More sharing options...
miliuco Posted January 15 Author Share Posted January 15 Added Liquid Glass support, complete in Tahoe and partial in Sequoia. Backward compatibility with Sonoma. Link to comment https://www.insanelymac.com/forum/topic/362207-xattr-editor-graphical-app-to-remove-comapplequaratine-attribute/#findComment-2846452 Share on other sites More sharing options...
miliuco Posted January 24 Author Share Posted January 24 (edited) Added new languages (French, German and Italian) and language selector (opens from menu bar or ⌘ + L shorcut). Spoiler https://github.com/perez987/Xattr-Editor/releases/tag/2.6 Edited January 24 by miliuco Typo 2 1 Link to comment https://www.insanelymac.com/forum/topic/362207-xattr-editor-graphical-app-to-remove-comapplequaratine-attribute/#findComment-2846825 Share on other sites More sharing options...
Recommended Posts