Skip to content

Commit 7517087

Browse files
Add quarantine attribute removal to prevent security dialog
🔓 Security Dialog Prevention: - Added xattr -dr com.apple.quarantine command to updater - Removes quarantine attribute after copying app to /Applications - Prevents 'Apple could not verify A6Cutter.app is free of malware' dialog - Added xattr to runCommand function with full path /usr/bin/xattr 📱 Updater Improvements: - Quarantine removal happens after app copy but before unmount - Clear logging: '🔓 Odstraňuji quarantine atribut...' and '✅ Quarantine atribut odstraněn' - Ensures smooth user experience without security warnings This prevents the macOS security dialog that appears when running downloaded applications, making the update process seamless for users.
1 parent 8e348e2 commit 7517087

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

A6Cutter/Info.plist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
<key>CFBundlePackageType</key>
1414
<string>APPL</string>
1515
<key>CFBundleShortVersionString</key>
16-
<string>v1.0.29-dev</string>
16+
<string>v1.0.30-dev</string>
1717
<key>CFBundleSignature</key>
1818
<string>????</string>
1919
<key>CFBundleVersion</key>
20-
<string>88c991d</string>
20+
<string>8e348e2</string>
2121
<key>GitHash</key>
22-
<string>88c991d4ba022cce994a5c1eae222ce1c11c050e</string>
22+
<string>8e348e2abcf8fc736e788e862162fd00c41a5dd7</string>
2323
<key>LSMinimumSystemVersion</key>
2424
<string>14.0</string>
2525
<key>NSHumanReadableCopyright</key>

A6Cutter/UpdateDebugView.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,11 @@ struct UpdateDebugView: View {
390390
try await runCommand("cp", arguments: ["-R", appPath, "/Applications/"])
391391
addLogMessage("✅ Aplikace zkopírována", isError: false)
392392

393+
// Remove quarantine attribute to prevent security dialog
394+
addLogMessage("🔓 Odstraňuji quarantine atribut...", isError: false)
395+
try await runCommand("xattr", arguments: ["-dr", "com.apple.quarantine", targetPath])
396+
addLogMessage("✅ Quarantine atribut odstraněn", isError: false)
397+
393398
// Unmount DMG
394399
addLogMessage("💿 Odmountovávám DMG...", isError: false)
395400
try await runCommand("hdiutil", arguments: ["detach", mountPoint, "-quiet"])
@@ -447,6 +452,8 @@ struct UpdateDebugView: View {
447452
commandPath = "/usr/bin/hdiutil"
448453
case "open":
449454
commandPath = "/usr/bin/open"
455+
case "xattr":
456+
commandPath = "/usr/bin/xattr"
450457
default:
451458
commandPath = "/usr/bin/\(command)"
452459
}

0 commit comments

Comments
 (0)