From 4f1a2eabd37846ab6f54d63afb2660b847aa81a5 Mon Sep 17 00:00:00 2001 From: Vladislav Komkov Date: Tue, 20 Jan 2026 16:09:06 +0100 Subject: [PATCH 1/6] =?UTF-8?q?=F0=9F=90=9B=20Add=20obj-c=20name=20for=20b?= =?UTF-8?q?aseViewController?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/ACKategories/Base/ViewController.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/ACKategories/Base/ViewController.swift b/Sources/ACKategories/Base/ViewController.swift index 3feda3d..37d2566 100644 --- a/Sources/ACKategories/Base/ViewController.swift +++ b/Sources/ACKategories/Base/ViewController.swift @@ -9,6 +9,7 @@ extension Base { public static var viewControllerMemoryLoggingEnabled: Bool = true /// Base class for all view controllers + @objc(BaseViewController) open class ViewController: UIViewController { /// Navigation bar is shown/hidden in viewWillAppear according to this flag From 72ade3326809c68b5598087cb5424fda8c56484b Mon Sep 17 00:00:00 2001 From: Vladislav Komkov Date: Tue, 20 Jan 2026 16:26:15 +0100 Subject: [PATCH 2/6] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Move=20BaseViewControl?= =?UTF-8?q?ler=20out=20of=20Base=20namespace?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ACKategories/Base/ViewController.swift | 87 ++++++++++--------- 1 file changed, 45 insertions(+), 42 deletions(-) diff --git a/Sources/ACKategories/Base/ViewController.swift b/Sources/ACKategories/Base/ViewController.swift index 37d2566..eacfc82 100644 --- a/Sources/ACKategories/Base/ViewController.swift +++ b/Sources/ACKategories/Base/ViewController.swift @@ -3,69 +3,72 @@ import UIKit import os.log extension Base { - /// Turn on/off logging of init/deinit of all VCs /// ⚠️ Has no effect when Base.memoryLoggingEnabled is true public static var viewControllerMemoryLoggingEnabled: Bool = true +} - /// Base class for all view controllers - @objc(BaseViewController) - open class ViewController: UIViewController { +extension Base { + @available(*, deprecated, message: "Use BaseViewController instead") + public typealias ViewController = BaseViewController +} - /// Navigation bar is shown/hidden in viewWillAppear according to this flag - open var hasNavigationBar: Bool = true +/// Base class for all view controllers +open class BaseViewController: UIViewController { - public init() { - super.init(nibName: nil, bundle: nil) + /// Navigation bar is shown/hidden in viewWillAppear according to this flag + open var hasNavigationBar: Bool = true - if Base.memoryLoggingEnabled && Base.viewControllerMemoryLoggingEnabled { - os_log("📱 👶 %@", log: Logger.lifecycleLog(), type: .info, self) - } - } + public init() { + super.init(nibName: nil, bundle: nil) - @available(*, unavailable) - required public init?(coder aDecoder: NSCoder) { - fatalError("init(coder:) has not been implemented") + if Base.memoryLoggingEnabled && Base.viewControllerMemoryLoggingEnabled { + os_log("📱 👶 %@", log: Logger.lifecycleLog(), type: .info, self) } + } - private var firstWillAppearOccurred = false + @available(*, unavailable) + required public init?(coder aDecoder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } - override open func viewWillAppear(_ animated: Bool) { - super.viewWillAppear(animated) + private var firstWillAppearOccurred = false - if !firstWillAppearOccurred { - viewWillFirstAppear(animated) - firstWillAppearOccurred = true - } + override open func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) - navigationController?.setNavigationBarHidden(!hasNavigationBar, animated: animated) + if !firstWillAppearOccurred { + viewWillFirstAppear(animated) + firstWillAppearOccurred = true } - private var firstDidAppearOccurred = false + navigationController?.setNavigationBarHidden(!hasNavigationBar, animated: animated) + } - override open func viewDidAppear(_ animated: Bool) { - super.viewDidAppear(animated) + private var firstDidAppearOccurred = false - if !firstDidAppearOccurred { - viewDidFirstAppear(animated) - firstDidAppearOccurred = true - } - } + override open func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) - /// Method is called when `viewWillAppear(_:)` is called for the first time - open func viewWillFirstAppear(_ animated: Bool) { - // to be overridden + if !firstDidAppearOccurred { + viewDidFirstAppear(animated) + firstDidAppearOccurred = true } + } - /// Method is called when `viewDidAppear(_:)` is called for the first time - open func viewDidFirstAppear(_ animated: Bool) { - // to be overridden - } + /// Method is called when `viewWillAppear(_:)` is called for the first time + open func viewWillFirstAppear(_ animated: Bool) { + // to be overridden + } + + /// Method is called when `viewDidAppear(_:)` is called for the first time + open func viewDidFirstAppear(_ animated: Bool) { + // to be overridden + } - deinit { - if Base.memoryLoggingEnabled && Base.viewControllerMemoryLoggingEnabled { - os_log("📱 ⚰️ %@", log: Logger.lifecycleLog(), type: .info, self) - } + deinit { + if Base.memoryLoggingEnabled && Base.viewControllerMemoryLoggingEnabled { + os_log("📱 ⚰️ %@", log: Logger.lifecycleLog(), type: .info, self) } } } From 2cde7b2664417e2e81869db8fc706b45a99cbaee Mon Sep 17 00:00:00 2001 From: Vladislav Komkov Date: Wed, 21 Jan 2026 15:53:19 +0100 Subject: [PATCH 3/6] =?UTF-8?q?=E2=9C=A8=20Add=20objc=20class=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/ACKategories/Base/ViewController.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/ACKategories/Base/ViewController.swift b/Sources/ACKategories/Base/ViewController.swift index eacfc82..5eebf6b 100644 --- a/Sources/ACKategories/Base/ViewController.swift +++ b/Sources/ACKategories/Base/ViewController.swift @@ -14,6 +14,7 @@ extension Base { } /// Base class for all view controllers +@objc(ACKBaseViewController) open class BaseViewController: UIViewController { /// Navigation bar is shown/hidden in viewWillAppear according to this flag From 3f8867fd5bd2345c2be28d7d82f06c9aaca81afc Mon Sep 17 00:00:00 2001 From: Vladislav Komkov Date: Wed, 21 Jan 2026 15:53:34 +0100 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=90=9B=20Fix=20typo=20in=20documentat?= =?UTF-8?q?ion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/ACKategories/Base/ViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ACKategories/Base/ViewController.swift b/Sources/ACKategories/Base/ViewController.swift index 5eebf6b..8012b97 100644 --- a/Sources/ACKategories/Base/ViewController.swift +++ b/Sources/ACKategories/Base/ViewController.swift @@ -4,7 +4,7 @@ import os.log extension Base { /// Turn on/off logging of init/deinit of all VCs - /// ⚠️ Has no effect when Base.memoryLoggingEnabled is true + /// ⚠️ Has no effect when Base.memoryLoggingEnabled is false public static var viewControllerMemoryLoggingEnabled: Bool = true } From ac5e31b344fafe76b66d0a48e1e57e7cd1dc9661 Mon Sep 17 00:00:00 2001 From: Vladislav Komkov Date: Wed, 21 Jan 2026 15:55:54 +0100 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=93=9D=20Update=20change=20log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f70c0fe..b752ea9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -- please enter new entries in format +- please enter new entries in format ``` - (#, kudos to @) @@ -8,6 +8,10 @@ ## Next +- Rename `Base.ViewController` to `BaseViewController` ([#155] (https://github.com/AckeeCZ/ACKategories/pull/150), kudos to @komkovla) + - Add Objective-C name annotation `@objc(ACKBaseViewController)` for better Objective-C interoperability + - Add deprecated typealias `Base.ViewController` for backward compatibility + - Fix comment typo in `Base.viewControllerMemoryLoggingEnabled` - Add `readSize` and `readFrame` to SwiftUI views ([#150](https://github.com/AckeeCZ/ACKategories/pull/150), kudos to @olejnjak) - Add `WithLayoutMargins` to SwiftUI extensions ([#150](https://github.com/AckeeCZ/ACKategories/pull/151), kudos to @komkovla) @@ -93,7 +97,7 @@ - Put `stop` of `childCoordinators` on main thread ([#103](https://github.com/AckeeCZ/ACKategories/pull/103), kudos to @IgorRosocha) -### Added +### Added - Add completion blocks to `UINavigationController` pop and push methods ([#101](https://github.com/AckeeCZ/ACKategories/pull/101), kudos to @olejnjak) - Add possibility to configure GradientView with public properties `colors` and `axis` even after init ([#104](https://github.com/AckeeCZ/ACKategories/pull/104), kudos to @janmisar) @@ -139,7 +143,7 @@ ### Fixed -- Encoding of primitive values ([#90](https://github.com/AckeeCZ/ACKategories/pull/90), kudos to @fortmarek) +- Encoding of primitive values ([#90](https://github.com/AckeeCZ/ACKategories/pull/90), kudos to @fortmarek) - `completion` of `Base.FlowCoordinator.stop()` is sometimes not called ([#94](https://github.com/AckeeCZ/ACKategories/pull/94), kudos to @lukashromadnik) ## 6.6.0 @@ -233,6 +237,6 @@ ## 6.0.2 - move from NSLog to unified logging (#39, kudos to @fortmarek) -- allow additional logic for isEmpty for collections (#40, kudos to @fortmarek) +- allow additional logic for isEmpty for collections (#40, kudos to @fortmarek) - add LICENSE file to Cocoapods source files From d03b6087fb8b6a738659af8a57d9eeb64aa9ff31 Mon Sep 17 00:00:00 2001 From: Vladislav Komkov Date: Thu, 26 Mar 2026 18:11:42 +0100 Subject: [PATCH 6/6] =?UTF-8?q?=E2=9C=A8=20Add=20Objc=20annotation=20for?= =?UTF-8?q?=20objc=20interface?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 5 +++++ Sources/ACKategories/UI/GradientView.swift | 1 + Sources/ACKategories/UI/Popup/PopupModalAnimation.swift | 1 + .../ACKategories/UI/SelfSizingTableHeaderFooterView.swift | 1 + Sources/PushNotifications/PushManager.swift | 1 + 5 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed1d914..612e037 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,11 @@ - Add Objective-C name annotation `@objc(ACKBaseViewController)` for better Objective-C interoperability - Add deprecated typealias `Base.ViewController` for backward compatibility - Fix comment typo in `Base.viewControllerMemoryLoggingEnabled` +- Add `@objc(ACK...)` name annotations to all ObjC-visible public classes ([#155](https://github.com/AckeeCZ/ACKategories/pull/155)) + - `GradientView` → `@objc(ACKGradientView)` + - `PopupModalAnimation` → `@objc(ACKPopupModalAnimation)` + - `SelfSizingTableHeaderFooterView` → `@objc(ACKSelfSizingTableHeaderFooterView)` + - `PushManager` → `@objc(ACKPushManager)` ## 6.16.0 diff --git a/Sources/ACKategories/UI/GradientView.swift b/Sources/ACKategories/UI/GradientView.swift index 37b1287..d9dbcb7 100644 --- a/Sources/ACKategories/UI/GradientView.swift +++ b/Sources/ACKategories/UI/GradientView.swift @@ -7,6 +7,7 @@ import UIKit `[UIColor.white, UIColor.white.withAlphaComponent(0)]` */ +@objc(ACKGradientView) open class GradientView: UIView { override open class var layerClass: Swift.AnyClass { CAGradientLayer.self } diff --git a/Sources/ACKategories/UI/Popup/PopupModalAnimation.swift b/Sources/ACKategories/UI/Popup/PopupModalAnimation.swift index cb5c2b3..4b2a19f 100644 --- a/Sources/ACKategories/UI/Popup/PopupModalAnimation.swift +++ b/Sources/ACKategories/UI/Popup/PopupModalAnimation.swift @@ -3,6 +3,7 @@ import Foundation import UIKit /// Animation for presenting popups +@objc(ACKPopupModalAnimation) public final class PopupModalAnimation: NSObject, UIViewControllerAnimatedTransitioning { /// Popup horizontal inset diff --git a/Sources/ACKategories/UI/SelfSizingTableHeaderFooterView.swift b/Sources/ACKategories/UI/SelfSizingTableHeaderFooterView.swift index 2c83cf1..91a36de 100644 --- a/Sources/ACKategories/UI/SelfSizingTableHeaderFooterView.swift +++ b/Sources/ACKategories/UI/SelfSizingTableHeaderFooterView.swift @@ -2,6 +2,7 @@ import UIKit /// This view will autolayout its height, even when used as a tableHeaderView or tableFooterView. +@objc(ACKSelfSizingTableHeaderFooterView) open class SelfSizingTableHeaderFooterView: UITableViewHeaderFooterView { private enum Status { diff --git a/Sources/PushNotifications/PushManager.swift b/Sources/PushNotifications/PushManager.swift index 9345251..0d4b12c 100644 --- a/Sources/PushNotifications/PushManager.swift +++ b/Sources/PushNotifications/PushManager.swift @@ -29,6 +29,7 @@ public extension PushManaging where Self: PushManagingActions { } @available(iOS 13.0, macOS 10.15, watchOS 6.0, tvOS 13.0, *) +@objc(ACKPushManager) public final class PushManager: NSObject, PushManaging, PushManagingActions { public private(set) lazy var notificationSettings = AsyncStream { continuation in notificationSettingsContinuation = continuation