From e7bd9e3da637ac31e6de2e8f043be94823f68211 Mon Sep 17 00:00:00 2001 From: Alexandre Podlewski Date: Tue, 21 Nov 2023 14:37:12 +0100 Subject: [PATCH 1/6] Update fastfile to use proper date format when updating changelog --- fastlane/Fastfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 681da75..0fd31d4 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -80,7 +80,8 @@ def update_changelog(target_version) changelog_path = ENV["CHANGELOG"] stamp_changelog( changelog_path: changelog_path, - section_identifier: "#{target_version}" + section_identifier: "#{target_version}", + stamp_datetime_format: '%F' ) git_add(path: changelog_path) From 0d5c6995b337ac8a8bfabcf67adf9e534732d5a7 Mon Sep 17 00:00:00 2001 From: Alexandre Podlewski Date: Tue, 21 Nov 2023 14:38:10 +0100 Subject: [PATCH 2/6] Remove unwanted timezone from date format --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc42171..e042544 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. ## [Unreleased] -## [12.0.0] - 2023-11-08Z +## [12.0.0] - 2023-11-08 ### Added - Add Swift Concurrency support @@ -28,7 +28,7 @@ All notable changes to this project will be documented in this file. - Add a SwiftUI Font provider in `DynamicFont` -## [11.3.0] - 2022-08-01Z +## [11.3.0] - 2022-08-01 ### Created From 65ea9070f060cf437ae73acf181c0bc1a583468b Mon Sep 17 00:00:00 2001 From: Alexandre Podlewski Date: Tue, 21 Nov 2023 14:34:03 +0100 Subject: [PATCH 3/6] Fix Package.swift --- CHANGELOG.md | 3 +++ Package.swift | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e042544..6e19433 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Fixed +- Fix iOS and tvOS supported versions in Package.swift + ## [12.0.0] - 2023-11-08 ### Added diff --git a/Package.swift b/Package.swift index 01b4f98..397c724 100644 --- a/Package.swift +++ b/Package.swift @@ -1,12 +1,12 @@ -// swift-tools-version:5.2 +// swift-tools-version:5.7 import PackageDescription let package = Package( name: "ADUtils", platforms: [ - .iOS(.v13), - .tvOS(.v13) + .iOS(.v14), + .tvOS(.v14) ], products: [ .library( From 7a793b5fd57cf896f4d927feb7b4361e7e878310 Mon Sep 17 00:00:00 2001 From: Alexandre Podlewski Date: Tue, 21 Nov 2023 14:40:46 +0100 Subject: [PATCH 4/6] Update CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e19433..92feb29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +## [12.0.1] - 2023-11-21 + ### Fixed - Fix iOS and tvOS supported versions in Package.swift From 7a5b64856777324b054fe5a641b1b0552e492fff Mon Sep 17 00:00:00 2001 From: Alexandre Podlewski Date: Tue, 21 Nov 2023 14:40:48 +0100 Subject: [PATCH 5/6] Bump to 12.0.1 --- ADUtils.podspec | 2 +- Podfile.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ADUtils.podspec b/ADUtils.podspec index b0a5d93..72a86f8 100644 --- a/ADUtils.podspec +++ b/ADUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'ADUtils' - spec.version = '12.0.0' + spec.version = '12.0.1' spec.authors = 'Fabernovel' spec.homepage = 'https://github.com/faberNovel/ADUtils' spec.summary = 'Fabernovel\'s toolbox for iOS' diff --git a/Podfile.lock b/Podfile.lock index 19fb34f..e0efb9d 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,10 +1,10 @@ PODS: - - ADUtils (12.0.0): - - ADUtils/objc (= 12.0.0) - - ADUtils/objc (12.0.0): + - ADUtils (12.0.1): + - ADUtils/objc (= 12.0.1) + - ADUtils/objc (12.0.1): - ADUtils/Swift - - ADUtils/Security (12.0.0) - - ADUtils/Swift (12.0.0) + - ADUtils/Security (12.0.1) + - ADUtils/Swift (12.0.1) - Nimble (12.0.1) - OCMock (3.9.1) - Quick (7.0.2) @@ -30,7 +30,7 @@ EXTERNAL SOURCES: :path: "./" SPEC CHECKSUMS: - ADUtils: 393dbb0c1fd8c458367eb487f348862d37a5c983 + ADUtils: c41598aac077f54d909c9fcd95e06927c00ad85a Nimble: b279b3ca9e094508778aab5c76417be158d3ad04 OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8 Quick: efab97aca76d60be86c15daa533b2cdfbe1a74d3 From 8413ffecb7a03b55547dac49110577ddbd8bdcf4 Mon Sep 17 00:00:00 2001 From: Alexandre Podlewski Date: Tue, 21 Nov 2023 15:30:07 +0100 Subject: [PATCH 6/6] Remove MainActor attribute from `DynamicFontProvider` as it is not required --- ADUtilsTests/DynamicFontTest.swift | 3 --- CHANGELOG.md | 1 + Modules/ADUtils/DynamicFont.swift | 12 ------------ 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/ADUtilsTests/DynamicFontTest.swift b/ADUtilsTests/DynamicFontTest.swift index 93d1196..f17703c 100644 --- a/ADUtilsTests/DynamicFontTest.swift +++ b/ADUtilsTests/DynamicFontTest.swift @@ -14,7 +14,6 @@ import SnapshotTesting private extension UIFont { - @MainActor class func ad_mainFont(forTextStyle textStyle: UIFont.TextStyle) -> UIFont { return FontHelper.shared.helveticaNeueDynamicFont.font(forTextStyle: textStyle) } @@ -22,13 +21,11 @@ private extension UIFont { private extension Font { - @MainActor static func ad_mainFont(forTextStyle textStyle: Font.TextStyle) -> Font { return FontHelper.shared.helveticaNeueDynamicFont.font(forTextStyle: textStyle) } } -@MainActor private class FontHelper { static let shared = FontHelper() diff --git a/CHANGELOG.md b/CHANGELOG.md index 92feb29..b587ab5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file. ### Fixed - Fix iOS and tvOS supported versions in Package.swift +- Remove MainActor attribute from `DynamicFontProvider` as it is not required ## [12.0.0] - 2023-11-08 diff --git a/Modules/ADUtils/DynamicFont.swift b/Modules/ADUtils/DynamicFont.swift index 2b3b4d8..cd8560d 100644 --- a/Modules/ADUtils/DynamicFont.swift +++ b/Modules/ADUtils/DynamicFont.swift @@ -12,7 +12,6 @@ import SwiftUI /** The DynamicFontProvider protocol provides a font depending on parameters */ -@MainActor public protocol DynamicFontProvider { /** @@ -32,7 +31,6 @@ public protocol DynamicFontProvider { The DynamicFont provides an implemementation of DynamicFontProvider depending on a plist resource and/or a default implementation, meaning providing the system preferred font for each font */ -@MainActor public struct DynamicFont: DynamicFontProvider { private let provider: DynamicFontProvider @@ -82,7 +80,6 @@ private struct DefaultDynamicFontProvider: DynamicFontProvider { } } -@MainActor private struct CustomFontDynamicFontProvider: DynamicFontProvider { let fontDescription: FontDescription @@ -109,15 +106,6 @@ private struct CustomFontDynamicFontProvider: DynamicFontProvider { // MARK: - Private - private var currentSpecifiedContentSizeCategory: UIContentSizeCategory { - var currentContentSizeCategory = UIScreen.main.traitCollection.preferredContentSizeCategory - if currentContentSizeCategory == .unspecified { - // (Benjamin Lavialle) 2017-10-20 fallback on default category - currentContentSizeCategory = .large - } - return currentContentSizeCategory - } - private func throwingFont(forTextStyle textStyle: Font.TextStyle) throws -> Font { let styleDescription = try fontDescription.fontStyleDescription(for: textStyle) return Font.custom(styleDescription.name, size: styleDescription.size, relativeTo: textStyle)