Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 12.0.1 #50

Merged
merged 6 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ADUtils.podspec
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
3 changes: 0 additions & 3 deletions ADUtilsTests/DynamicFontTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,18 @@ import SnapshotTesting

private extension UIFont {

@MainActor
class func ad_mainFont(forTextStyle textStyle: UIFont.TextStyle) -> UIFont {
return FontHelper.shared.helveticaNeueDynamicFont.font(forTextStyle: textStyle)
}
}

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()
Expand Down
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

## [12.0.0] - 2023-11-08Z
## [12.0.1] - 2023-11-21

### 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

### Added
- Add Swift Concurrency support
Expand All @@ -28,7 +34,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

Expand Down
12 changes: 0 additions & 12 deletions Modules/ADUtils/DynamicFont.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import SwiftUI
/**
The DynamicFontProvider protocol provides a font depending on parameters
*/
@MainActor
public protocol DynamicFontProvider {

/**
Expand All @@ -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
Expand Down Expand Up @@ -82,7 +80,6 @@ private struct DefaultDynamicFontProvider: DynamicFontProvider {
}
}

@MainActor
private struct CustomFontDynamicFontProvider: DynamicFontProvider {

let fontDescription: FontDescription
Expand All @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
12 changes: 6 additions & 6 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -30,7 +30,7 @@ EXTERNAL SOURCES:
:path: "./"

SPEC CHECKSUMS:
ADUtils: 393dbb0c1fd8c458367eb487f348862d37a5c983
ADUtils: c41598aac077f54d909c9fcd95e06927c00ad85a
Nimble: b279b3ca9e094508778aab5c76417be158d3ad04
OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8
Quick: efab97aca76d60be86c15daa533b2cdfbe1a74d3
Expand Down
3 changes: 2 additions & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading