diff --git a/Example/SPM/FlexLayoutSample-SPM.xcodeproj/project.pbxproj b/Example/SPM/FlexLayoutSample-SPM.xcodeproj/project.pbxproj index 3076c9a..2fb2c88 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", diff --git a/Package.swift b/Package.swift index 1c514ce..8c5f895 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"]), diff --git a/Podfile.lock b/Podfile.lock index 3252b8f..9899cd7 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 diff --git a/README.md b/README.md index fa70009..bb5d117 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 diff --git a/Sources/Swift/FlexLayout.swift b/Sources/Swift/FlexLayout.swift index 211d31b..1d7782d 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 { // diff --git a/Sources/Swift/Impl/UIView+FlexLayout.swift b/Sources/Swift/Impl/UIView+FlexLayout.swift index cb8ec2c..c617c17 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 { diff --git a/Tests/FlexLayoutTests/FlexLayoutTests.swift b/Tests/FlexLayoutTests/FlexLayoutTests.swift index 0b18c35..bb215a7 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 07591e3..a7bfb54 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 4ff50d4..b98e119 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 af4c497..3f0fc72 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 0a76e4a..e43f775 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 9baf2a7..d247e87 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()