Skip to content

Commit 12d3a75

Browse files
Merge pull request #214 from root3nl/development
v2.6.2
2 parents 0ee975b + 19dfd1a commit 12d3a75

9 files changed

Lines changed: 35 additions & 38 deletions

File tree

src/Support.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@
754754
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
755755
CODE_SIGN_STYLE = Manual;
756756
CREATE_INFOPLIST_SECTION_IN_BINARY = YES;
757-
CURRENT_PROJECT_VERSION = 64;
757+
CURRENT_PROJECT_VERSION = 65;
758758
DEAD_CODE_STRIPPING = YES;
759759
DEVELOPMENT_TEAM = "";
760760
"DEVELOPMENT_TEAM[sdk=macosx*]" = 98LJ4XBGYK;
@@ -793,7 +793,7 @@
793793
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
794794
CODE_SIGN_STYLE = Manual;
795795
CREATE_INFOPLIST_SECTION_IN_BINARY = YES;
796-
CURRENT_PROJECT_VERSION = 64;
796+
CURRENT_PROJECT_VERSION = 65;
797797
DEAD_CODE_STRIPPING = YES;
798798
DEVELOPMENT_TEAM = "";
799799
"DEVELOPMENT_TEAM[sdk=macosx*]" = 98LJ4XBGYK;
@@ -830,7 +830,7 @@
830830
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
831831
CODE_SIGN_STYLE = Manual;
832832
COMBINE_HIDPI_IMAGES = YES;
833-
CURRENT_PROJECT_VERSION = 64;
833+
CURRENT_PROJECT_VERSION = 65;
834834
DEVELOPMENT_TEAM = "";
835835
"DEVELOPMENT_TEAM[sdk=macosx*]" = 98LJ4XBGYK;
836836
ENABLE_HARDENED_RUNTIME = YES;
@@ -863,7 +863,7 @@
863863
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
864864
CODE_SIGN_STYLE = Manual;
865865
COMBINE_HIDPI_IMAGES = YES;
866-
CURRENT_PROJECT_VERSION = 64;
866+
CURRENT_PROJECT_VERSION = 65;
867867
DEVELOPMENT_TEAM = "";
868868
"DEVELOPMENT_TEAM[sdk=macosx*]" = 98LJ4XBGYK;
869869
ENABLE_HARDENED_RUNTIME = YES;
@@ -1014,7 +1014,7 @@
10141014
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
10151015
CODE_SIGN_STYLE = Manual;
10161016
COMBINE_HIDPI_IMAGES = YES;
1017-
CURRENT_PROJECT_VERSION = 64;
1017+
CURRENT_PROJECT_VERSION = 65;
10181018
DEVELOPMENT_ASSET_PATHS = "\"Support/Preview Content\"";
10191019
DEVELOPMENT_TEAM = "";
10201020
"DEVELOPMENT_TEAM[sdk=macosx*]" = 98LJ4XBGYK;
@@ -1048,7 +1048,7 @@
10481048
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
10491049
CODE_SIGN_STYLE = Manual;
10501050
COMBINE_HIDPI_IMAGES = YES;
1051-
CURRENT_PROJECT_VERSION = 64;
1051+
CURRENT_PROJECT_VERSION = 65;
10521052
DEVELOPMENT_ASSET_PATHS = "\"Support/Preview Content\"";
10531053
DEVELOPMENT_TEAM = "";
10541054
"DEVELOPMENT_TEAM[sdk=macosx*]" = 98LJ4XBGYK;

src/Support/AppDelegate.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
135135
defaults.addObserver(self, forKeyPath: "PasswordExpiryLimit", options: .new, context: nil)
136136
defaults.addObserver(self, forKeyPath: "OpenAtLogin", options: .new, context: nil)
137137
restrictionsDefaults?.addObserver(self, forKeyPath: "forceDelayedMajorSoftwareUpdates", options: .new, context: nil)
138-
ASUdefaults?.addObserver(self, forKeyPath: "LastUpdatesAvailable", options: .new, context: nil)
138+
// ASUdefaults?.addObserver(self, forKeyPath: "LastUpdatesAvailable", options: .new, context: nil)
139139
ASUdefaults?.addObserver(self, forKeyPath: "RecommendedUpdates", options: .new, context: nil)
140140

