From 74c81db3a5f922f4ac414bb79b9e71982d22086b Mon Sep 17 00:00:00 2001 From: heoblitz Date: Sun, 20 Jul 2025 15:12:28 +0900 Subject: [PATCH 1/7] Add @MainActor isolation to flexLayoutAssociatedObjectHandle --- Sources/Swift/Impl/UIView+FlexLayout.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/Swift/Impl/UIView+FlexLayout.swift b/Sources/Swift/Impl/UIView+FlexLayout.swift index cb8ec2c0..c617c177 100644 --- a/Sources/Swift/Impl/UIView+FlexLayout.swift +++ b/Sources/Swift/Impl/UIView+FlexLayout.swift @@ -14,6 +14,7 @@ import UIKit +@MainActor private var flexLayoutAssociatedObjectHandle = 72_399_923 extension UIView { From 021e80a9f8f96c7297225b999aff846b7351673c Mon Sep 17 00:00:00 2001 From: heoblitz Date: Sun, 20 Jul 2025 15:13:26 +0900 Subject: [PATCH 2/7] Add @MainActor isolation to Flex --- Sources/Swift/FlexLayout.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/Swift/FlexLayout.swift b/Sources/Swift/FlexLayout.swift index 211d31bf..1d7782d3 100644 --- a/Sources/Swift/FlexLayout.swift +++ b/Sources/Swift/FlexLayout.swift @@ -26,6 +26,7 @@ import FlexLayoutYogaKit label.flex.margin(10) ``` */ +@MainActor public final class Flex { // From 1500ac63372a3926a6297d682df3a988696ec46b Mon Sep 17 00:00:00 2001 From: heoblitz Date: Sun, 20 Jul 2025 15:17:15 +0900 Subject: [PATCH 3/7] Update SPM deployment target to iOS 13 --- Package.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index 1c514cee..8c5f8952 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.3 +// swift-tools-version:5.5 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -6,7 +6,7 @@ import PackageDescription let package = Package( name: "FlexLayout", platforms: [ - .iOS(.v12), + .iOS(.v13), ], products: [ .library(name: "FlexLayout", targets: ["FlexLayout"]), From 902b08c613eb007cfc64169e65345523bdd412af Mon Sep 17 00:00:00 2001 From: heoblitz Date: Sun, 20 Jul 2025 15:18:32 +0900 Subject: [PATCH 4/7] Fix Tests --- Tests/FlexLayoutTests/FlexLayoutTests.swift | 1 + Tests/FlexLayoutTests/InsetTests.swift | 7 ++++--- Tests/FlexLayoutTests/JustifyContentTests.swift | 7 ++++--- Tests/FlexLayoutTests/MarginTests.swift | 7 ++++--- Tests/FlexLayoutTests/PaddingTests.swift | 7 ++++--- Tests/FlexLayoutTests/WidthSizeContentTests.swift | 7 ++++--- 6 files changed, 21 insertions(+), 15 deletions(-) diff --git a/Tests/FlexLayoutTests/FlexLayoutTests.swift b/Tests/FlexLayoutTests/FlexLayoutTests.swift index 0b18c35f..bb215a74 100644 --- a/Tests/FlexLayoutTests/FlexLayoutTests.swift +++ b/Tests/FlexLayoutTests/FlexLayoutTests.swift @@ -13,6 +13,7 @@ import XCTest @testable import FlexLayout +@MainActor final class FlexLayoutTests: XCTestCase { func testRetainCycle() { diff --git a/Tests/FlexLayoutTests/InsetTests.swift b/Tests/FlexLayoutTests/InsetTests.swift index 07591e32..a7bfb547 100644 --- a/Tests/FlexLayoutTests/InsetTests.swift +++ b/Tests/FlexLayoutTests/InsetTests.swift @@ -13,14 +13,15 @@ import FlexLayout import XCTest -final class InsetTests: XCTestCase { +@MainActor +final class InsetTests: XCTestCase, Sendable { var viewController: UIViewController! var rootFlexContainer: UIView! var aView: UIView! - override func setUp() { - super.setUp() + override func setUp() async throws { + try await super.setUp() viewController = UIViewController() diff --git a/Tests/FlexLayoutTests/JustifyContentTests.swift b/Tests/FlexLayoutTests/JustifyContentTests.swift index 4ff50d45..b98e1195 100644 --- a/Tests/FlexLayoutTests/JustifyContentTests.swift +++ b/Tests/FlexLayoutTests/JustifyContentTests.swift @@ -13,7 +13,8 @@ import FlexLayout import XCTest -final class JustifyContentTests: XCTestCase { +@MainActor +final class JustifyContentTests: XCTestCase, Sendable { var viewController: UIViewController! var rootFlexContainer: UIView! @@ -22,8 +23,8 @@ final class JustifyContentTests: XCTestCase { var cView: UIView! var dView: UIView! - override func setUp() { - super.setUp() + override func setUp() async throws { + try await super.setUp() viewController = UIViewController() diff --git a/Tests/FlexLayoutTests/MarginTests.swift b/Tests/FlexLayoutTests/MarginTests.swift index af4c497e..3f0fc72a 100644 --- a/Tests/FlexLayoutTests/MarginTests.swift +++ b/Tests/FlexLayoutTests/MarginTests.swift @@ -13,14 +13,15 @@ import FlexLayout import XCTest -final class MarginTests: XCTestCase { +@MainActor +final class MarginTests: XCTestCase, Sendable { var viewController: UIViewController! var rootFlexContainer: UIView! var aView: UIView! - override func setUp() { - super.setUp() + override func setUp() async throws { + try await super.setUp() viewController = UIViewController() diff --git a/Tests/FlexLayoutTests/PaddingTests.swift b/Tests/FlexLayoutTests/PaddingTests.swift index 0a76e4a9..e43f7758 100644 --- a/Tests/FlexLayoutTests/PaddingTests.swift +++ b/Tests/FlexLayoutTests/PaddingTests.swift @@ -13,14 +13,15 @@ import FlexLayout import XCTest -final class PaddingTests: XCTestCase { +@MainActor +final class PaddingTests: XCTestCase, Sendable { var viewController: UIViewController! var rootFlexContainer: UIView! var aView: UIView! - override func setUp() { - super.setUp() + override func setUp() async throws { + try await super.setUp() viewController = UIViewController() diff --git a/Tests/FlexLayoutTests/WidthSizeContentTests.swift b/Tests/FlexLayoutTests/WidthSizeContentTests.swift index 9baf2a70..d247e872 100644 --- a/Tests/FlexLayoutTests/WidthSizeContentTests.swift +++ b/Tests/FlexLayoutTests/WidthSizeContentTests.swift @@ -13,7 +13,8 @@ import FlexLayout import XCTest -final class WidthSizeContentTests: XCTestCase { +@MainActor +final class WidthSizeContentTests: XCTestCase, Sendable { var viewController: UIViewController! var rootFlexContainer: UIView! @@ -21,8 +22,8 @@ final class WidthSizeContentTests: XCTestCase { var bView: UIView! var cView: UIView! - override func setUp() { - super.setUp() + override func setUp() async throws { + try await super.setUp() viewController = UIViewController() From baeb5d134c7de66421d84ce3d746d1113d9deb08 Mon Sep 17 00:00:00 2001 From: heoblitz Date: Sun, 20 Jul 2025 15:25:17 +0900 Subject: [PATCH 5/7] Update README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fa700093..bb5d117e 100644 --- a/README.md +++ b/README.md @@ -23,9 +23,9 @@ Flexbox is an incredible improvement over UIStackView. It is simpler to use, muc ### Requirements -* iOS 12.0+ -* Xcode 12.0+ -* Swift Swift 4.0 +* iOS 13.0+ +* Xcode 13.0+ +* Swift 5.5 ### Content From 7b531f42d5ad0114b8a49640155625d4fd1e0d63 Mon Sep 17 00:00:00 2001 From: heoblitz Date: Sun, 20 Jul 2025 15:39:38 +0900 Subject: [PATCH 6/7] Update SPM Example Project deployment target to iOS 13 --- Example/SPM/FlexLayoutSample-SPM.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Example/SPM/FlexLayoutSample-SPM.xcodeproj/project.pbxproj b/Example/SPM/FlexLayoutSample-SPM.xcodeproj/project.pbxproj index 3076c9a8..2fb2c88f 100644 --- a/Example/SPM/FlexLayoutSample-SPM.xcodeproj/project.pbxproj +++ b/Example/SPM/FlexLayoutSample-SPM.xcodeproj/project.pbxproj @@ -608,7 +608,7 @@ "$(inherited)", ); INFOPLIST_FILE = "../FlexLayoutSample/Supporting Files/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -631,7 +631,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = "../FlexLayoutSample/Supporting Files/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", From e1bc1c3c22792d22720b6f14542340bdc4ed4752 Mon Sep 17 00:00:00 2001 From: heoblitz Date: Sun, 20 Jul 2025 15:40:03 +0900 Subject: [PATCH 7/7] Update Podfile --- Podfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Podfile.lock b/Podfile.lock index 3252b8f8..9899cd7a 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - FlexLayout (2.2.0): + - FlexLayout (2.2.1): - Yoga (= 3.2.1) - PinLayout (1.10.5) - SwiftLint (0.55.1) @@ -22,7 +22,7 @@ EXTERNAL SOURCES: :path: "./" SPEC CHECKSUMS: - FlexLayout: a8947ca2446760b5203ba5a3d862023c92a82fce + FlexLayout: fe365fe6e4a7bf1a53b7421a75acf4c7991e3575 PinLayout: f6c2b63a5a5b24864064e1d15c67de41b4e74748 SwiftLint: 3fe909719babe5537c552ee8181c0031392be933 Yoga: 636ce73bd247407928a7df089f3bc3675916b3ff