Skip to content

Latest commit

 

History

142 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xattr-remove: clear com.apple.quarantine and re-sign app bundle (optional)

Platform Swift Xcode

SwiftUI application for macOS that removes com.apple.quarantine extended attribute from files downloaded from the Internet. Works by accepting files via drag and drop onto the app window.

Main

Quarantine attribute removal

This app is a simpler and lighter version of Xattr Editor. Instead of displaying and editing (remove, modify, add) extended attributes, it performs a single task: remove com.apple.quarantine in a quick way from files downloaded from the Internet so that they can be opened in macOS without Gatekeeper issues.

Digital re-sign (optional)

You can also optionally digitally self-sign ad-hoc an app (and the Sparkle framework) by replacing its certificate. This is especially useful if, trying to run an app for the first time, even after removing the com.apple.quarantine attribute, the app crashes with a Sparkle-related error. This option is equivalent to running these commands:

 codesign --force --deep --sign - \
  <App-name>.app/Contents/Frameworks/Sparkle.framework

 codesign --force --deep --sign - \
  <App-name>.app

Note: This is not necessary or recommended for apps digitally signed with an Apple Developer ID..

Architecture detection

If the file dragged onto the window is an .app, a macOS executable or a library, Xattr-remove runs lipo -archs on the binary. The result (architecture/s of the file) is shown in the main window while processing, and appended to the success alert message. It can be Intel and Silicon, Only Intel or Only Silicon. For multiple-file drops, no architecture info is shown (it would be ambiguous). Non-binary files (plain documents, scripts, etc.) silently return nothing and no label appears.

Screenshots
Alert
Alert
Alert

Features

  • Xattr-remove is certified by Apple and has no issues with Gatekeeper on first run
  • Drop files onto the app window to remove the quarantine attribute
  • Optional checkbox to re-sign app bundles (Sparkle first, app second) after removing the quarantine attribute
  • Information about detected architectures if it is a macOS binary file
  • Built with Swift and SwiftUI
  • Handle errors (whether the attribute exists or not)
  • Supports all file types including apps and executables
  • Localization system with language selector and 5 languages (German, English, French, Italian and Spanish)
  • Language selector: Language > Select language in menubar or ⌘ + L keyboard shortcut

Building

Open Xattr-remove.xcodeproj in Xcode and build the project. The app requires macOS 13.0 or later.

Usage

  1. Launch the app to open the main window
  2. Drag and drop files downloaded from Internet onto the app window
  3. The quarantine attribute (if it exists) will be automatically removed
  4. (Optional) Enable the re-sign checkbox before dropping files to run ad-hoc codesign on Sparkle.framework and then the app bundle
  5. The user gets an alert as feedback
  6. The app automatically quits 5 seconds after displaying a success alert

Note: Files must be dropped onto the app window. Dropping files onto the app icon in Finder or Dock is hard to implement due to macOS Gatekeeper restrictions with quarantined executables.

Requirements

  • macOS 13.0 or later
  • Xcode 15.0 or later (for building)

Credits

Based on:

About

A SwiftUI application for macOS that removes the extended attribute "com.apple.quarantine" from files downloaded from the internet and, optionally, digitally self-sign ad-hoc an app (and the integrated Sparkle framework). Accepts files via drag and drop.

Topics

Resources

Stars

20 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages