Skip to content

Commit 4462f3f

Browse files
committed
v2.0
1 parent 6e10e7d commit 4462f3f

4 files changed

Lines changed: 29 additions & 7 deletions

File tree

Sentinel.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@
342342
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
343343
CODE_SIGN_STYLE = Manual;
344344
COMBINE_HIDPI_IMAGES = YES;
345-
CURRENT_PROJECT_VERSION = 10;
345+
CURRENT_PROJECT_VERSION = 11;
346346
DEAD_CODE_STRIPPING = YES;
347347
DEVELOPMENT_ASSET_PATHS = "";
348348
DEVELOPMENT_TEAM = "";
@@ -358,7 +358,7 @@
358358
"@executable_path/../Frameworks",
359359
);
360360
MACOSX_DEPLOYMENT_TARGET = 12.0;
361-
MARKETING_VERSION = 1.9;
361+
MARKETING_VERSION = 2.0;
362362
PRODUCT_BUNDLE_IDENTIFIER = com.alienator88.Sentinel;
363363
PRODUCT_NAME = "$(TARGET_NAME)";
364364
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -378,7 +378,7 @@
378378
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
379379
CODE_SIGN_STYLE = Manual;
380380
COMBINE_HIDPI_IMAGES = YES;
381-
CURRENT_PROJECT_VERSION = 10;
381+
CURRENT_PROJECT_VERSION = 11;
382382
DEAD_CODE_STRIPPING = YES;
383383
DEVELOPMENT_ASSET_PATHS = "";
384384
DEVELOPMENT_TEAM = "";
@@ -394,7 +394,7 @@
394394
"@executable_path/../Frameworks",
395395
);
396396
MACOSX_DEPLOYMENT_TARGET = 12.0;
397-
MARKETING_VERSION = 1.9;
397+
MARKETING_VERSION = 2.0;
398398
PRODUCT_BUNDLE_IDENTIFIER = com.alienator88.Sentinel;
399399
PRODUCT_NAME = "$(TARGET_NAME)";
400400
PROVISIONING_PROFILE_SPECIFIER = "";

Sentinel.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

Sentinel/Utilities/Commands.swift

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import Foundation
99
import AlinFoundation
10+
import AppKit
1011

1112
func CmdRun(cmd: String, appState: AppState) async -> Bool {
1213
let source = """
@@ -57,8 +58,29 @@ func CmdRunSudo(cmd: String, type: String, appState: AppState) {
5758
}
5859
}
5960

60-
// Always refresh state after operation
61-
getGatekeeperState(appState: appState)
61+
// Refresh status manually on Sequoia
62+
if type == "disable" {
63+
if #available(macOS 15.0, *) {
64+
updateOnMain {
65+
showCustomAlert(title: "Attention", message: "On macOS Sequoia or higher, Gatekeeper won't be fully disabled until you choose the 'Anywhere' option in the Privacy & Security settings page under Security section. Click Okay to open the settings page now.", style: .critical, onOk: {
66+
// Open the Privacy & Security settings page
67+
if let url = URL(string: "x-apple.systempreferences:com.apple.preference.security?Privacy") {
68+
NSWorkspace.shared.open(url)
69+
}
70+
appState.isGatekeeperEnabled = false
71+
appState.isGatekeeperEnabledState = false
72+
appState.status = "Please select the 'Anywhere' option in the Privacy & Security > Security settings"
73+
})
74+
}
75+
} else {
76+
// Refresh status via CLI on anything below Sequoia
77+
getGatekeeperState(appState: appState)
78+
}
79+
} else {
80+
// Refresh status via CLI if enable command
81+
getGatekeeperState(appState: appState)
82+
}
83+
6284
}
6385
}
6486

0 commit comments

Comments
 (0)