Skip to content

Commit c806e44

Browse files
v2.6.4 (#236)
* Add macOS Tahoe string Add macOS Tahoe string * Fix images from URL on macOS 26 Fix images from URL on macOS 26. The notifications (in About Windows) and menu bar icon now successfully work again on macOS 26. * Version bump to 2.6.4 Version bump to 2.6.4 * Bump build number to 67 * App Catalog observation improvements App Catalog observation improvements with version 1.7.0 * Bump build number to 68 * Check updates improvements Check updates improvements * Bump build number to 69 * App Catalog update reliability improvements App Catalog update reliability improvements * Bump build number to 70 * GitHub Action for alpha releases GitHub Action for alpha releases with Xcode beta * Bump build number to 71 * Swedish localization added Swedish localization added. Thanks to @daniarv * Bump build number to 72 * Update Localizable.strings * Bump build number to 73 * Migrate Storyboard to SwiftUI lifecycle Migrate Storyboard to SwiftUI lifecycle * Auto-resizing fix macOS 26 Auto-resizing fix macOS 26 * Bump build number to 74 * Remove duplicate observer Remove duplicate observer * Bump build number to 75 * Bump build number to 76 * Minor log improvement Minor log improvement * Bump build number to 77 --------- Co-authored-by: GitHub Action <action@github.com>
1 parent 344432b commit c806e44

13 files changed

Lines changed: 153 additions & 739 deletions

File tree

src/Support.xcodeproj/project.pbxproj

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
0A4A7388260208B500927DAB /* UptimeSubview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A4A7387260208B500927DAB /* UptimeSubview.swift */; };
1616
0A4A738B26020A3800927DAB /* ComputerNameSubview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A4A738A26020A3800927DAB /* ComputerNameSubview.swift */; };
1717
0A4A738E26020A6500927DAB /* MacOSVersionSubview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A4A738D26020A6500927DAB /* MacOSVersionSubview.swift */; };
18+
0A94A3832E3D0880001BB59E /* SupportApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A94A3822E3D0880001BB59E /* SupportApp.swift */; };
1819
0AC50A7524FFE6E100AE62D0 /* EventMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AC50A7424FFE6E000AE62D0 /* EventMonitor.swift */; };
1920
0AFB04FB263AC23000507B23 /* ModelSubView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AFB04FA263AC23000507B23 /* ModelSubView.swift */; };
2021
0AFB04FD263B422900507B23 /* ItemDouble.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AFB04FC263B422900507B23 /* ItemDouble.swift */; };
@@ -70,7 +71,6 @@
7071
49822CE524B4C3F100E8DE54 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49822CE424B4C3F100E8DE54 /* ContentView.swift */; };
7172
49822CE724B4C3F200E8DE54 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 49822CE624B4C3F200E8DE54 /* Assets.xcassets */; };
7273
49822CEA24B4C3F200E8DE54 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 49822CE924B4C3F200E8DE54 /* Preview Assets.xcassets */; };
73-
49822CED24B4C3F200E8DE54 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 49822CEB24B4C3F200E8DE54 /* Main.storyboard */; };
7474
49857E9824D4B543009B6FBA /* Preferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49857E9724D4B543009B6FBA /* Preferences.swift */; };
7575
49857E9A24D4B58B009B6FBA /* ComputerInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49857E9924D4B58B009B6FBA /* ComputerInfo.swift */; };
7676
49871A6F287CC98500715C7C /* HeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49871A6E287CC98500715C7C /* HeaderView.swift */; };
@@ -158,6 +158,8 @@
158158
0A4A7387260208B500927DAB /* UptimeSubview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UptimeSubview.swift; sourceTree = "<group>"; };
159159
0A4A738A26020A3800927DAB /* ComputerNameSubview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComputerNameSubview.swift; sourceTree = "<group>"; };
160160
0A4A738D26020A6500927DAB /* MacOSVersionSubview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MacOSVersionSubview.swift; sourceTree = "<group>"; };
161+
0A65A36A2E45E9CB005F268F /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Localizable.strings; sourceTree = "<group>"; };
162+
0A94A3822E3D0880001BB59E /* SupportApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SupportApp.swift; sourceTree = "<group>"; };
161163
0AC50A7424FFE6E000AE62D0 /* EventMonitor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventMonitor.swift; sourceTree = "<group>"; };
162164
0AFB04FA263AC23000507B23 /* ModelSubView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelSubView.swift; sourceTree = "<group>"; };
163165
0AFB04FC263B422900507B23 /* ItemDouble.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemDouble.swift; sourceTree = "<group>"; };
@@ -216,7 +218,6 @@
216218
49822CE424B4C3F100E8DE54 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
217219
49822CE624B4C3F200E8DE54 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
218220
49822CE924B4C3F200E8DE54 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
219-
49822CEC24B4C3F200E8DE54 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
220221
49822CEE24B4C3F200E8DE54 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
221222
49822CEF24B4C3F200E8DE54 /* Support.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Support.entitlements; sourceTree = "<group>"; };
222223
49857E9724D4B543009B6FBA /* Preferences.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Preferences.swift; sourceTree = "<group>"; };
@@ -416,12 +417,12 @@
416417
49BF03FB2BC0BE3A00AB7152 /* FileUtilities.swift */,
417418
49857E9924D4B58B009B6FBA /* ComputerInfo.swift */,
418419
0AC50A7424FFE6E000AE62D0 /* EventMonitor.swift */,
420+
0A94A3822E3D0880001BB59E /* SupportApp.swift */,
419421
49D81F5A2BF2BE7300232100 /* Extensions */,
420422
496C2FE0271477B800D51EE1 /* NotificationNames.swift */,
421423
49857E9724D4B543009B6FBA /* Preferences.swift */,
422424
496FE4D02651485E007746ED /* UserInfo.swift */,
423425
49822CE624B4C3F200E8DE54 /* Assets.xcassets */,
424-
49822CEB24B4C3F200E8DE54 /* Main.storyboard */,
425426
49822CEE24B4C3F200E8DE54 /* Info.plist */,
426427
49822CEF24B4C3F200E8DE54 /* Support.entitlements */,
427428
49822CE824B4C3F200E8DE54 /* Preview Content */,
@@ -578,6 +579,7 @@
578579
fr,
579580
de,
580581
es,
582+
sv,
581583
);
582584
mainGroup = 49822CD624B4C3F100E8DE54;
583585
packageReferences = (
@@ -605,7 +607,6 @@
605607
isa = PBXResourcesBuildPhase;
606608
buildActionMask = 2147483647;
607609
files = (
608-
49822CED24B4C3F200E8DE54 /* Main.storyboard in Resources */,
609610
4962F3B22C0C8C5F004571DC /* uninstall_privileged_helper_tool.zsh in Resources */,
610611
0AFE0A8325014C6100957B52 /* Localizable.strings in Resources */,
611612
49822CEA24B4C3F200E8DE54 /* Preview Assets.xcassets in Resources */,
@@ -706,6 +707,7 @@
706707
4915291C259CD38800056B5F /* EffectsView.swift in Sources */,
707708
0A446D572683A40600667602 /* WelcomeScreenView.swift in Sources */,
708709
495F74EC28B39A9A00C20304 /* PopoverAlertView.swift in Sources */,
710+
0A94A3832E3D0880001BB59E /* SupportApp.swift in Sources */,
709711
);
710712
runOnlyForDeploymentPostprocessing = 0;
711713
};
@@ -733,18 +735,11 @@
733735
49B163AC26FCB154006D57C7 /* fr */,
734736
A0532BCB2733F35A005CACF2 /* de */,
735737
495B6E6E2A2E3E4E006B575D /* es */,
738+
0A65A36A2E45E9CB005F268F /* sv */,
736739
);
737740
name = Localizable.strings;
738741
sourceTree = "<group>";
739742
};
740-
49822CEB24B4C3F200E8DE54 /* Main.storyboard */ = {
741-
isa = PBXVariantGroup;
742-
children = (
743-
49822CEC24B4C3F200E8DE54 /* Base */,
744-
);
745-
name = Main.storyboard;
746-
sourceTree = "<group>";
747-
};
748743
/* End PBXVariantGroup section */
749744

