From b2fa3126587b7e5b7eaa2b2682edb57e1bb318e3 Mon Sep 17 00:00:00 2001
From: Brent Simmons
Date: Mon, 11 Aug 2025 17:29:44 -0700
Subject: [PATCH 01/25] Bump version and build.
---
xcconfig/common/NetNewsWire_mac_target_common.xcconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xcconfig/common/NetNewsWire_mac_target_common.xcconfig b/xcconfig/common/NetNewsWire_mac_target_common.xcconfig
index 541b6d663..96c9be733 100644
--- a/xcconfig/common/NetNewsWire_mac_target_common.xcconfig
+++ b/xcconfig/common/NetNewsWire_mac_target_common.xcconfig
@@ -1,6 +1,6 @@
// High Level Settings common to both the Mac application and any extensions we bundle with it
-MARKETING_VERSION = 6.1.10b2
-CURRENT_PROJECT_VERSION = 6137
+MARKETING_VERSION = 6.1.10b3
+CURRENT_PROJECT_VERSION = 6138
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
From 823ea794399572dfcc0350fd3387305640b44a13 Mon Sep 17 00:00:00 2001
From: Brent Simmons
Date: Tue, 12 Aug 2025 09:48:38 -0700
Subject: [PATCH 02/25] Write change notes for Mac 6.1.10b3.
---
Technotes/ReleaseNotes-Mac.markdown | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Technotes/ReleaseNotes-Mac.markdown b/Technotes/ReleaseNotes-Mac.markdown
index 2c34a2b17..fe0605c80 100644
--- a/Technotes/ReleaseNotes-Mac.markdown
+++ b/Technotes/ReleaseNotes-Mac.markdown
@@ -1,5 +1,9 @@
# Mac Release Notes
+### 6.1.10b3 build 6138 11 Aug 2025 - branch main tag: mac-6.1.10b3
+
+Fixed bug, introduced in previous test build, that prevented choosing an OPML file to import
+
### 6.1.10b2 build 6137 13 May 2025 - branch main tag: mac-6.1.10b2
Fixed bug, introduced in previous test build, that prevented adding a Feedly account
From 145c47ba71bb6dd2b38c51ec5d5c41d575d3130c Mon Sep 17 00:00:00 2001
From: Brent Simmons
Date: Tue, 12 Aug 2025 10:25:02 -0700
Subject: [PATCH 03/25] Update appcast for 6.1.10b3.
---
Appcasts/netnewswire-beta.xml | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/Appcasts/netnewswire-beta.xml b/Appcasts/netnewswire-beta.xml
index 44d7cc899..383069014 100755
--- a/Appcasts/netnewswire-beta.xml
+++ b/Appcasts/netnewswire-beta.xml
@@ -6,6 +6,18 @@
Most recent NetNewsWire changes with links to updates.
en
+ -
+ NetNewsWire 6.1.10b3
+
+Fixed bug, introduced in previous test build, that prevented choosing an OPML file to import
+
+ ]]>
+ Tue, 12 Aug 2025 10:10:00 -0700
+
+ 13.0
+
+
-
NetNewsWire 6.1.10b2
Date: Tue, 12 Aug 2025 10:42:43 -0700
Subject: [PATCH 04/25] Move how-to Mac Sparkle release from personal notes to
Technotes.
---
Technotes/How To Do Mac Sparkle Release.md | 57 ++++++++++++++++++++++
1 file changed, 57 insertions(+)
create mode 100644 Technotes/How To Do Mac Sparkle Release.md
diff --git a/Technotes/How To Do Mac Sparkle Release.md b/Technotes/How To Do Mac Sparkle Release.md
new file mode 100644
index 000000000..32b325f25
--- /dev/null
+++ b/Technotes/How To Do Mac Sparkle Release.md
@@ -0,0 +1,57 @@
+# How To Do Mac Sparkle Release
+
+NetNewsWire_mac_target_common.xcconfig
+ update MARKETING_VERSION and CURRENT_PROJECT_VERSION
+
+ReleaseNotes-Mac.markdown
+main branch
+Write change notes in notes
+Include branch and tag
+
+Run buildscripts/quiet_build_and_test.sh
+
+Make sure there are no outstanding changes
+
+Archive build
+Developer ID distribution - notarize
+Wait while processing
+
+Export
+Smoke test
+
+On main: update Technotes/Status.md
+commit
+
+Tag the app:
+git tag mac-6.1.5b4
+
+Push:
+git push origin mac-6.1.5b4
+
+Find tag in GitHub - https://github.com/Ranchero-Software/NetNewsWire/tags
+Turn into release — NetNewsWire 6.1.5b4 for Mac
+Add change notes
+Zip app - NetNewsWire6.1.5b4.zip
+Upload binary to release
+Publish release
+Copy file to releases archive — iCloud Drive/Archive/Releases/
+
+Update Appcast on main branch
+ Add changes
+ Update title
+ Update pubDate
+ Update enclosure URL
+ Update version
+ Update file size - length
+
+Run xmllint on appcast
+ xmllint --noout netnewswire-beta.xml
+
+Upload appcast
+Commit and push git change
+
+Test updating via appcast
+
+Optionally:
+Announce on Slack
+Announce on blog
From b5fd7f070f035384d12762cdaa4c4371cc785d7e Mon Sep 17 00:00:00 2001
From: Brent Simmons
Date: Tue, 12 Aug 2025 10:44:46 -0700
Subject: [PATCH 05/25] Move how-to iOS TestFlight release from personal notes
to Technotes.
---
Technotes/How To Do iOS TestFlight Release.md | 74 +++++++++++++++++++
1 file changed, 74 insertions(+)
create mode 100644 Technotes/How To Do iOS TestFlight Release.md
diff --git a/Technotes/How To Do iOS TestFlight Release.md b/Technotes/How To Do iOS TestFlight Release.md
new file mode 100644
index 000000000..e73d03c94
--- /dev/null
+++ b/Technotes/How To Do iOS TestFlight Release.md
@@ -0,0 +1,74 @@
+# How To Do iOS TestFlight Release
+
+Be sure to have updated code and be *on correct branch*
+
+## Edit Build Version
+
+NetNewsWire_ios_target_common.xcconfig
+
+Possibly bump MARKETING_VERSION
+Increment CURRENT_PROJECT_VERSION by 1 (usually)
+
+Commit change.
+
+## Test
+
+Run buildscripts/quiet_build_and_test.sh to be sure all platforms build and tests pass.
+
+Build and run app on device
+
+Smoke test
+If it fails, bail.
+Check in and push changes.
+
+## Create Release Notes
+
+On main:
+
+ReleaseNotes-iOS.markdown
+
+Go to milestone and find closed bugs since last release notes
+Add to iOS Release Notes note
+
+Write release notes
+
+Commit change.
+
+## Archive and Upload
+
+Archive
+Distribute to TestFlight
+
+## Status
+
+Update NetNewsWire Status doc in Technotes
+Commit
+
+## Tag
+
+On branch (or on main, if working on main):
+
+Use SemVer with tags
+Tag the app: git tag iOS-6.1.5-6124
+Push: git push origin iOS-6.1.5-6124
+
+## Release the app
+
+In AppStoreConnect add groups and release the app
+Paste in the release notes
+Announce in Slack
+Optionally blog about it
+
+## GitHub release
+
+Make new release from tag
+
+https://github.com/Ranchero-Software/NetNewsWire/tags
+
+Example title:
+NetNewsWire 6.1.6 (6140) for iOS - TestFlight
+
+## Notes
+
+Public TestFlight link:
+https://testflight.apple.com/join/wpedPMRR
From 5d895a57e363104f2f1da09ee34c948d77bb8e42 Mon Sep 17 00:00:00 2001
From: Brent Simmons
Date: Tue, 12 Aug 2025 10:45:58 -0700
Subject: [PATCH 06/25] Move how-to iOS AppStore release from personal notes to
Technotes.
---
Technotes/How To Do iOS App Store Release.md | 29 ++++++++++++++++++++
1 file changed, 29 insertions(+)
create mode 100644 Technotes/How To Do iOS App Store Release.md
diff --git a/Technotes/How To Do iOS App Store Release.md b/Technotes/How To Do iOS App Store Release.md
new file mode 100644
index 000000000..993f91fd9
--- /dev/null
+++ b/Technotes/How To Do iOS App Store Release.md
@@ -0,0 +1,29 @@
+# How To Do App Store Release
+
+Write release notes in ReleaseNotes-iOS.markdown on main
+Commit release notes
+
+Tag the app if needed:
+
+ git tag iOS-6.1.9
+ git push origin iOS-6.1.9
+
+Click + near iOS App
+Type in new version name
+Scroll way down to Build section and choose the build (latest TestFlight build, presumably)
+Fill in What’s New text
+Click Save at top of screen
+Click Add for Review next to Save
+
+On next screen, click Submit to App Review
+
+Make new release from tag
+
+https://github.com/Ranchero-Software/NetNewsWire/tags
+
+Example title:
+NetNewsWire 6.1.6 (6140) for iOS - AppStore
+
+Announce on Slack
+Announce on NetNewsWire blog
+Optionally announce on inessential
From e5443e5e1e06c0677373da35059c78bb3ded39ae Mon Sep 17 00:00:00 2001
From: Brent Simmons
Date: Tue, 12 Aug 2025 11:07:08 -0700
Subject: [PATCH 07/25] Move status document from personal notes to Technotes.
---
Technotes/Status.md | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 Technotes/Status.md
diff --git a/Technotes/Status.md b/Technotes/Status.md
new file mode 100644
index 000000000..caa2596c5
--- /dev/null
+++ b/Technotes/Status.md
@@ -0,0 +1,21 @@
+# NetNewsWire Status
+
+Current milestone: NetNewsWire 6.1.10
+ https://github.com/Ranchero-Software/NetNewsWire/milestone/60
+
+Current bug: Mac restoration issues
+ https://github.com/Ranchero-Software/NetNewsWire/issues/4589
+
+## iOS
+
+iOS shipping: 6.1.9 (6197)
+
+TestFlight: 6.1.10 (6198)
+ https://github.com/Ranchero-Software/NetNewsWire/releases/tag/iOS-6.1.10-6198
+
+## Mac
+
+Mac shipping: 6.1.9
+
+Beta: 6.1.10b3
+ https://github.com/Ranchero-Software/NetNewsWire/releases/tag/mac-6.1.10b3
From 17860b72f5f0d451de9cccc471a1a6a671379d5a Mon Sep 17 00:00:00 2001
From: Maurice Parker
Date: Sat, 16 Dec 2023 09:32:17 -0600
Subject: [PATCH 08/25] Change Mac state preservation to be NSSecureCoding
compliant
---
Mac/AppDefaults.swift | 4 +-
Mac/AppDelegate.swift | 4 +
.../Detail/DetailViewController.swift | 10 +--
.../Detail/DetailWebViewController.swift | 11 +--
Mac/MainWindow/Detail/DetailWindowState.swift | 33 ++++++++
Mac/MainWindow/MainWindowController.swift | 82 +++++++++----------
Mac/MainWindow/MainWindowState.swift | 50 +++++++++++
.../Sidebar/SidebarViewController.swift | 35 ++++----
.../Sidebar/SidebarWindowState.swift | 37 +++++++++
.../TimelineContainerViewController.swift | 12 +--
.../Timeline/TimelineViewController.swift | 51 ++++++------
.../Timeline/TimelineWindowState.swift | 41 ++++++++++
Shared/UserInfoKey.swift | 10 +--
13 files changed, 263 insertions(+), 117 deletions(-)
create mode 100644 Mac/MainWindow/Detail/DetailWindowState.swift
create mode 100644 Mac/MainWindow/MainWindowState.swift
create mode 100644 Mac/MainWindow/Sidebar/SidebarWindowState.swift
create mode 100644 Mac/MainWindow/Timeline/TimelineWindowState.swift
diff --git a/Mac/AppDefaults.swift b/Mac/AppDefaults.swift
index d4b2ee784..7fffb41b9 100644
--- a/Mac/AppDefaults.swift
+++ b/Mac/AppDefaults.swift
@@ -74,9 +74,9 @@ final class AppDefaults {
return true
}()
- var windowState: [AnyHashable : Any]? {
+ var windowState: Data? {
get {
- return UserDefaults.standard.object(forKey: Key.windowState) as? [AnyHashable : Any]
+ return UserDefaults.standard.object(forKey: Key.windowState) as? Data
}
set {
UserDefaults.standard.set(newValue, forKey: Key.windowState)
diff --git a/Mac/AppDelegate.swift b/Mac/AppDelegate.swift
index e8f3dd76b..c9fa513c4 100644
--- a/Mac/AppDelegate.swift
+++ b/Mac/AppDelegate.swift
@@ -302,6 +302,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
return false
}
+ func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
+ return true
+ }
+
func applicationDidBecomeActive(_ notification: Notification) {
fireOldTimers()
}
diff --git a/Mac/MainWindow/Detail/DetailViewController.swift b/Mac/MainWindow/Detail/DetailViewController.swift
index f096d0f5c..26104663d 100644
--- a/Mac/MainWindow/Detail/DetailViewController.swift
+++ b/Mac/MainWindow/Detail/DetailViewController.swift
@@ -28,6 +28,10 @@ final class DetailViewController: NSViewController, WKUIDelegate {
private lazy var regularWebViewController = createWebViewController()
private var searchWebViewController: DetailWebViewController?
+ var windowState: DetailWindowState {
+ return currentWebViewController.windowState
+ }
+
private var currentWebViewController: DetailWebViewController! {
didSet {
let webview = currentWebViewController.view
@@ -108,12 +112,6 @@ final class DetailViewController: NSViewController, WKUIDelegate {
window.makeFirstResponderUnlessDescendantIsFirstResponder(currentWebViewController.webView)
}
- // MARK: State Restoration
-
- func saveState(to state: inout [AnyHashable : Any]) {
- currentWebViewController.saveState(to: &state)
- }
-
}
// MARK: - DetailWebViewControllerDelegate
diff --git a/Mac/MainWindow/Detail/DetailWebViewController.swift b/Mac/MainWindow/Detail/DetailWebViewController.swift
index 2f82fed78..27bf97937 100644
--- a/Mac/MainWindow/Detail/DetailWebViewController.swift
+++ b/Mac/MainWindow/Detail/DetailWebViewController.swift
@@ -35,6 +35,10 @@ final class DetailWebViewController: NSViewController {
}
}
+ var windowState: DetailWindowState {
+ return DetailWindowState(isShowingExtractedArticle: isShowingExtractedArticle, windowScrollY: windowScrollY ?? 0)
+ }
+
var article: Article? {
switch state {
case .article(let article, _):
@@ -205,13 +209,6 @@ final class DetailWebViewController: NSViewController {
webView.scrollPageUp(sender)
}
- // MARK: State Restoration
-
- func saveState(to state: inout [AnyHashable : Any]) {
- state[UserInfoKey.isShowingExtractedArticle] = isShowingExtractedArticle
- state[UserInfoKey.articleWindowScrollY] = windowScrollY
- }
-
}
// MARK: - WKScriptMessageHandler
diff --git a/Mac/MainWindow/Detail/DetailWindowState.swift b/Mac/MainWindow/Detail/DetailWindowState.swift
new file mode 100644
index 000000000..3fdc0a58a
--- /dev/null
+++ b/Mac/MainWindow/Detail/DetailWindowState.swift
@@ -0,0 +1,33 @@
+//
+// DetailWindowState.swift
+// NetNewsWire
+//
+// Created by Maurice Parker on 12/16/23.
+// Copyright © 2023 Ranchero Software. All rights reserved.
+//
+
+import Foundation
+
+class DetailWindowState: NSObject, NSSecureCoding {
+
+ static var supportsSecureCoding = true
+
+ let isShowingExtractedArticle: Bool
+ let windowScrollY: CGFloat
+
+ internal init(isShowingExtractedArticle: Bool, windowScrollY: CGFloat) {
+ self.isShowingExtractedArticle = isShowingExtractedArticle
+ self.windowScrollY = windowScrollY
+ }
+
+ required init?(coder: NSCoder) {
+ isShowingExtractedArticle = coder.decodeBool(forKey: "isShowingExtractedArticle")
+ windowScrollY = CGFloat(coder.decodeDouble(forKey: "windowScrollY"))
+ }
+
+ func encode(with coder: NSCoder) {
+ coder.encode(isShowingExtractedArticle, forKey: "isShowingExtractedArticle")
+ coder.encode(Double(windowScrollY), forKey: "windowScrollY")
+ }
+
+}
diff --git a/Mac/MainWindow/MainWindowController.swift b/Mac/MainWindow/MainWindowController.swift
index a0b9932c5..76cf62b30 100644
--- a/Mac/MainWindow/MainWindowController.swift
+++ b/Mac/MainWindow/MainWindowController.swift
@@ -130,12 +130,14 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
}
func saveStateToUserDefaults() {
- AppDefaults.shared.windowState = savableState()
+ let data = try? NSKeyedArchiver.archivedData(withRootObject: savableState(), requiringSecureCoding: true)
+ AppDefaults.shared.windowState = data
window?.saveFrame(usingName: windowAutosaveName)
}
func restoreStateFromUserDefaults() {
- if let state = AppDefaults.shared.windowState {
+ if let data = AppDefaults.shared.windowState,
+ let state = try? NSKeyedUnarchiver.unarchivedObject(ofClass: MainWindowState.self, from: data) {
restoreState(from: state)
window?.setFrameUsingName(windowAutosaveName, force: true)
}
@@ -530,7 +532,7 @@ extension MainWindowController: NSWindowDelegate {
}
func window(_ window: NSWindow, didDecodeRestorableState coder: NSCoder) {
- guard let state = try? coder.decodeTopLevelObject(forKey: UserInfoKey.windowState) as? [AnyHashable : Any] else { return }
+ guard let state = coder.decodeObject(of: MainWindowState.self, forKey: UserInfoKey.windowState) else { return }
restoreState(from: state)
}
@@ -949,31 +951,39 @@ private extension MainWindowController {
// MARK: - State Restoration
- func savableState() -> [AnyHashable : Any] {
- var state = [AnyHashable : Any]()
- state[UserInfoKey.windowFullScreenState] = window?.styleMask.contains(.fullScreen) ?? false
- saveSplitViewState(to: &state)
- sidebarViewController?.saveState(to: &state)
- timelineContainerViewController?.saveState(to: &state)
- detailViewController?.saveState(to: &state)
- return state
+ func savableState() -> MainWindowState {
+ let isFullScreen = window?.styleMask.contains(.fullScreen) ?? false
+
+ let splitViewWidths: [Int]
+ if let splitView = splitViewController?.splitView {
+ splitViewWidths = splitView.arrangedSubviews.map{ Int(floor($0.frame.width)) }
+ } else {
+ splitViewWidths = []
+ }
+
+ let isSidebarHidden = sidebarSplitViewItem?.isCollapsed ?? false
+
+ return MainWindowState(isFullScreen: isFullScreen,
+ splitViewWidths: splitViewWidths,
+ isSidebarHidden: isSidebarHidden,
+ sidebarWindowState: sidebarViewController?.windowState,
+ timelineWindowState: timelineContainerViewController?.windowState,
+ detailWindowState: detailViewController?.windowState)
}
- func restoreState(from state: [AnyHashable : Any]) {
- if let fullScreen = state[UserInfoKey.windowFullScreenState] as? Bool, fullScreen {
+ func restoreState(from state: MainWindowState) {
+ if state.isFullScreen {
window?.toggleFullScreen(self)
}
restoreSplitViewState(from: state)
- sidebarViewController?.restoreState(from: state)
+ sidebarViewController?.restoreState(from: state.sidebarWindowState)
- let articleWindowScrollY = state[UserInfoKey.articleWindowScrollY] as? CGFloat
- restoreArticleWindowScrollY = articleWindowScrollY
- timelineContainerViewController?.restoreState(from: state)
-
- let isShowingExtractedArticle = state[UserInfoKey.isShowingExtractedArticle] as? Bool ?? false
+ timelineContainerViewController?.restoreState(from: state.timelineWindowState)
+ restoreArticleWindowScrollY = state.detailWindowState?.windowScrollY
+
+ let isShowingExtractedArticle = state.detailWindowState?.isShowingExtractedArticle as? Bool ?? false
if isShowingExtractedArticle {
- restoreArticleWindowScrollY = articleWindowScrollY
startArticleExtractorForCurrentLink()
}
@@ -1237,29 +1247,17 @@ private extension MainWindowController {
}
}
- func saveSplitViewState(to state: inout [AnyHashable : Any]) {
- guard let splitView = splitViewController?.splitView else {
- return
- }
-
- let widths = splitView.arrangedSubviews.map{ Int(floor($0.frame.width)) }
- state[MainWindowController.mainWindowWidthsStateKey] = widths
-
- state[UserInfoKey.isSidebarHidden] = sidebarSplitViewItem?.isCollapsed
- }
-
- func restoreSplitViewState(from state: [AnyHashable : Any]) {
+ func restoreSplitViewState(from state: MainWindowState) {
guard let splitView = splitViewController?.splitView,
- let widths = state[MainWindowController.mainWindowWidthsStateKey] as? [Int],
- widths.count == 3,
- let window = window else {
- return
+ state.splitViewWidths.count == 3,
+ let window = window else {
+ return
}
let windowWidth = Int(floor(window.frame.width))
let dividerThickness: Int = Int(splitView.dividerThickness)
- let sidebarWidth: Int = widths[0]
- let timelineWidth: Int = widths[1]
+ let sidebarWidth: Int = state.splitViewWidths[0]
+ let timelineWidth: Int = state.splitViewWidths[1]
// Make sure the detail view has its minimum thickness, at least.
if windowWidth < sidebarWidth + dividerThickness + timelineWidth + dividerThickness + MainWindowController.detailViewMinimumThickness {
@@ -1268,11 +1266,9 @@ private extension MainWindowController {
splitView.setPosition(CGFloat(sidebarWidth), ofDividerAt: 0)
splitView.setPosition(CGFloat(sidebarWidth + dividerThickness + timelineWidth), ofDividerAt: 1)
-
- let isSidebarHidden = state[UserInfoKey.isSidebarHidden] as? Bool ?? false
-
- if !(sidebarSplitViewItem?.isCollapsed ?? false) && isSidebarHidden {
- sidebarSplitViewItem?.isCollapsed = true
+
+ Task { @MainActor in
+ sidebarSplitViewItem?.isCollapsed = state.isSidebarHidden
}
}
diff --git a/Mac/MainWindow/MainWindowState.swift b/Mac/MainWindow/MainWindowState.swift
new file mode 100644
index 000000000..b7fafd32b
--- /dev/null
+++ b/Mac/MainWindow/MainWindowState.swift
@@ -0,0 +1,50 @@
+//
+// MainWindowState.swift
+// NetNewsWire
+//
+// Created by Maurice Parker on 12/16/23.
+// Copyright © 2023 Ranchero Software. All rights reserved.
+//
+
+import Foundation
+
+class MainWindowState: NSObject, NSSecureCoding {
+
+ static var supportsSecureCoding = true
+
+ let isFullScreen: Bool
+ let splitViewWidths: [Int]
+ let isSidebarHidden: Bool
+ let sidebarWindowState: SidebarWindowState?
+ let timelineWindowState: TimelineWindowState?
+ let detailWindowState: DetailWindowState?
+
+ init(isFullScreen: Bool, splitViewWidths: [Int], isSidebarHidden: Bool, sidebarWindowState: SidebarWindowState? = nil, timelineWindowState: TimelineWindowState? = nil, detailWindowState: DetailWindowState? = nil) {
+ self.isFullScreen = isFullScreen
+ self.splitViewWidths = splitViewWidths
+ self.isSidebarHidden = isSidebarHidden
+ self.sidebarWindowState = sidebarWindowState
+ self.timelineWindowState = timelineWindowState
+ self.detailWindowState = detailWindowState
+ }
+
+ required init?(coder: NSCoder) {
+ isFullScreen = coder.decodeBool(forKey: "isFullScreen")
+ splitViewWidths = coder.decodeObject(of: [NSArray.self, NSNumber.self], forKey: "splitViewWidths") as? [Int] ?? []
+ isSidebarHidden = coder.decodeBool(forKey: "isSidebarHidden")
+ sidebarWindowState = coder.decodeObject(of: SidebarWindowState.self, forKey: "sidebarWindowState")
+ timelineWindowState = coder.decodeObject(of: TimelineWindowState.self, forKey: "timelineWindowState")
+ detailWindowState = coder.decodeObject(of: DetailWindowState.self, forKey: "detailWindowState")
+ }
+
+
+ func encode(with coder: NSCoder) {
+ coder.encode(isFullScreen, forKey: "isFullScreen")
+ coder.encode(splitViewWidths, forKey: "splitViewWidths")
+ coder.encode(isSidebarHidden, forKey: "isSidebarHidden")
+ coder.encode(sidebarWindowState, forKey: "sidebarWindowState")
+ coder.encode(timelineWindowState, forKey: "timelineWindowState")
+ coder.encode(detailWindowState, forKey: "detailWindowState")
+ }
+
+}
diff --git a/Mac/MainWindow/Sidebar/SidebarViewController.swift b/Mac/MainWindow/Sidebar/SidebarViewController.swift
index 43c625f10..41b329d7c 100644
--- a/Mac/MainWindow/Sidebar/SidebarViewController.swift
+++ b/Mac/MainWindow/Sidebar/SidebarViewController.swift
@@ -30,6 +30,12 @@ protocol SidebarDelegate: AnyObject {
weak var splitViewItem: NSSplitViewItem?
+ var windowState: SidebarWindowState {
+ let expandedContainers = expandedTable.compactMap { $0.userInfo as? [String: String] }
+ let selectedFeeds = selectedFeeds.compactMap { $0.feedID?.userInfo as? [String: String] }
+ return SidebarWindowState(isReadFiltered: isReadFiltered, expandedContainers: expandedContainers, selectedFeeds: selectedFeeds)
+ }
+
private let rebuildTreeAndRestoreSelectionQueue = CoalescingQueue(name: "Rebuild Tree Queue", interval: 1.0)
let treeControllerDelegate = WebFeedTreeControllerDelegate()
lazy var treeController: TreeController = {
@@ -96,25 +102,14 @@ protocol SidebarDelegate: AnyObject {
// MARK: State Restoration
- func saveState(to state: inout [AnyHashable : Any]) {
- state[UserInfoKey.readFeedsFilterState] = isReadFiltered
- state[UserInfoKey.containerExpandedWindowState] = expandedTable.map { $0.userInfo }
- state[UserInfoKey.selectedFeedsState] = selectedFeeds.compactMap { $0.feedID?.userInfo }
- }
-
- func restoreState(from state: [AnyHashable : Any]) {
+ func restoreState(from state: SidebarWindowState?) {
+ guard let state else { return }
- if let containerExpandedWindowState = state[UserInfoKey.containerExpandedWindowState] as? [[AnyHashable: AnyHashable]] {
- let containerIdentifiers = containerExpandedWindowState.compactMap( { ContainerIdentifier(userInfo: $0) })
- expandedTable = Set(containerIdentifiers)
- }
+ let containerIdentifers = state.expandedContainers.compactMap( { ContainerIdentifier(userInfo: $0) })
+ expandedTable = Set(containerIdentifers)
- guard let selectedFeedsState = state[UserInfoKey.selectedFeedsState] as? [[AnyHashable: AnyHashable]] else {
- return
- }
-
- let selectedFeedIdentifiers = Set(selectedFeedsState.compactMap( { FeedIdentifier(userInfo: $0) }))
- selectedFeedIdentifiers.forEach { treeControllerDelegate.addFilterException($0) }
+ let selectedFeedIdentifers = Set(state.selectedFeeds.compactMap( { FeedIdentifier(userInfo: $0) }))
+ selectedFeedIdentifers.forEach { treeControllerDelegate.addFilterException($0) }
rebuildTreeAndReloadDataIfNeeded()
@@ -122,7 +117,7 @@ protocol SidebarDelegate: AnyObject {
func selectFeedsVisitor(node: Node) {
if let feedID = (node.representedObject as? FeedIdentifiable)?.feedID {
- if selectedFeedIdentifiers.contains(feedID) {
+ if selectedFeedIdentifers.contains(feedID) {
selectIndexes.insert(outlineView.row(forItem: node) )
}
}
@@ -132,9 +127,7 @@ protocol SidebarDelegate: AnyObject {
outlineView.selectRowIndexes(selectIndexes, byExtendingSelection: false)
focus()
- if let readFeedsFilterState = state[UserInfoKey.readFeedsFilterState] as? Bool {
- isReadFiltered = readFeedsFilterState
- }
+ isReadFiltered = state.isReadFiltered
}
// MARK: - Notifications
diff --git a/Mac/MainWindow/Sidebar/SidebarWindowState.swift b/Mac/MainWindow/Sidebar/SidebarWindowState.swift
new file mode 100644
index 000000000..2011362bb
--- /dev/null
+++ b/Mac/MainWindow/Sidebar/SidebarWindowState.swift
@@ -0,0 +1,37 @@
+//
+// SidebarWindowState.swift
+// NetNewsWire
+//
+// Created by Maurice Parker on 12/16/23.
+// Copyright © 2023 Ranchero Software. All rights reserved.
+//
+
+import Foundation
+
+class SidebarWindowState: NSObject, NSSecureCoding {
+
+ static var supportsSecureCoding = true
+
+ let isReadFiltered: Bool
+ let expandedContainers: [[String: String]]
+ let selectedFeeds: [[String: String]]
+
+ init(isReadFiltered: Bool, expandedContainers: [[String : String]], selectedFeeds: [[String : String]]) {
+ self.isReadFiltered = isReadFiltered
+ self.expandedContainers = expandedContainers
+ self.selectedFeeds = selectedFeeds
+ }
+
+ required init?(coder: NSCoder) {
+ isReadFiltered = coder.decodeBool(forKey: "isReadFiltered")
+ expandedContainers = coder.decodeObject(of: [NSArray.self, NSDictionary.self, NSString.self], forKey: "expandedContainers") as? [[String: String]] ?? []
+ selectedFeeds = coder.decodeObject(of: [NSArray.self, NSDictionary.self, NSString.self], forKey: "selectedFeeds") as? [[String: String]] ?? []
+ }
+
+ func encode(with coder: NSCoder) {
+ coder.encode(isReadFiltered, forKey: "isReadFiltered")
+ coder.encode(expandedContainers, forKey: "expandedContainers")
+ coder.encode(selectedFeeds, forKey: "selectedFeeds")
+ }
+
+}
diff --git a/Mac/MainWindow/Timeline/TimelineContainerViewController.swift b/Mac/MainWindow/Timeline/TimelineContainerViewController.swift
index 5fdf0ab12..ce435a642 100644
--- a/Mac/MainWindow/Timeline/TimelineContainerViewController.swift
+++ b/Mac/MainWindow/Timeline/TimelineContainerViewController.swift
@@ -37,6 +37,10 @@ final class TimelineContainerViewController: NSViewController {
view?.window?.recalculateKeyViewLoop()
}
}
+
+ var windowState: TimelineWindowState? {
+ return currentTimelineViewController?.windowState
+ }
weak var delegate: TimelineContainerViewControllerDelegate?
@@ -127,11 +131,9 @@ final class TimelineContainerViewController: NSViewController {
// MARK: State Restoration
- func saveState(to state: inout [AnyHashable : Any]) {
- regularTimelineViewController.saveState(to: &state)
- }
-
- func restoreState(from state: [AnyHashable : Any]) {
+ func restoreState(from state: TimelineWindowState?) {
+ guard let state else { return }
+
regularTimelineViewController.restoreState(from: state)
updateReadFilterButton()
}
diff --git a/Mac/MainWindow/Timeline/TimelineViewController.swift b/Mac/MainWindow/Timeline/TimelineViewController.swift
index f19276b9f..f581e322d 100644
--- a/Mac/MainWindow/Timeline/TimelineViewController.swift
+++ b/Mac/MainWindow/Timeline/TimelineViewController.swift
@@ -80,6 +80,24 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
}
}
+ var windowState: TimelineWindowState {
+ let readArticlesFilterStateKeys = readFilterEnabledTable.keys.compactMap { $0.userInfo as? [String: String] }
+ let readArticlesFilterStateValues = readFilterEnabledTable.values.compactMap( { $0 })
+
+ if selectedArticles.count == 1 {
+ let path = selectedArticles.first!.pathUserInfo
+ return TimelineWindowState(readArticlesFilterStateKeys: readArticlesFilterStateKeys,
+ readArticlesFilterStateValues: readArticlesFilterStateValues,
+ selectedAccountID: path[ArticlePathKey.accountID] as? String,
+ selectedArticleID: path[ArticlePathKey.articleID] as? String)
+ } else {
+ return TimelineWindowState(readArticlesFilterStateKeys: readArticlesFilterStateKeys,
+ readArticlesFilterStateValues: readArticlesFilterStateValues,
+ selectedAccountID: nil,
+ selectedArticleID: nil)
+ }
+
+ }
weak var delegate: TimelineDelegate?
var sharingServiceDelegate: NSSharingServiceDelegate?
@@ -271,36 +289,21 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
// MARK: State Restoration
- func saveState(to state: inout [AnyHashable : Any]) {
- state[UserInfoKey.readArticlesFilterStateKeys] = readFilterEnabledTable.keys.compactMap { $0.userInfo }
- state[UserInfoKey.readArticlesFilterStateValues] = readFilterEnabledTable.values.compactMap( { $0 })
-
- if selectedArticles.count == 1 {
- state[UserInfoKey.articlePath] = selectedArticles.first!.pathUserInfo
- }
- }
-
- func restoreState(from state: [AnyHashable : Any]) {
- guard let readArticlesFilterStateKeys = state[UserInfoKey.readArticlesFilterStateKeys] as? [[AnyHashable: AnyHashable]],
- let readArticlesFilterStateValues = state[UserInfoKey.readArticlesFilterStateValues] as? [Bool] else {
- return
- }
-
- for i in 0..
Date: Thu, 14 Aug 2025 14:59:08 -0700
Subject: [PATCH 09/25] Restore some UserInfo keys required by the iOS app.
---
Shared/UserInfoKey.swift | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/Shared/UserInfoKey.swift b/Shared/UserInfoKey.swift
index 95faefa82..e9aaa21fc 100644
--- a/Shared/UserInfoKey.swift
+++ b/Shared/UserInfoKey.swift
@@ -16,7 +16,15 @@ struct UserInfoKey {
static let feedIdentifier = "feedIdentifier"
static let windowState = "windowState"
+ static let windowFullScreenState = "windowFullScreenState"
+ static let containerExpandedWindowState = "containerExpandedWindowState"
+ static let readFeedsFilterState = "readFeedsFilterState"
+ static let readArticlesFilterState = "readArticlesFilterState"
+ static let readArticlesFilterStateKeys = "readArticlesFilterStateKey"
+ static let readArticlesFilterStateValues = "readArticlesFilterStateValue"
+ static let selectedFeedsState = "selectedFeedsState"
+ static let isShowingExtractedArticle = "isShowingExtractedArticle"
static let articleWindowScrollY = "articleWindowScrollY"
-
+ static let isSidebarHidden = "isSidebarHidden"
}
From 15132bcbd973948388d0989d91a20014d00ea118 Mon Sep 17 00:00:00 2001
From: Brent Simmons
Date: Thu, 14 Aug 2025 16:22:52 -0700
Subject: [PATCH 10/25] Remove unneeded return.
---
Mac/MainWindow/Detail/DetailViewController.swift | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Mac/MainWindow/Detail/DetailViewController.swift b/Mac/MainWindow/Detail/DetailViewController.swift
index 26104663d..236047f03 100644
--- a/Mac/MainWindow/Detail/DetailViewController.swift
+++ b/Mac/MainWindow/Detail/DetailViewController.swift
@@ -29,7 +29,7 @@ final class DetailViewController: NSViewController, WKUIDelegate {
private var searchWebViewController: DetailWebViewController?
var windowState: DetailWindowState {
- return currentWebViewController.windowState
+ currentWebViewController.windowState
}
private var currentWebViewController: DetailWebViewController! {
@@ -111,7 +111,6 @@ final class DetailViewController: NSViewController, WKUIDelegate {
}
window.makeFirstResponderUnlessDescendantIsFirstResponder(currentWebViewController.webView)
}
-
}
// MARK: - DetailWebViewControllerDelegate
From 74890781c5ad213d10ad1c40a33b30a12e74e668 Mon Sep 17 00:00:00 2001
From: Brent Simmons
Date: Thu, 14 Aug 2025 16:23:03 -0700
Subject: [PATCH 11/25] Remove unneeded return.
---
Mac/MainWindow/Detail/DetailWebViewController.swift | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Mac/MainWindow/Detail/DetailWebViewController.swift b/Mac/MainWindow/Detail/DetailWebViewController.swift
index 27bf97937..1655da8a3 100644
--- a/Mac/MainWindow/Detail/DetailWebViewController.swift
+++ b/Mac/MainWindow/Detail/DetailWebViewController.swift
@@ -36,7 +36,7 @@ final class DetailWebViewController: NSViewController {
}
var windowState: DetailWindowState {
- return DetailWindowState(isShowingExtractedArticle: isShowingExtractedArticle, windowScrollY: windowScrollY ?? 0)
+ DetailWindowState(isShowingExtractedArticle: isShowingExtractedArticle, windowScrollY: windowScrollY ?? 0)
}
var article: Article? {
@@ -208,7 +208,6 @@ final class DetailWebViewController: NSViewController {
override func scrollPageUp(_ sender: Any?) {
webView.scrollPageUp(sender)
}
-
}
// MARK: - WKScriptMessageHandler
From 91f66835f938b7dfae6149765b6fc14ccd42e7be Mon Sep 17 00:00:00 2001
From: Brent Simmons
Date: Thu, 14 Aug 2025 16:24:54 -0700
Subject: [PATCH 12/25] Mark classes as final. Create private Key structs
instead of duplicating string literals. Make supportsSecureCoding let instead
of var.
---
Mac/MainWindow/Detail/DetailWindowState.swift | 24 ++++++-----
Mac/MainWindow/MainWindowState.swift | 43 +++++++++++--------
.../Sidebar/SidebarWindowState.swift | 29 +++++++------
.../Timeline/TimelineWindowState.swift | 36 +++++++++-------
4 files changed, 77 insertions(+), 55 deletions(-)
diff --git a/Mac/MainWindow/Detail/DetailWindowState.swift b/Mac/MainWindow/Detail/DetailWindowState.swift
index 3fdc0a58a..f277c2c33 100644
--- a/Mac/MainWindow/Detail/DetailWindowState.swift
+++ b/Mac/MainWindow/Detail/DetailWindowState.swift
@@ -8,26 +8,30 @@
import Foundation
-class DetailWindowState: NSObject, NSSecureCoding {
-
- static var supportsSecureCoding = true
+final class DetailWindowState: NSObject, NSSecureCoding {
+ static let supportsSecureCoding = true
+
let isShowingExtractedArticle: Bool
let windowScrollY: CGFloat
- internal init(isShowingExtractedArticle: Bool, windowScrollY: CGFloat) {
+ init(isShowingExtractedArticle: Bool, windowScrollY: CGFloat) {
self.isShowingExtractedArticle = isShowingExtractedArticle
self.windowScrollY = windowScrollY
}
-
+
+ private struct Key {
+ static let isShowingExtractedArticle = "isShowingExtractedArticle"
+ static let windowScrollY = "windowScrollY"
+ }
+
required init?(coder: NSCoder) {
- isShowingExtractedArticle = coder.decodeBool(forKey: "isShowingExtractedArticle")
- windowScrollY = CGFloat(coder.decodeDouble(forKey: "windowScrollY"))
+ isShowingExtractedArticle = coder.decodeBool(forKey: Key.isShowingExtractedArticle)
+ windowScrollY = CGFloat(coder.decodeDouble(forKey: Key.windowScrollY))
}
func encode(with coder: NSCoder) {
- coder.encode(isShowingExtractedArticle, forKey: "isShowingExtractedArticle")
- coder.encode(Double(windowScrollY), forKey: "windowScrollY")
+ coder.encode(isShowingExtractedArticle, forKey: Key.isShowingExtractedArticle)
+ coder.encode(Double(windowScrollY), forKey: Key.windowScrollY)
}
-
}
diff --git a/Mac/MainWindow/MainWindowState.swift b/Mac/MainWindow/MainWindowState.swift
index b7fafd32b..a92168938 100644
--- a/Mac/MainWindow/MainWindowState.swift
+++ b/Mac/MainWindow/MainWindowState.swift
@@ -8,10 +8,10 @@
import Foundation
-class MainWindowState: NSObject, NSSecureCoding {
-
- static var supportsSecureCoding = true
-
+final class MainWindowState: NSObject, NSSecureCoding {
+
+ static let supportsSecureCoding = true
+
let isFullScreen: Bool
let splitViewWidths: [Int]
let isSidebarHidden: Bool
@@ -28,23 +28,30 @@ class MainWindowState: NSObject, NSSecureCoding {
self.detailWindowState = detailWindowState
}
- required init?(coder: NSCoder) {
- isFullScreen = coder.decodeBool(forKey: "isFullScreen")
- splitViewWidths = coder.decodeObject(of: [NSArray.self, NSNumber.self], forKey: "splitViewWidths") as? [Int] ?? []
- isSidebarHidden = coder.decodeBool(forKey: "isSidebarHidden")
- sidebarWindowState = coder.decodeObject(of: SidebarWindowState.self, forKey: "sidebarWindowState")
- timelineWindowState = coder.decodeObject(of: TimelineWindowState.self, forKey: "timelineWindowState")
- detailWindowState = coder.decodeObject(of: DetailWindowState.self, forKey: "detailWindowState")
+ private struct Key {
+ static let isFullScreen = "isFullScreen"
+ static let splitViewWidths = "splitViewWidths"
+ static let isSidebarHidden = "isSidebarHidden"
+ static let sidebarWindowState = "sidebarWindowState"
+ static let timelineWindowState = "timelineWindowState"
+ static let detailWindowState = "detailWindowState"
}
+ required init?(coder: NSCoder) {
+ isFullScreen = coder.decodeBool(forKey: Key.isFullScreen)
+ splitViewWidths = coder.decodeObject(of: [NSArray.self, NSNumber.self], forKey: Key.splitViewWidths) as? [Int] ?? []
+ isSidebarHidden = coder.decodeBool(forKey: Key.isSidebarHidden)
+ sidebarWindowState = coder.decodeObject(of: SidebarWindowState.self, forKey: Key.sidebarWindowState)
+ timelineWindowState = coder.decodeObject(of: TimelineWindowState.self, forKey: Key.timelineWindowState)
+ detailWindowState = coder.decodeObject(of: DetailWindowState.self, forKey: Key.detailWindowState)
+ }
func encode(with coder: NSCoder) {
- coder.encode(isFullScreen, forKey: "isFullScreen")
- coder.encode(splitViewWidths, forKey: "splitViewWidths")
- coder.encode(isSidebarHidden, forKey: "isSidebarHidden")
- coder.encode(sidebarWindowState, forKey: "sidebarWindowState")
- coder.encode(timelineWindowState, forKey: "timelineWindowState")
- coder.encode(detailWindowState, forKey: "detailWindowState")
+ coder.encode(isFullScreen, forKey: Key.isFullScreen)
+ coder.encode(splitViewWidths, forKey: Key.splitViewWidths)
+ coder.encode(isSidebarHidden, forKey: Key.isSidebarHidden)
+ coder.encode(sidebarWindowState, forKey: Key.sidebarWindowState)
+ coder.encode(timelineWindowState, forKey: Key.timelineWindowState)
+ coder.encode(detailWindowState, forKey: Key.detailWindowState)
}
-
}
diff --git a/Mac/MainWindow/Sidebar/SidebarWindowState.swift b/Mac/MainWindow/Sidebar/SidebarWindowState.swift
index 2011362bb..1674a1437 100644
--- a/Mac/MainWindow/Sidebar/SidebarWindowState.swift
+++ b/Mac/MainWindow/Sidebar/SidebarWindowState.swift
@@ -8,10 +8,10 @@
import Foundation
-class SidebarWindowState: NSObject, NSSecureCoding {
-
- static var supportsSecureCoding = true
-
+final class SidebarWindowState: NSObject, NSSecureCoding {
+
+ static let supportsSecureCoding = true
+
let isReadFiltered: Bool
let expandedContainers: [[String: String]]
let selectedFeeds: [[String: String]]
@@ -21,17 +21,22 @@ class SidebarWindowState: NSObject, NSSecureCoding {
self.expandedContainers = expandedContainers
self.selectedFeeds = selectedFeeds
}
-
+
+ private struct Key {
+ static let isReadFiltered = "isReadFiltered"
+ static let expandedContainers = "expandedContainers"
+ static let selectedFeeds = "selectedFeeds"
+ }
+
required init?(coder: NSCoder) {
- isReadFiltered = coder.decodeBool(forKey: "isReadFiltered")
- expandedContainers = coder.decodeObject(of: [NSArray.self, NSDictionary.self, NSString.self], forKey: "expandedContainers") as? [[String: String]] ?? []
- selectedFeeds = coder.decodeObject(of: [NSArray.self, NSDictionary.self, NSString.self], forKey: "selectedFeeds") as? [[String: String]] ?? []
+ isReadFiltered = coder.decodeBool(forKey: Key.isReadFiltered)
+ expandedContainers = coder.decodeObject(of: [NSArray.self, NSDictionary.self, NSString.self], forKey: Key.expandedContainers) as? [[String: String]] ?? []
+ selectedFeeds = coder.decodeObject(of: [NSArray.self, NSDictionary.self, NSString.self], forKey: Key.selectedFeeds) as? [[String: String]] ?? []
}
func encode(with coder: NSCoder) {
- coder.encode(isReadFiltered, forKey: "isReadFiltered")
- coder.encode(expandedContainers, forKey: "expandedContainers")
- coder.encode(selectedFeeds, forKey: "selectedFeeds")
+ coder.encode(isReadFiltered, forKey: Key.isReadFiltered)
+ coder.encode(expandedContainers, forKey: Key.expandedContainers)
+ coder.encode(selectedFeeds, forKey: Key.selectedFeeds)
}
-
}
diff --git a/Mac/MainWindow/Timeline/TimelineWindowState.swift b/Mac/MainWindow/Timeline/TimelineWindowState.swift
index e13a1540a..3cafa9975 100644
--- a/Mac/MainWindow/Timeline/TimelineWindowState.swift
+++ b/Mac/MainWindow/Timeline/TimelineWindowState.swift
@@ -8,34 +8,40 @@
import Foundation
-class TimelineWindowState: NSObject, NSSecureCoding {
-
- static var supportsSecureCoding = true
-
+final class TimelineWindowState: NSObject, NSSecureCoding {
+
+ static let supportsSecureCoding = true
+
let readArticlesFilterStateKeys: [[String: String]]
let readArticlesFilterStateValues: [Bool]
let selectedAccountID: String?
let selectedArticleID: String?
-
+
init(readArticlesFilterStateKeys: [[String : String]], readArticlesFilterStateValues: [Bool], selectedAccountID: String? = nil, selectedArticleID: String? = nil) {
self.readArticlesFilterStateKeys = readArticlesFilterStateKeys
self.readArticlesFilterStateValues = readArticlesFilterStateValues
self.selectedAccountID = selectedAccountID
self.selectedArticleID = selectedArticleID
}
-
+
+ private struct Key {
+ static let readArticlesFilterStateKeys = "readArticlesFilterStateKeys"
+ static let readArticlesFilterStateValues = "readArticlesFilterStateValues"
+ static let selectedAccountID = "selectedAccountID"
+ static let selectedArticleID = "selectedArticleID"
+ }
+
required init?(coder: NSCoder) {
- readArticlesFilterStateKeys = coder.decodeObject(of: [NSArray.self, NSDictionary.self, NSString.self], forKey: "readArticlesFilterStateKeys") as? [[String: String]] ?? []
- readArticlesFilterStateValues = coder.decodeObject(of: [NSArray.self, NSNumber.self], forKey: "readArticlesFilterStateValues") as? [Bool] ?? []
- selectedAccountID = coder.decodeObject(of: NSString.self, forKey: "selectedAccountID") as? String
- selectedArticleID = coder.decodeObject(of: NSString.self, forKey: "selectedArticleID") as? String
+ readArticlesFilterStateKeys = coder.decodeObject(of: [NSArray.self, NSDictionary.self, NSString.self], forKey: Key.readArticlesFilterStateKeys) as? [[String: String]] ?? []
+ readArticlesFilterStateValues = coder.decodeObject(of: [NSArray.self, NSNumber.self], forKey: Key.readArticlesFilterStateValues) as? [Bool] ?? []
+ selectedAccountID = coder.decodeObject(of: NSString.self, forKey: Key.selectedAccountID) as? String
+ selectedArticleID = coder.decodeObject(of: NSString.self, forKey: Key.selectedArticleID) as? String
}
func encode(with coder: NSCoder) {
- coder.encode(readArticlesFilterStateKeys, forKey: "readArticlesFilterStateKeys")
- coder.encode(readArticlesFilterStateValues, forKey: "readArticlesFilterStateValues")
- coder.encode(selectedAccountID, forKey: "selectedAccountID")
- coder.encode(selectedArticleID, forKey: "selectedArticleID")
+ coder.encode(readArticlesFilterStateKeys, forKey: Key.readArticlesFilterStateKeys)
+ coder.encode(readArticlesFilterStateValues, forKey: Key.readArticlesFilterStateValues)
+ coder.encode(selectedAccountID, forKey: Key.selectedAccountID)
+ coder.encode(selectedArticleID, forKey: Key.selectedArticleID)
}
-
}
From 8daa9de75b59a546865e76c414f9eab5589eaf84 Mon Sep 17 00:00:00 2001
From: Brent Simmons
Date: Thu, 14 Aug 2025 21:33:04 -0700
Subject: [PATCH 13/25] Remove unneeded type check.
---
Mac/MainWindow/MainWindowController.swift | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Mac/MainWindow/MainWindowController.swift b/Mac/MainWindow/MainWindowController.swift
index 76cf62b30..463a4dfff 100644
--- a/Mac/MainWindow/MainWindowController.swift
+++ b/Mac/MainWindow/MainWindowController.swift
@@ -982,7 +982,7 @@ private extension MainWindowController {
timelineContainerViewController?.restoreState(from: state.timelineWindowState)
restoreArticleWindowScrollY = state.detailWindowState?.windowScrollY
- let isShowingExtractedArticle = state.detailWindowState?.isShowingExtractedArticle as? Bool ?? false
+ let isShowingExtractedArticle = state.detailWindowState?.isShowingExtractedArticle ?? false
if isShowingExtractedArticle {
startArticleExtractorForCurrentLink()
}
From 03d27d12c130a72236b061454652557a228448d0 Mon Sep 17 00:00:00 2001
From: Brent Simmons
Date: Fri, 15 Aug 2025 11:42:54 -0700
Subject: [PATCH 14/25] Be explicit about legacy and secure window state, in
order to make it possible to migrate from legacy to secure.
---
Mac/AppDefaults.swift | 21 +++++++++++++++------
Mac/MainWindow/MainWindowController.swift | 4 ++--
2 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/Mac/AppDefaults.swift b/Mac/AppDefaults.swift
index 7fffb41b9..235f95396 100644
--- a/Mac/AppDefaults.swift
+++ b/Mac/AppDefaults.swift
@@ -23,7 +23,8 @@ final class AppDefaults {
struct Key {
static let firstRunDate = "firstRunDate"
- static let windowState = "windowState"
+ static let legacyWindowState = "windowState"
+ static let secureWindowState = "secureWindowState"
static let lastImageCacheFlushDate = "lastImageCacheFlushDate"
static let sidebarFontSize = "sidebarFontSize"
static let timelineFontSize = "timelineFontSize"
@@ -73,16 +74,24 @@ final class AppDefaults {
firstRunDate = Date()
return true
}()
-
- var windowState: Data? {
+
+ /// Stores window state prior to switching to secure state restoration.
+ ///
+ /// This is referenced temporarily, only to be able to provide migration from legacy to secure window state.
+ /// TODO: delete for NetNewsWire 7.
+ var legacyWindowState: [AnyHashable: Any]? {
+ UserDefaults.standard.object(forKey: Key.legacyWindowState) as? [AnyHashable : Any]
+ }
+
+ var secureWindowState: Data? {
get {
- return UserDefaults.standard.object(forKey: Key.windowState) as? Data
+ UserDefaults.standard.object(forKey: Key.secureWindowState) as? Data
}
set {
- UserDefaults.standard.set(newValue, forKey: Key.windowState)
+ UserDefaults.standard.set(newValue, forKey: Key.secureWindowState)
}
}
-
+
var lastImageCacheFlushDate: Date? {
get {
return AppDefaults.date(for: Key.lastImageCacheFlushDate)
diff --git a/Mac/MainWindow/MainWindowController.swift b/Mac/MainWindow/MainWindowController.swift
index 463a4dfff..252981da7 100644
--- a/Mac/MainWindow/MainWindowController.swift
+++ b/Mac/MainWindow/MainWindowController.swift
@@ -131,12 +131,12 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
func saveStateToUserDefaults() {
let data = try? NSKeyedArchiver.archivedData(withRootObject: savableState(), requiringSecureCoding: true)
- AppDefaults.shared.windowState = data
+ AppDefaults.shared.secureWindowState = data
window?.saveFrame(usingName: windowAutosaveName)
}
func restoreStateFromUserDefaults() {
- if let data = AppDefaults.shared.windowState,
+ if let data = AppDefaults.shared.secureWindowState,
let state = try? NSKeyedUnarchiver.unarchivedObject(ofClass: MainWindowState.self, from: data) {
restoreState(from: state)
window?.setFrameUsingName(windowAutosaveName, force: true)
From ad463beceabcc8398a470407d59a5d797a002ae8 Mon Sep 17 00:00:00 2001
From: Brent Simmons
Date: Fri, 15 Aug 2025 17:24:24 -0700
Subject: [PATCH 15/25] Migrate state restoration with legacy
(pre-secure-state-restoration) data.
---
Mac/AppDefaults.swift | 6 +-
Mac/MainWindow/MainWindowController.swift | 65 ++++++++++++++++++-
.../Sidebar/SidebarViewController.swift | 40 +++++++++++-
.../TimelineContainerViewController.swift | 8 +++
.../Timeline/TimelineViewController.swift | 40 ++++++++++--
5 files changed, 151 insertions(+), 8 deletions(-)
diff --git a/Mac/AppDefaults.swift b/Mac/AppDefaults.swift
index 235f95396..1084a2c6f 100644
--- a/Mac/AppDefaults.swift
+++ b/Mac/AppDefaults.swift
@@ -80,7 +80,11 @@ final class AppDefaults {
/// This is referenced temporarily, only to be able to provide migration from legacy to secure window state.
/// TODO: delete for NetNewsWire 7.
var legacyWindowState: [AnyHashable: Any]? {
- UserDefaults.standard.object(forKey: Key.legacyWindowState) as? [AnyHashable : Any]
+ UserDefaults.standard.object(forKey: Key.legacyWindowState) as? [AnyHashable: Any]
+ }
+
+ func deleteLegacyWindowState() {
+ UserDefaults.standard.removeObject(forKey: Key.legacyWindowState)
}
var secureWindowState: Data? {
diff --git a/Mac/MainWindow/MainWindowController.swift b/Mac/MainWindow/MainWindowController.swift
index 252981da7..f42b8a15e 100644
--- a/Mac/MainWindow/MainWindowController.swift
+++ b/Mac/MainWindow/MainWindowController.swift
@@ -140,9 +140,14 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
let state = try? NSKeyedUnarchiver.unarchivedObject(ofClass: MainWindowState.self, from: data) {
restoreState(from: state)
window?.setFrameUsingName(windowAutosaveName, force: true)
+ } else if let state = AppDefaults.shared.legacyWindowState {
+ // Migrate from previous window state data. Delete data when finished.
+ restoreLegacyState(from: state)
+ window?.setFrameUsingName(windowAutosaveName, force: true)
+ AppDefaults.shared.deleteLegacyWindowState()
}
}
-
+
// MARK: - Notifications
@objc func refreshProgressDidChange(_ note: Notification) {
@@ -986,7 +991,32 @@ private extension MainWindowController {
if isShowingExtractedArticle {
startArticleExtractorForCurrentLink()
}
-
+ }
+
+ /// Restore state using pre-secure-state-restoration data.
+ ///
+ /// It’s up to the caller to call this only when:
+ /// 1. Legacy state exists, and
+ /// 2. Secure state data does not exist.
+ ///
+ /// TODO: delete this for NetNewsWire 7.
+ func restoreLegacyState(from state: [AnyHashable: Any]) {
+ if let fullScreen = state[UserInfoKey.windowFullScreenState] as? Bool, fullScreen {
+ window?.toggleFullScreen(self)
+ }
+ restoreLegacySplitViewState(from: state)
+
+ sidebarViewController?.restoreLegacyState(from: state)
+
+ let articleWindowScrollY = state[UserInfoKey.articleWindowScrollY] as? CGFloat
+ restoreArticleWindowScrollY = articleWindowScrollY
+ timelineContainerViewController?.restoreLegacyState(from: state)
+
+ let isShowingExtractedArticle = state[UserInfoKey.isShowingExtractedArticle] as? Bool ?? false
+ if isShowingExtractedArticle {
+ restoreArticleWindowScrollY = articleWindowScrollY
+ startArticleExtractorForCurrentLink()
+ }
}
// MARK: - Command Validation
@@ -1272,6 +1302,37 @@ private extension MainWindowController {
}
}
+ /// Restore main window split view using legacy state restoration data.
+ ///
+ /// TODO: Delete this for NetNewsWire 7.
+ func restoreLegacySplitViewState(from state: [AnyHashable: Any]) {
+ guard let splitView = splitViewController?.splitView,
+ let widths = state[MainWindowController.mainWindowWidthsStateKey] as? [Int],
+ widths.count == 3,
+ let window = window else {
+ return
+ }
+
+ let windowWidth = Int(floor(window.frame.width))
+ let dividerThickness: Int = Int(splitView.dividerThickness)
+ let sidebarWidth: Int = widths[0]
+ let timelineWidth: Int = widths[1]
+
+ // Make sure the detail view has its minimum thickness, at least.
+ if windowWidth < sidebarWidth + dividerThickness + timelineWidth + dividerThickness + MainWindowController.detailViewMinimumThickness {
+ return
+ }
+
+ splitView.setPosition(CGFloat(sidebarWidth), ofDividerAt: 0)
+ splitView.setPosition(CGFloat(sidebarWidth + dividerThickness + timelineWidth), ofDividerAt: 1)
+
+ let isSidebarHidden = state[UserInfoKey.isSidebarHidden] as? Bool ?? false
+
+ if !(sidebarSplitViewItem?.isCollapsed ?? false) && isSidebarHidden {
+ sidebarSplitViewItem?.isCollapsed = true
+ }
+ }
+
func buildToolbarButton(_ itemIdentifier: NSToolbarItem.Identifier, _ title: String, _ image: NSImage, _ selector: String) -> NSToolbarItem {
let toolbarItem = RSToolbarItem(itemIdentifier: itemIdentifier)
toolbarItem.autovalidates = true
diff --git a/Mac/MainWindow/Sidebar/SidebarViewController.swift b/Mac/MainWindow/Sidebar/SidebarViewController.swift
index 41b329d7c..2456878fa 100644
--- a/Mac/MainWindow/Sidebar/SidebarViewController.swift
+++ b/Mac/MainWindow/Sidebar/SidebarViewController.swift
@@ -129,7 +129,45 @@ protocol SidebarDelegate: AnyObject {
isReadFiltered = state.isReadFiltered
}
-
+
+ /// Restore state using legacy state restoration data.
+ ///
+ /// TODO: Delete for NetNewsWire 7.
+ func restoreLegacyState(from state: [AnyHashable : Any]) {
+
+ if let containerExpandedWindowState = state[UserInfoKey.containerExpandedWindowState] as? [[AnyHashable: AnyHashable]] {
+ let containerIdentifiers = containerExpandedWindowState.compactMap( { ContainerIdentifier(userInfo: $0) })
+ expandedTable = Set(containerIdentifiers)
+ }
+
+ guard let selectedFeedsState = state[UserInfoKey.selectedFeedsState] as? [[AnyHashable: AnyHashable]] else {
+ return
+ }
+
+ let selectedFeedIdentifiers = Set(selectedFeedsState.compactMap( { FeedIdentifier(userInfo: $0) }))
+ selectedFeedIdentifiers.forEach { treeControllerDelegate.addFilterException($0) }
+
+ rebuildTreeAndReloadDataIfNeeded()
+
+ var selectIndexes = IndexSet()
+
+ func selectFeedsVisitor(node: Node) {
+ if let feedID = (node.representedObject as? FeedIdentifiable)?.feedID {
+ if selectedFeedIdentifiers.contains(feedID) {
+ selectIndexes.insert(outlineView.row(forItem: node) )
+ }
+ }
+ }
+
+ treeController.visitNodes(selectFeedsVisitor(node:))
+ outlineView.selectRowIndexes(selectIndexes, byExtendingSelection: false)
+ focus()
+
+ if let readFeedsFilterState = state[UserInfoKey.readFeedsFilterState] as? Bool {
+ isReadFiltered = readFeedsFilterState
+ }
+ }
+
// MARK: - Notifications
@objc func unreadCountDidInitialize(_ notification: Notification) {
diff --git a/Mac/MainWindow/Timeline/TimelineContainerViewController.swift b/Mac/MainWindow/Timeline/TimelineContainerViewController.swift
index ce435a642..9a173b8a3 100644
--- a/Mac/MainWindow/Timeline/TimelineContainerViewController.swift
+++ b/Mac/MainWindow/Timeline/TimelineContainerViewController.swift
@@ -137,6 +137,14 @@ final class TimelineContainerViewController: NSViewController {
regularTimelineViewController.restoreState(from: state)
updateReadFilterButton()
}
+
+ /// Restore state using legacy state restoration data.
+ ///
+ /// TODO: Delete for NetNewsWire 7.
+ func restoreLegacyState(from state: [AnyHashable: Any]) {
+ regularTimelineViewController.restoreLegacyState(from: state)
+ updateReadFilterButton()
+ }
}
extension TimelineContainerViewController: TimelineDelegate {
diff --git a/Mac/MainWindow/Timeline/TimelineViewController.swift b/Mac/MainWindow/Timeline/TimelineViewController.swift
index f581e322d..21f9b5206 100644
--- a/Mac/MainWindow/Timeline/TimelineViewController.swift
+++ b/Mac/MainWindow/Timeline/TimelineViewController.swift
@@ -310,15 +310,47 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
}
focus()
}
-
} else {
-
+ fetchAndReplaceArticlesSync()
+ }
+ }
+
+ /// Restore state using legacy state restoration data.
+ ///
+ /// TODO: Delete for NetNewsWire 7.
+ func restoreLegacyState(from state: [AnyHashable: Any]) {
+ guard let readArticlesFilterStateKeys = state[UserInfoKey.readArticlesFilterStateKeys] as? [[AnyHashable: AnyHashable]],
+ let readArticlesFilterStateValues = state[UserInfoKey.readArticlesFilterStateValues] as? [Bool] else {
+ return
+ }
+
+ for i in 0..
Date: Sat, 16 Aug 2025 09:48:16 -0700
Subject: [PATCH 16/25] Bump version and build.
---
xcconfig/common/NetNewsWire_mac_target_common.xcconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xcconfig/common/NetNewsWire_mac_target_common.xcconfig b/xcconfig/common/NetNewsWire_mac_target_common.xcconfig
index 96c9be733..5c232366d 100644
--- a/xcconfig/common/NetNewsWire_mac_target_common.xcconfig
+++ b/xcconfig/common/NetNewsWire_mac_target_common.xcconfig
@@ -1,6 +1,6 @@
// High Level Settings common to both the Mac application and any extensions we bundle with it
-MARKETING_VERSION = 6.1.10b3
-CURRENT_PROJECT_VERSION = 6138
+MARKETING_VERSION = 6.1.10b4
+CURRENT_PROJECT_VERSION = 6139
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
From 7600f8aaf81398eb481992ff2e8493892d0b4bfb Mon Sep 17 00:00:00 2001
From: Brent Simmons
Date: Sat, 16 Aug 2025 09:51:37 -0700
Subject: [PATCH 17/25] Write release notes.
---
Technotes/ReleaseNotes-Mac.markdown | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Technotes/ReleaseNotes-Mac.markdown b/Technotes/ReleaseNotes-Mac.markdown
index fe0605c80..691030139 100644
--- a/Technotes/ReleaseNotes-Mac.markdown
+++ b/Technotes/ReleaseNotes-Mac.markdown
@@ -1,5 +1,11 @@
# Mac Release Notes
+### 6.1.10b4 build 6139 16 Aug 2025 - branch main tag: mac-6.1.10b4
+
+Adopt secure state restoration; fix bug with state restoration not working in previous betas.
+
+Fixed bug, introduced in previous test build, that prevented choosing an OPML file to import
+
### 6.1.10b3 build 6138 11 Aug 2025 - branch main tag: mac-6.1.10b3
Fixed bug, introduced in previous test build, that prevented choosing an OPML file to import
From b7efe079abfa3acc52e5a281f4bec05503cf80cf Mon Sep 17 00:00:00 2001
From: Brent Simmons
Date: Sat, 16 Aug 2025 09:55:17 -0700
Subject: [PATCH 18/25] Update status.
---
Technotes/Status.md | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/Technotes/Status.md b/Technotes/Status.md
index caa2596c5..21a0c4458 100644
--- a/Technotes/Status.md
+++ b/Technotes/Status.md
@@ -3,8 +3,9 @@
Current milestone: NetNewsWire 6.1.10
https://github.com/Ranchero-Software/NetNewsWire/milestone/60
-Current bug: Mac restoration issues
- https://github.com/Ranchero-Software/NetNewsWire/issues/4589
+Current bug: TBD
+
+Stuart working on Liquid Glass UI for NetNewsWire 7
## iOS
@@ -17,5 +18,5 @@ TestFlight: 6.1.10 (6198)
Mac shipping: 6.1.9
-Beta: 6.1.10b3
- https://github.com/Ranchero-Software/NetNewsWire/releases/tag/mac-6.1.10b3
+Beta: 6.1.10b4
+ https://github.com/Ranchero-Software/NetNewsWire/releases/tag/mac-6.1.10b4
From 85a459bcd16e0c5dc745edde932bc2ec8e93349c Mon Sep 17 00:00:00 2001
From: Brent Simmons
Date: Sat, 16 Aug 2025 10:08:18 -0700
Subject: [PATCH 19/25] Remove accidentally duplicated line.
---
Technotes/ReleaseNotes-Mac.markdown | 2 --
1 file changed, 2 deletions(-)
diff --git a/Technotes/ReleaseNotes-Mac.markdown b/Technotes/ReleaseNotes-Mac.markdown
index 691030139..1c86b395b 100644
--- a/Technotes/ReleaseNotes-Mac.markdown
+++ b/Technotes/ReleaseNotes-Mac.markdown
@@ -4,8 +4,6 @@
Adopt secure state restoration; fix bug with state restoration not working in previous betas.
-Fixed bug, introduced in previous test build, that prevented choosing an OPML file to import
-
### 6.1.10b3 build 6138 11 Aug 2025 - branch main tag: mac-6.1.10b3
Fixed bug, introduced in previous test build, that prevented choosing an OPML file to import
From 0109fb996e79651f535ecd00908b1c32cd36955d Mon Sep 17 00:00:00 2001
From: Brent Simmons
Date: Sat, 16 Aug 2025 10:15:00 -0700
Subject: [PATCH 20/25] Update beta appcast.
---
Appcasts/netnewswire-beta.xml | 154 +++-------------------------------
1 file changed, 12 insertions(+), 142 deletions(-)
diff --git a/Appcasts/netnewswire-beta.xml b/Appcasts/netnewswire-beta.xml
index 383069014..b3e022216 100755
--- a/Appcasts/netnewswire-beta.xml
+++ b/Appcasts/netnewswire-beta.xml
@@ -6,6 +6,18 @@
Most recent NetNewsWire changes with links to updates.
en
+
-
+ NetNewsWire 6.1.10b4
+
+Adopt secure state restoration; fix bug with state restoration not working in previous betas.
+
+ ]]>
+ Sat, 16 Aug 2025 10:10:00 -0700
+
+ 13.0
+
+
-
NetNewsWire 6.1.10b3
13.0
- -
- NetNewsWire 6.1.10b2
-
-Fixed bug, introduced in previous test build, that prevented adding a Feedly account
-
- ]]>
- Tue, 13 May 2025 09:00:00 -0700
-
- 13.0
-
-
- -
- NetNewsWire 6.1.10b1
-
-Added caching to the downloader (the one that downloads feed icons, favicons, etc.) — make fewer network requests
-Worked around The Verge’s bug with character encoding
-Fixed bug where links in footnotes — in light mode, using the default theme — would be invisible
-Fixed double-underlines on 404 Media links. (Fixed bug where using <u> tag inside an <a> would cause two underlines.)
-Added &smallcircle; to the entities decoder
-Synced the Mac default theme with the iOS version
-
- ]]>
- Wed, 07 May 2025 22:00:00 -0700
-
- 13.0
-
-
- -
- NetNewsWire 6.1b2
- Article themes. Several themes ship with the app, and you can create your own. You can change the theme in Preferences or by adding the theme switcher to the toolbar.
-Copy URLs using repaired, rather than raw, feed links.
-Restore article scroll position on relaunching app.
-Added Copy Article URL and Copy External URL commands to the Edit menu.
-Fixed a bug where using cmd-Q wouldn’t always quit the app as quickly as one might prefer.
-Disallow creation of iCloud account in the app if iCloud and iCloud Drive aren’t both enabled.
-Fixed bug showing quote tweets that only included an image.
-Added a hidden pref to suppress downloading/syncing on start: `defaults write com.ranchero.NetNewsWire-Evergreen DevroeSuppressSyncOnLaunch -bool true`
-Video autoplay is now disallowed.
-Article view now supports RTL layout.
- ]]>
- Mon, 17 Jan 2022 17:45:00 -0800
-
- 10.15.0
-
-
-
- -
- NetNewsWire 6.0.3
- Same as 6.0.3b2 except for the version number.
- ]]>
- Sun, 05 Sep 2021 12:20:00 -0700
-
- 10.15.0
-
-
-
- -
- NetNewsWire 6.0.3b2
- Feedly: preserve custom feed names with Feedly when moving them between folders
-
Preferences: use full-width row style in accounts and extensions panes
-Fixed a crashing bug triggered by running some UI code outside of main thread
-Fixed a crashing bug that could happen when the app tries to find a feed for a website
-Fixed a crashing bug that could happen when rendering tweets
-Changed how images are placed in Twitter articles so that you can better see who Tweeted the image
-Fixed bug where iCloud syncing could stop prematurely when the sync database has records not in the local database
-Fixed bug where favicons wouldn’t be found when a home page URL has non-ASCII characters
-Fixed bug where external URLs in Feedbin feeds might be lost
-Fixed bug where words prepended with $ wouldn’t appear in Twitter feeds
-Fixed bug where newlines would be just a space in Twitter feeds
-Fixed bug where BazQux-synced feeds might stop updating
- ]]>
- Sun, 29 Aug 2021 15:25:00 -0700
-
- 10.15.0
-
-
- -
- NetNewsWire 6.0.3b1
- Feedly: handle API change with deleting and don’t show a spurious error
-
NewsBlur: don’t fetch articles marked hidden by NewsBlur
-FreshRSS: add API endpoint URL example in setup form
-iCloud: fixed bug not retaining feeds in a folder where the folder hasn’t been synced yet
-Feeds list: smart feeds remain visible despite Hide Read Feeds setting
-Keyboard shortcuts: fixed regression where L key wouldn’t go to next unread when feed is all read
-Twitter extension: fixed weird bug where an extra https:/ could appear in tweet text
- ]]>
- Thu, 20 May 2021 20:00:00 -0700
-
- 10.15.0
-
-
- -
- NetNewsWire 6.0.2
- Same as 6.0.2b1 — no changes other than version
- ]]>
- Tue, 20 Apr 2021 17:40:00 -0700
-
- 10.15.0
-
-
- -
- NetNewsWire 6.0.2b1
- Inoreader sync: fixed (hopefully) cause of rate limit errors — now doing background sync of statuses much less often - note that this fix needs to be rolled out across all NetNewsWire users in order for it to have full effect
-
Fixed regression with the L key — now works properly again
- ]]>
- Thu, 15 Apr 2021 19:15:00 -0700
-
- 10.15.0
-
-
- -
- NetNewsWire 6.0.1
- Adjusted layout of the add account sheet so that it fits on smaller monitors
-
Sidebar: properly scale the smart feed icons when sidebar is set to large size in System Preferences
- ]]>
- Thu, 01 Apr 2021 20:22:00 -0700
-
- 10.15.0
-
-
- -
- NetNewsWire 6.0.1b2
- Twitter: fixed a date parsing bug that could affect people in some locales, which would prevent Twitter feeds from working for them
-
Feeds list: fixed bug where newly added feed would be called Untitled past the time when the app actually knows its name
-Fixed bug where next-unread command wouldn’t wrap around when you got to the bottom of the Feeds list
- ]]>
- Mon, 29 Mar 2021 20:55:00 -0700
-
- 10.15.0
-
-
-
From 88675902b3ad1f8cad8f687e4db72f1048aac57d Mon Sep 17 00:00:00 2001
From: Brent Simmons
Date: Sat, 16 Aug 2025 11:57:41 -0700
Subject: [PATCH 21/25] Remove no longer needed MacStateRestoration.md.
---
Technotes/Bugs/MacStateRestoration.md | 59 ---------------------------
1 file changed, 59 deletions(-)
delete mode 100644 Technotes/Bugs/MacStateRestoration.md
diff --git a/Technotes/Bugs/MacStateRestoration.md b/Technotes/Bugs/MacStateRestoration.md
deleted file mode 100644
index fd5c337ae..000000000
--- a/Technotes/Bugs/MacStateRestoration.md
+++ /dev/null
@@ -1,59 +0,0 @@
-# Mac State Restoration
-
-https://github.com/Ranchero-Software/NetNewsWire/issues/4589
-
-https://github.com/Ranchero-Software/NetNewsWire/issues/4631
-
-## State to restore
-
-Hide Read Articles
-Hide Read Feeds
-Windows positions, including split view positions
-
-## Warnings
-
- WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
-
-## How state restoration works according to Apple
-
-Info.plist: NSApplicationSupportsRestorableState - true
-
-NSUserInterfaceItemIdentification
-
-NSWindowRestoration Protocol
-window.restorationClass = …
-
-encodeRestorableStateWithCoder:
-restoreStateWithCoder:
-
-self.restorationIdentifier = "MainWindowController"
-
-AppDelegate — application:shouldRestoreApplicationState: and application:shouldSaveApplicationState: for complex cases
-
-Can be turned on and off via system pref
-
-## Tests
-
-Window 1
-Restore position — yes
-Restore split view position — sometimes
-Restore timeline position — no
-Restore Hide Read Feeds — yes
-Restore Hide Read Articles for inessential — yes
-
-Window 2
-Restore position
-Restore split view position
-Restore Hide Read Feeds
-Restore Hide Read Articles for The Verge
-
-Restores second window but not first
-
-With state restoration enabled, all three windows appear, but with not everything restored
-
----
-
-Close windows tests
-
-1 window
-detail scroll not restored
From c02dc26cdc2fa6de416f2c860e2817ab3b98e0c9 Mon Sep 17 00:00:00 2001
From: Brent Simmons
Date: Mon, 18 Aug 2025 14:33:25 -0700
Subject: [PATCH 22/25] Update release notes to note that build has been
submitted as release build.
---
Technotes/ReleaseNotes-iOS.markdown | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Technotes/ReleaseNotes-iOS.markdown b/Technotes/ReleaseNotes-iOS.markdown
index 1b4864c21..4074d9b2f 100644
--- a/Technotes/ReleaseNotes-iOS.markdown
+++ b/Technotes/ReleaseNotes-iOS.markdown
@@ -1,6 +1,6 @@
# iOS Release Notes
-### 6.1.10 TestFlight build 6198 11 Aug 2025 - branch: main tag iOS-6.1.10-6198
+### 6.1.10 TestFlight build 6198 11 Aug 2025 - branch: main tag iOS-6.1.10-6198 — submitted as App Store release build 18 Aug 2025
Replaced BBC in default feeds (for new users) because its feeds have gone wonky. Replaced with Scripting News.
From d9b584bdf52ad121058bbc2b7235be44026c23d2 Mon Sep 17 00:00:00 2001
From: Brent Simmons
Date: Mon, 18 Aug 2025 14:33:44 -0700
Subject: [PATCH 23/25] Update App Store release build instructions.
---
Technotes/How To Do iOS App Store Release.md | 21 ++++++--------------
1 file changed, 6 insertions(+), 15 deletions(-)
diff --git a/Technotes/How To Do iOS App Store Release.md b/Technotes/How To Do iOS App Store Release.md
index 993f91fd9..7134e6a2a 100644
--- a/Technotes/How To Do iOS App Store Release.md
+++ b/Technotes/How To Do iOS App Store Release.md
@@ -1,29 +1,20 @@
# How To Do App Store Release
-Write release notes in ReleaseNotes-iOS.markdown on main
+Update release notes in ReleaseNotes-iOS.markdown on main to say that the TestFlight build has been submitted to App Store
Commit release notes
-Tag the app if needed:
-
- git tag iOS-6.1.9
- git push origin iOS-6.1.9
-
Click + near iOS App
-Type in new version name
-Scroll way down to Build section and choose the build (latest TestFlight build, presumably)
+Type in new version name (example: 6.1.10)
+Scroll halfway down to Build section, click + button, and choose the build (latest TestFlight build, presumably)
Fill in What’s New text
Click Save at top of screen
Click Add for Review next to Save
On next screen, click Submit to App Review
-Make new release from tag
-
-https://github.com/Ranchero-Software/NetNewsWire/tags
-
-Example title:
-NetNewsWire 6.1.6 (6140) for iOS - AppStore
+Once it appears on App Store…
+Optionally…
Announce on Slack
Announce on NetNewsWire blog
-Optionally announce on inessential
+Announce on inessential
From a53beeb30facef44e60e19fcb744b7626cbcd317 Mon Sep 17 00:00:00 2001
From: Brent Simmons
Date: Mon, 18 Aug 2025 14:35:12 -0700
Subject: [PATCH 24/25] Remove spaces from file names, since it becomes a pain
on the command line.
---
...o Mac Sparkle Release.md => HowToDoMacSparkleRelease.markdown} | 0
...OS App Store Release.md => HowToDoiOSAppStoreRelease.markdown} | 0
...TestFlight Release.md => HowToDoiOSTestFlightRelease.markdown} | 0
3 files changed, 0 insertions(+), 0 deletions(-)
rename Technotes/{How To Do Mac Sparkle Release.md => HowToDoMacSparkleRelease.markdown} (100%)
rename Technotes/{How To Do iOS App Store Release.md => HowToDoiOSAppStoreRelease.markdown} (100%)
rename Technotes/{How To Do iOS TestFlight Release.md => HowToDoiOSTestFlightRelease.markdown} (100%)
diff --git a/Technotes/How To Do Mac Sparkle Release.md b/Technotes/HowToDoMacSparkleRelease.markdown
similarity index 100%
rename from Technotes/How To Do Mac Sparkle Release.md
rename to Technotes/HowToDoMacSparkleRelease.markdown
diff --git a/Technotes/How To Do iOS App Store Release.md b/Technotes/HowToDoiOSAppStoreRelease.markdown
similarity index 100%
rename from Technotes/How To Do iOS App Store Release.md
rename to Technotes/HowToDoiOSAppStoreRelease.markdown
diff --git a/Technotes/How To Do iOS TestFlight Release.md b/Technotes/HowToDoiOSTestFlightRelease.markdown
similarity index 100%
rename from Technotes/How To Do iOS TestFlight Release.md
rename to Technotes/HowToDoiOSTestFlightRelease.markdown
From ec21816ac157be7becafb97f93835c1e1754c029 Mon Sep 17 00:00:00 2001
From: Dimitris Apostolou
Date: Wed, 27 Aug 2025 14:37:19 +0300
Subject: [PATCH 25/25] Fix typos
---
.../Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift | 2 +-
Modules/RSCore/Sources/RSCore/Shared/String+RSCore.swift | 2 +-
Modules/RSCore/Tests/RSCoreTests/MainThreadOperationTests.swift | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Modules/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift b/Modules/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift
index 2d0bcddb2..2f5d04ce8 100644
--- a/Modules/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift
+++ b/Modules/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift
@@ -18,7 +18,7 @@ final class FeedlyAccountDelegate: AccountDelegate {
/// Feedly has a sandbox API and a production API.
/// This property is referred to when clients need to know which environment it should be pointing to.
- /// The value of this proptery must match any `OAuthAuthorizationClient` used.
+ /// The value of this property must match any `OAuthAuthorizationClient` used.
/// Currently this is always returning the cloud API, but we are leaving it stubbed out for now.
static var environment: FeedlyAPICaller.API {
return .cloud
diff --git a/Modules/RSCore/Sources/RSCore/Shared/String+RSCore.swift b/Modules/RSCore/Sources/RSCore/Shared/String+RSCore.swift
index 237a268d0..28c651a30 100644
--- a/Modules/RSCore/Sources/RSCore/Shared/String+RSCore.swift
+++ b/Modules/RSCore/Sources/RSCore/Shared/String+RSCore.swift
@@ -195,7 +195,7 @@ public extension String {
/// - `>` matches the literal `>` character.
/// - `[\\s\\S]*?`
/// - `[\\s\\S]` matches _any_ character, including new lines.
- /// - `*` will match zero or more of the preceeding character, in this case _any_
+ /// - `*` will match zero or more of the preceding character, in this case _any_
/// character.
/// - `?` switches the matching mode to [lazy](https://javascript.info/regexp-greedy-and-lazy)
/// so it will match as few as characters as possible before satisfying the rest of the pattern.
diff --git a/Modules/RSCore/Tests/RSCoreTests/MainThreadOperationTests.swift b/Modules/RSCore/Tests/RSCoreTests/MainThreadOperationTests.swift
index 1ab9eae94..976376201 100644
--- a/Modules/RSCore/Tests/RSCoreTests/MainThreadOperationTests.swift
+++ b/Modules/RSCore/Tests/RSCoreTests/MainThreadOperationTests.swift
@@ -240,7 +240,7 @@ class MainThreadOperationTests: XCTestCase {
func run() {
guard let block = didStartRunBlock else {
- XCTFail("Unable to test cancelation of running operation.")
+ XCTFail("Unable to test cancellation of running operation.")
return
}
block()