141141
// Observe changes for Extensions A and B
@@ -157,8 +157,8 @@ class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
157157
// Receive notification after password expiry check
158158
NotificationCenter.default.addObserver(self, selector: #selector(setStatusBarIcon), name: Notification.Name.passwordExpiryLimit, object: nil)
159159

160-
// Receive notification after major macOS update check
161-
NotificationCenter.default.addObserver(self, selector: #selector(setStatusBarIcon), name: Notification.Name.majorVersionUpdates, object: nil)
160+
// Receive notification after macOS update check
161+
NotificationCenter.default.addObserver(self, selector: #selector(setStatusBarIcon), name: Notification.Name.recommendedUpdates, object: nil)
162162

163163
// Run functions at startup
164164
runAtStartup()
@@ -337,12 +337,12 @@ class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
337337
// Check if StatusBarItem notifier is enabled
338338
if defaults.bool(forKey: "StatusBarIconNotifierEnabled") {
339339
// Show notification badge in menu bar icon when info item when needed
340-
if ((computerinfo.updatesAvailableToShow == 0 || !infoItemsEnabled.contains("MacOSVersion")) && (appCatalogController.appUpdates == 0 || !infoItemsEnabled.contains("AppCatalog"))) && ((computerinfo.uptimeLimitReached && infoItemsEnabled.contains("Uptime")) || (computerinfo.selfSignedIP && infoItemsEnabled.contains("Network")) || (userinfo.passwordExpiryLimitReached && infoItemsEnabled.contains("Password")) || (computerinfo.storageLimitReached && infoItemsEnabled.contains("Storage")) || (preferences.extensionAlertA && infoItemsEnabled.contains("ExtensionA")) || (preferences.extensionAlertB && infoItemsEnabled.contains("ExtensionB"))) {
340+
if ((computerinfo.recommendedUpdates.count == 0 || !infoItemsEnabled.contains("MacOSVersion")) && (appCatalogController.appUpdates == 0 || !infoItemsEnabled.contains("AppCatalog"))) && ((computerinfo.uptimeLimitReached && infoItemsEnabled.contains("Uptime")) || (computerinfo.selfSignedIP && infoItemsEnabled.contains("Network")) || (userinfo.passwordExpiryLimitReached && infoItemsEnabled.contains("Password")) || (computerinfo.storageLimitReached && infoItemsEnabled.contains("Storage")) || (preferences.extensionAlertA && infoItemsEnabled.contains("ExtensionA")) || (preferences.extensionAlertB && infoItemsEnabled.contains("ExtensionB"))) {
341341

342342
// Create orange notification badge
343343
orangeBadge.isHidden = false
344344

345-
} else if (computerinfo.updatesAvailableToShow > 0 && infoItemsEnabled.contains("MacOSVersion")) || (appCatalogController.appUpdates > 0 && infoItemsEnabled.contains("AppCatalog")) {
345+
} else if (computerinfo.recommendedUpdates.count > 0 && infoItemsEnabled.contains("MacOSVersion")) || (appCatalogController.appUpdates > 0 && infoItemsEnabled.contains("AppCatalog")) {
346346

347347
// Create red notification badge
348348
redBadge.isHidden = false
@@ -439,8 +439,8 @@ class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
439439
Task {
440440
await self.userinfo.getCurrentUserRecord()
441441
}
442-
case "LastUpdatesAvailable":
443-
logger.debug("\(keyPath! as NSObject, privacy: .public) changed to \(self.ASUdefaults!.integer(forKey: "LastUpdatesAvailable"), privacy: .public)")
442+
// case "LastUpdatesAvailable":
443+
// logger.debug("\(keyPath! as NSObject, privacy: .public) changed to \(self.ASUdefaults!.integer(forKey: "LastUpdatesAvailable"), privacy: .public)")
444444
case "RecommendedUpdates":
445445
logger.debug("\(keyPath! as NSObject, privacy: .public) changed, checking update contents...")
446446
self.computerinfo.getRecommendedUpdates()

src/Support/ComputerInfo.swift

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,19 @@ class ComputerInfo: ObservableObject {
6868
var modelIdentifier = String()
6969

7070
// Get Available Software Updates
71-
@AppStorage("LastUpdatesAvailable", store: UserDefaults(suiteName: "com.apple.SoftwareUpdate")) var updatesAvailable: Int = 0
71+
// @AppStorage("LastUpdatesAvailable", store: UserDefaults(suiteName: "com.apple.SoftwareUpdate")) var updatesAvailable: Int = 0
7272

7373
// Number of major macOS Software Updates
7474
@Published var majorVersionUpdates: Int = 0
7575

7676
// Calculate number of updates to show, excluding any major upgrades if hidden using 'forceDelayedMajorSoftwareUpdates' in a restrictions profile
77-
var updatesAvailableToShow: Int {
78-
if forceDelayedMajorSoftwareUpdates {
79-
return updatesAvailable - majorVersionUpdates
80-
} else {
81-
return updatesAvailable
82-
}
83-
}
77+
// var updatesAvailableToShow: Int {
78+
// if forceDelayedMajorSoftwareUpdates {
79+
// return updatesAvailable - majorVersionUpdates
80+
// } else {
81+
// return updatesAvailable
82+
// }
83+
// }
8484

8585
// Get if major OS updates are deferred using a restrictions profile
8686
@AppStorage("forceDelayedMajorSoftwareUpdates", store: UserDefaults(suiteName: "com.apple.applicationaccess")) var forceDelayedMajorSoftwareUpdates: Bool = false
@@ -680,6 +680,7 @@ class ComputerInfo: ObservableObject {
680680
// Remove all updates from UI
681681
DispatchQueue.main.async {
682682
self.recommendedUpdates = []
683+
NotificationCenter.default.post(name: Notification.Name.recommendedUpdates, object: nil)
683684
}
684685

685686
return
@@ -723,11 +724,7 @@ class ComputerInfo: ObservableObject {
723724
self.recommendedUpdates = decodedItems
724725

725726
// Post changes to notification center
726-
if oldMajorVersionUpdates != majorVersionUpdatesTemp {
727-
NotificationCenter.default.post(name: Notification.Name.majorVersionUpdates, object: nil)
728-
} else {
729-
self.logger.debug("Number of Major macOS Updates did not change, no need to reload StatusBarItem")
730-
}
727+
NotificationCenter.default.post(name: Notification.Name.recommendedUpdates, object: nil)
731728
}
732729
}
733730
}

src/Support/Extensions/Extensions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ extension String {
163163
("$LocalMacosVersionName", computerInfo.macOSVersionName),
164164
("$LocalSerialNumber", computerInfo.deviceSerialNumber),
165165
("$LocalIpAddress", computerInfo.ipAddress),
166-
("$LocalUpdatesAvailable", "\(computerInfo.updatesAvailableToShow)"),
166+
("$LocalUpdatesAvailable", "\(computerInfo.recommendedUpdates.count)"),
167167
("\\n", "\n")
168168
]
169169

src/Support/Info.plist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717
<key>CFBundlePackageType</key>
1818
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>2.6.1</string>
20+
<string>2.6.2</string>
2121
<key>CFBundleVersion</key>
22-
<string>64</string>
22+
<string>65</string>
2323
<key>LSApplicationCategoryType</key>
2424
<string>public.app-category.utilities</string>
2525
<key>LSMinimumSystemVersion</key>
2626
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
2727
<key>LSUIElement</key>
2828
<true/>
2929
<key>NSHumanReadableCopyright</key>
30-
<string>© 2024 Root3 B.V. All rights reserved.</string>
30+
<string>© 2025 Root3 B.V. All rights reserved.</string>
3131
<key>NSMainStoryboardFile</key>
3232
<string>Main</string>
3333
<key>NSPrincipalClass</key>

src/Support/NotificationNames.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ extension Notification.Name {
1414
static let storageLimit = Notification.Name("StorageLimit")
1515
static let networkState = Notification.Name("NetworkState")
1616
static let passwordExpiryLimit = Notification.Name("PasswordExpiryLimit")
17-
static let majorVersionUpdates = Notification.Name("MajorVersionUpdates")
17+
static let recommendedUpdates = Notification.Name("RecommendedUpdates")
1818

1919
}

src/Support/Views/ButtonViews/MacOSVersionSubview.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct MacOSVersionSubview: View {
3737

3838
var body: some View {
3939

40-
InfoItem(title: "macOS \(computerinfo.macOSVersionName)", subtitle: computerinfo.macOSVersion, image: "applelogo", symbolColor: Color(NSColor(hex: "\(customColor)") ?? NSColor.controlAccentColor), notificationBadge: computerinfo.updatesAvailableToShow, hoverEffectEnable: true)
40+
InfoItem(title: "macOS \(computerinfo.macOSVersionName)", subtitle: computerinfo.macOSVersion, image: "applelogo", symbolColor: Color(NSColor(hex: "\(customColor)") ?? NSColor.controlAccentColor), notificationBadge: computerinfo.recommendedUpdates.count, hoverEffectEnable: true)
4141
.modify {
4242
if #available(macOS 13, *) {
4343
$0.onTapGesture {
@@ -51,7 +51,7 @@ struct MacOSVersionSubview: View {
5151
}
5252
// Legacy popover for macOS 12
5353
.popover(isPresented: $showUpdatePopover, arrowEdge: .leading) {
54-
UpdateViewLegacy(updateCounter: computerinfo.updatesAvailableToShow, color: Color(NSColor(hex: "\(customColor)") ?? NSColor.controlAccentColor))
54+
UpdateViewLegacy(updateCounter: computerinfo.recommendedUpdates.count, color: Color(NSColor(hex: "\(customColor)") ?? NSColor.controlAccentColor))
5555
}
5656
}
5757
}

src/SupportHelper/Info.plist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
<plist version="1.0">
44
<dict>
55
<key>CFBundleShortVersionString</key>
6-
<string>2.6.1</string>
6+
<string>2.6.2</string>
77
<key>NSHumanReadableCopyright</key>
8-
<string>© 2024 Root3 B.V. All rights reserved.</string>
8+
<string>© 2025 Root3 B.V. All rights reserved.</string>
99
<key>CFBundleIdentifier</key>
1010
<string>nl.root3.support.helper</string>
1111
<key>CFBundleInfoDictionaryVersion</key>
1212
<string>6.0</string>
1313
<key>CFBundleName</key>
1414
<string>SupportAppPriviligedHelper</string>
1515
<key>CFBundleVersion</key>
16-
<string>64</string>
16+
<string>65</string>
1717
<key>SMAuthorizedClients</key>
1818
<array>
1919
<string>anchor apple generic and identifier &quot;nl.root3.support&quot; and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = &quot;98LJ4XBGYK&quot;)</string>

src/SupportXPC/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<plist version="1.0">
44
<dict>
55
<key>CFBundleShortVersionString</key>
6-
<string>2.6.1</string>
6+
<string>2.6.2</string>
77
<key>CFBundleIdentifier</key>
88
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
99
<key>CFBundleName</key>
@@ -15,7 +15,7 @@
1515
<key>CFBundleExecutable</key>
1616
<string>$(EXECUTABLE_NAME)</string>
1717
<key>CFBundleVersion</key>
18-
<string>64</string>
18+
<string>65</string>
1919
<key>CFBundlePackageType</key>
2020
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
2121
<key>XPCService</key>

0 commit comments

Comments
 (0)