750745
/* Begin XCBuildConfiguration section */
@@ -758,7 +753,7 @@
758753
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
759754
CODE_SIGN_STYLE = Manual;
760755
CREATE_INFOPLIST_SECTION_IN_BINARY = YES;
761-
CURRENT_PROJECT_VERSION = 66;
756+
CURRENT_PROJECT_VERSION = 77;
762757
DEAD_CODE_STRIPPING = YES;
763758
DEVELOPMENT_TEAM = "";
764759
"DEVELOPMENT_TEAM[sdk=macosx*]" = 98LJ4XBGYK;
@@ -797,7 +792,7 @@
797792
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
798793
CODE_SIGN_STYLE = Manual;
799794
CREATE_INFOPLIST_SECTION_IN_BINARY = YES;
800-
CURRENT_PROJECT_VERSION = 66;
795+
CURRENT_PROJECT_VERSION = 77;
801796
DEAD_CODE_STRIPPING = YES;
802797
DEVELOPMENT_TEAM = "";
803798
"DEVELOPMENT_TEAM[sdk=macosx*]" = 98LJ4XBGYK;
@@ -834,7 +829,7 @@
834829
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
835830
CODE_SIGN_STYLE = Manual;
836831
COMBINE_HIDPI_IMAGES = YES;
837-
CURRENT_PROJECT_VERSION = 66;
832+
CURRENT_PROJECT_VERSION = 77;
838833
DEVELOPMENT_TEAM = "";
839834
"DEVELOPMENT_TEAM[sdk=macosx*]" = 98LJ4XBGYK;
840835
ENABLE_HARDENED_RUNTIME = YES;
@@ -867,7 +862,7 @@
867862
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
868863
CODE_SIGN_STYLE = Manual;
869864
COMBINE_HIDPI_IMAGES = YES;
870-
CURRENT_PROJECT_VERSION = 66;
865+
CURRENT_PROJECT_VERSION = 77;
871866
DEVELOPMENT_TEAM = "";
872867
"DEVELOPMENT_TEAM[sdk=macosx*]" = 98LJ4XBGYK;
873868
ENABLE_HARDENED_RUNTIME = YES;
@@ -1018,7 +1013,7 @@
10181013
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
10191014
CODE_SIGN_STYLE = Manual;
10201015
COMBINE_HIDPI_IMAGES = YES;
1021-
CURRENT_PROJECT_VERSION = 66;
1016+
CURRENT_PROJECT_VERSION = 77;
10221017
DEVELOPMENT_ASSET_PATHS = "\"Support/Preview Content\"";
10231018
DEVELOPMENT_TEAM = "";
10241019
"DEVELOPMENT_TEAM[sdk=macosx*]" = 98LJ4XBGYK;
@@ -1052,7 +1047,7 @@
10521047
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
10531048
CODE_SIGN_STYLE = Manual;
10541049
COMBINE_HIDPI_IMAGES = YES;
1055-
CURRENT_PROJECT_VERSION = 66;
1050+
CURRENT_PROJECT_VERSION = 77;
10561051
DEVELOPMENT_ASSET_PATHS = "\"Support/Preview Content\"";
10571052
DEVELOPMENT_TEAM = "";
10581053
"DEVELOPMENT_TEAM[sdk=macosx*]" = 98LJ4XBGYK;

