Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.1.2] - 2026-05-07
Requires macOS 12.0 and higher.

### Fixed
- Corrected activation logic when requiredInstallationDate is passed
- Addresses [704](https://github.com/macadmins/nudge/issues/704)
- **Important Note:** macOS 14 introduced `NSApp​.activate()` as a replacement for `NSApp​.activate(ignoring​Other​Apps: true)`, but the new API uses _cooperative_ _activation_ — it only gains focus if the current frontmost app _voluntarily_ _yields_. Chrome (and any other app) never does this, so Nudge ends up sitting just behind it. When Apple removes this API in a future macOS version, Nudge may not be able to gaurantee it launches in front of all applications.
- Added more logic in counting of CVEs
- Potentially Addresses [703](https://github.com/macadmins/nudge/issues/703), a continuation of [650](https://github.com/macadmins/nudge/issues/650)

## [2.1.2] - 2026-03-30
Requires macOS 12.0 and higher.

Expand Down
2 changes: 1 addition & 1 deletion Nudge.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 2.1.2;
MARKETING_VERSION = 2.1.3;
PRODUCT_BUNDLE_IDENTIFIER = com.github.macadmins.Nudge;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
4 changes: 2 additions & 2 deletions Nudge/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>2.1.2</string>
<string>2.1.3</string>
<key>CFBundleVersion</key>
<string>2.1.2</string>
<string>2.1.3</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
13 changes: 8 additions & 5 deletions Nudge/UI/Main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -317,18 +317,22 @@ class AppDelegate: NSObject, NSApplicationDelegate {
LogManager.notice("Assessing macOS version range for active exploits (cross major version): \(versionsToCheck) ", logger: sofaLog)
}

// Count actively exploited CVEs in the appropriate filtered versions
// Count CVEs in the appropriate filtered versions
var totalAnyCVEsInRange = 0
for osVersion in macOSSOFAAssets {
if versionsToCheck.contains(osVersion.latest.productVersion) {
totalActivelyExploitedCVEs += osVersion.latest.activelyExploitedCVEs.count
totalAnyCVEsInRange += osVersion.latest.cves.count
}
for securityRelease in osVersion.securityReleases {
if versionsToCheck.contains(securityRelease.productVersion) {
totalActivelyExploitedCVEs += securityRelease.activelyExploitedCVEs.count
totalAnyCVEsInRange += securityRelease.cves.count
}
}
}
let activelyExploitedCVEs = totalActivelyExploitedCVEs > 0
let anyCVEsInRange = totalAnyCVEsInRange > 0

let presentCVEs = selectedOS!.cves.count > 0
let slaExtension: TimeInterval
Expand Down Expand Up @@ -367,10 +371,9 @@ class AppDelegate: NSObject, NSApplicationDelegate {
// Check if we should disable Nudge for standard installs
// Exit only if:
// 1. disableNudgeForStandardInstalls is enabled
// 2. Target OS has no CVEs
// 3. No actively exploited CVEs exist in intermediate versions (respects minorVersionRecalculationThreshold)
if OptionalFeatureVariables.disableNudgeForStandardInstalls && !presentCVEs && !activelyExploitedCVEs {
LogManager.notice("No known CVEs for \(selectedOS!.productVersion), no actively exploited CVEs in intermediate versions, and disableNudgeForStandardInstalls is set to true", logger: sofaLog)
// 2. No CVEs exist anywhere in the update path (including non-actively exploited CVEs in intermediate versions)
if OptionalFeatureVariables.disableNudgeForStandardInstalls && !anyCVEsInRange {
LogManager.notice("No known CVEs in version range up to \(selectedOS!.productVersion), and disableNudgeForStandardInstalls is set to true", logger: sofaLog)
AppStateManager().exitNudge()
}
LogManager.notice("SOFA Actively Exploited CVEs (across version range): \(activelyExploitedCVEs)", logger: sofaLog)
Expand Down
12 changes: 8 additions & 4 deletions Nudge/Utilities/Utils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ struct BlurManager {
// Force window to front regardless of space constraints
// This will trigger a space switch if needed
if #available(macOS 14, *) {
NSApp.activate()
// NSApp.activate() co-operative API that doesn't allow Nudge to properly activate
NSApp.activate(ignoringOtherApps: true)
} else {
NSApp.activate(ignoringOtherApps: true)
}
Expand Down Expand Up @@ -129,7 +130,8 @@ struct BlurManager {
// Ensure main window stays on top and visible
mainWindow.makeKeyAndOrderFront(nil)
if #available(macOS 14, *) {
NSApp.activate()
// NSApp.activate() co-operative API that doesn't allow Nudge to properly activate
NSApp.activate(ignoringOtherApps: true)
} else {
NSApp.activate(ignoringOtherApps: true)
}
Expand Down Expand Up @@ -164,7 +166,8 @@ struct AppStateManager {
if DateManager().pastRequiredInstallationDate() && OptionalFeatureVariables.aggressiveUserFullScreenExperience {
UIUtilities().centerNudge()
if #available(macOS 14, *) {
NSApp.activate()
// NSApp.activate() co-operative API that doesn't allow Nudge to properly activate
NSApp.activate(ignoringOtherApps: true)
} else {
NSApp.activate(ignoringOtherApps: true)
}
Expand All @@ -177,7 +180,8 @@ struct AppStateManager {
LogManager.notice("Bypassing activation due to full screen bugs in macOS", logger: uiLog)
} else {
if #available(macOS 14, *) {
NSApp.activate()
// NSApp.activate() co-operative API that doesn't allow Nudge to properly activate
NSApp.activate(ignoringOtherApps: true)
} else {
NSApp.activate(ignoringOtherApps: true)
}
Expand Down
Loading