src/Support/AppDelegate.swift

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import SwiftUI
1212

1313
// Popover is based on: https://medium.com/@acwrightdesign/creating-a-macos-menu-bar-application-using-swiftui-54572a5d5f87
1414

15-
@NSApplicationMain
15+
//@NSApplicationMain
1616
class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
1717

1818
var popover: NSPopover!
@@ -135,16 +135,12 @@ 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)
139138
ASUdefaults?.addObserver(self, forKeyPath: "RecommendedUpdates", options: .new, context: nil)
140139

141140
// Observe changes for Extensions A and B
142141
defaults.addObserver(self, forKeyPath: "ExtensionAlertA", options: .new, context: nil)
143142
defaults.addObserver(self, forKeyPath: "ExtensionAlertB", options: .new, context: nil)
144143

145-
// Observe changes for App Catalog
146-
catalogDefaults?.addObserver(self, forKeyPath: "Updates", options: .new, context: nil)
147-
148144
// Receive notifications after uptime check
149145
NotificationCenter.default.addObserver(self, selector: #selector(setStatusBarIcon), name: Notification.Name.uptimeDaysLimit, object: nil)
150146

@@ -160,6 +156,15 @@ class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
160156
// Receive notification after macOS update check
161157
NotificationCenter.default.addObserver(self, selector: #selector(setStatusBarIcon), name: Notification.Name.recommendedUpdates, object: nil)
162158

159+
// Decode app updates and reload status bar item when Catalog Agent or App completed an update check
160+
DistributedNotificationCenter.default().addObserver(forName: Notification.Name.updateCheckCompleted, object: nil, queue: .main) { _ in
161+
// Decode app updates
162+
self.appCatalogController.decodeAppUpdates()
163+
164+
// Reload Status bar icon
165+
self.setStatusBarIcon()
166+
}
167+
163168
// Run functions at startup
164169
runAtStartup()
165170

@@ -439,8 +444,6 @@ class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
439444
Task {
440445
await self.userinfo.getCurrentUserRecord()
441446
}
442-
// case "LastUpdatesAvailable":
443-
// logger.debug("\(keyPath! as NSObject, privacy: .public) changed to \(self.ASUdefaults!.integer(forKey: "LastUpdatesAvailable"), privacy: .public)")
444447
case "RecommendedUpdates":
445448
logger.debug("\(keyPath! as NSObject, privacy: .public) changed, checking update contents...")
446449
self.computerinfo.getRecommendedUpdates()
@@ -454,13 +457,6 @@ class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
454457
logger.debug("\(keyPath! as NSObject, privacy: .public) changed to \(self.preferences.extensionAlertA, privacy: .public)")
455458
case "ExtensionAlertB":
456459
logger.debug("\(keyPath! as NSObject, privacy: .public) changed to \(self.preferences.extensionAlertB, privacy: .public)")
457-
case "Updates":
458-
if appCatalogController.ignoreUpdateChange {
459-
appCatalogController.ignoreUpdateChange.toggle()
460-
} else {
461-
logger.debug("\(keyPath! as NSObject, privacy: .public) changed to \(self.appCatalogController.appUpdates, privacy: .public)")
462-
appCatalogController.getAppUpdates()
463-
}
464460
default:
465461
logger.debug("Some other change detected...")
466462
}
@@ -767,21 +763,20 @@ class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
767763
guard let url = URL(string: url) else {
768764
return nil
769765
}
770-
766+
771767
// Path to App Sandbox container
772-
guard let container = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "nl.root3.support") else {
768+
let paths = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)
769+
guard let documentsFolder = paths.first else {
773770
return nil
774771
}
775-
776-
let documentsFolder = container.appendingPathComponent("Documents", isDirectory: true)
777772
let fileURL = documentsFolder.appendingPathComponent("\(filename).\(url.pathExtension)")
778773

779774
// Remove file if it already exists
780775
if FileManager.default.fileExists(atPath: fileURL.path) {
781776

782777
// Just return the URL and avoid downloading the image again
783778
if !newURL {
784-
logger.debug("URL for \(logName) is unchanged, no need to download image again")
779+
logger.debug("URL for \(logName, privacy: .public) is unchanged, no need to download image again")
785780
return fileURL
786781
}
787782

@@ -793,7 +788,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
793788
}
794789
}
795790

796-
logger.debug("Downloading remote \(logName) from URL")
791+
logger.debug("Downloading remote \(logName, privacy: .public) from URL")
797792

798793
// Create a semaphore to wait for the file removal
799794
let semaphore = DispatchSemaphore(value: 0)

0 commit comments

Comments
 (0)