diff --git a/.github/workflows/validations.yml b/.github/workflows/validations.yml
index 88a6607..64baab2 100644
--- a/.github/workflows/validations.yml
+++ b/.github/workflows/validations.yml
@@ -19,32 +19,40 @@ jobs:
needs: [lint]
steps:
- - uses: actions/checkout@v2
+ - name: Setup Swift
+ uses: SwiftyLab/setup-swift@latest
+
+ - name: Checkout
+ uses: actions/checkout@v2
with:
fetch-depth: 200
- - name: "Run xcodebuild"
+ - name: Setup XCode
+ uses: maxim-lobanov/setup-xcode@v1
+ with:
+ xcode-version: '16.2'
+
+ - name: Selecting XCode Version
+ run: sudo xcode-select -switch /Applications/Xcode_16.2.app
+
+ - name: Install iOS platform
+ run: |
+ xcodebuild -downloadPlatform iOS -buildVersion 18.2
+
+ - name: List available simulators (debug)
+ run: xcrun simctl list devices
+
+ - name: Run xcodebuild
env:
XCODE_PROJECT: "Swissors.xcodeproj"
XCODE_SCHEME: "Swissors"
- SIMULATOR_NAME: "iPhone 11"
run: |
set -o pipefail
xcodebuild -version
xcodebuild -showsdks
env NSUnbufferedIO=YES xcodebuild build \
- -project "${XCODE_PROJECT}" \
-scheme "${XCODE_SCHEME}" \
-configuration Debug \
- -destination "platform=iOS Simulator,name=${SIMULATOR_NAME}" \
+ -destination "platform=iOS Simulator,name=iPhone 16,OS=18.2" \
-derivedDataPath "DerivedData" \
- COMPILER_INDEX_STORE_ENABLE=NO \
- CODE_SIGN_IDENTITY="" \
- CODE_SIGNING_REQUIRED=NO \
- ONLY_ACTIVE_ARCH=YES \
- ENABLE_TESTABILITY=YES \
- DEBUG_INFORMATION_FORMAT="dwarf" \
- GCC_OPTIMIZATION_LEVEL="0" \
- SWIFT_COMPILATION_MODE="singlefile" \
- SWIFT_OPTIMIZATION_LEVEL="-Onone" \
| xcpretty
diff --git a/.gitignore b/.gitignore
index 8c45523..7c23f74 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,7 +7,11 @@
.build/
xcuserdata/
xcshareddata/*
+
+# Swiift Package
+DerivedData/
.swiftpm
+build/
# Carthage
Carthage/Build
diff --git a/.swiftlint.yml b/.swiftlint.yml
index 3e0148f..7add33f 100644
--- a/.swiftlint.yml
+++ b/.swiftlint.yml
@@ -19,7 +19,7 @@ excluded:
# Uncomment and configure this in project's branch
deployment_target:
- iOS_deployment_target: "8.0"
+ iOS_deployment_target: "12.0"
# macOS_deployment_target: "10.14"
# watchOS_deployment_target: "5.0"
# tvOS_deployment_target: "12.0"
diff --git a/LICENSE b/LICENSE
index f3a17e5..cae44d2 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2016 e-Legion
+Copyright (c) 2025 e-Legion
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/Package.swift b/Package.swift
index 68acdd9..be25b86 100644
--- a/Package.swift
+++ b/Package.swift
@@ -1,4 +1,4 @@
-// swift-tools-version:5.0
+// swift-tools-version:6.0
// 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: "Swissors",
platforms: [
- .iOS(.v11),
+ .iOS(.v12),
],
products: [
.library(
diff --git a/README.md b/README.md
index 62d0bb1..08ca916 100755
--- a/README.md
+++ b/README.md
@@ -2,17 +2,11 @@
## Requirements
-Swift 5.0, Xcode 10.2
+Swift 6.0, Xcode 16.2
## Installation
-With CocoaPods:
-
-```
-source 'https://github.com/elegion/ios-podspecs.git'
-
-pod 'Swissors'
-```
+With Swift Package Manager only.
## Author
diff --git a/Sources/Swissors/Extensions/Dispatch/DispatchQueue+Swissors.swift b/Sources/Swissors/Extensions/Dispatch/DispatchQueue+Swissors.swift
index 2f5549a..33a98cb 100644
--- a/Sources/Swissors/Extensions/Dispatch/DispatchQueue+Swissors.swift
+++ b/Sources/Swissors/Extensions/Dispatch/DispatchQueue+Swissors.swift
@@ -11,7 +11,7 @@ import Foundation
extension DispatchQueue {
class var currentLabel: String {
- String(validatingUTF8: __dispatch_queue_get_label(nil)) ?? "unknown"
+ String(cString: __dispatch_queue_get_label(nil))
}
func safeSerialSync(execute block: @escaping () -> Void) {
diff --git a/Sources/Swissors/Extensions/UIKit/NSLayoutConstraint+Swissors.swift b/Sources/Swissors/Extensions/UIKit/NSLayoutConstraint+Swissors.swift
index 7d7be19..b2359b8 100644
--- a/Sources/Swissors/Extensions/UIKit/NSLayoutConstraint+Swissors.swift
+++ b/Sources/Swissors/Extensions/UIKit/NSLayoutConstraint+Swissors.swift
@@ -6,6 +6,7 @@
// Copyright © 2017 e-Legion. All rights reserved.
//
+#if canImport(UIKit)
import UIKit
public extension NSLayoutConstraint {
@@ -22,3 +23,4 @@ public extension NSLayoutConstraint {
with(priority: priority)
}
}
+#endif
diff --git a/Sources/Swissors/Extensions/UIKit/UIApplication+Swissors.swift b/Sources/Swissors/Extensions/UIKit/UIApplication+Swissors.swift
index d898569..11ffdb9 100644
--- a/Sources/Swissors/Extensions/UIKit/UIApplication+Swissors.swift
+++ b/Sources/Swissors/Extensions/UIKit/UIApplication+Swissors.swift
@@ -6,6 +6,7 @@
// Copyright © 2016 e-Legion. All rights reserved.
//
+#if canImport(UIKit)
import UIKit
public extension UIApplication {
@@ -35,13 +36,8 @@ public extension UIApplication {
emptyController.present(viewController, animated: animated, completion: nil)
}
- func openURL(_ url: URL, completionHandler completion: ((Bool) -> Void)? = nil) {
- if #available(iOS 10.0, *) {
- self.open(url, options: [:], completionHandler: completion)
- } else {
- let result = self.openURL(url)
- completion?(result)
- }
+ func openURL(_ url: URL, completionHandler completion: (@MainActor @Sendable (Bool) -> Void)? = nil) {
+ self.open(url, options: [:], completionHandler: completion)
}
// MARK: Deprecated
@@ -63,7 +59,9 @@ public extension UIApplication {
}
@available(*, deprecated, renamed: "openURL")
- func sw_openURL(_ url: URL, completionHandler completion: ((Bool) -> Void)? = nil) {
+ func sw_openURL(_ url: URL, completionHandler completion: (@MainActor @Sendable (Bool) -> Void)? = nil) {
openURL(url, completionHandler: completion)
}
}
+
+#endif
diff --git a/Sources/Swissors/Extensions/UIKit/UICollectionView+Swissors.swift b/Sources/Swissors/Extensions/UIKit/UICollectionView+Swissors.swift
index 525d659..52e3e03 100644
--- a/Sources/Swissors/Extensions/UIKit/UICollectionView+Swissors.swift
+++ b/Sources/Swissors/Extensions/UIKit/UICollectionView+Swissors.swift
@@ -6,6 +6,7 @@
// Copyright © 2016 e-Legion. All rights reserved.
//
+#if canImport(UIKit)
import UIKit
public extension UICollectionView {
@@ -71,3 +72,5 @@ public extension UICollectionView {
dequeueHeaderFooter(of: viewType, kind: kind, for: indexPath)
}
}
+
+#endif
diff --git a/Sources/Swissors/Extensions/UIKit/UIColor+Swissors.swift b/Sources/Swissors/Extensions/UIKit/UIColor+Swissors.swift
index 645ae15..da0cb68 100644
--- a/Sources/Swissors/Extensions/UIKit/UIColor+Swissors.swift
+++ b/Sources/Swissors/Extensions/UIKit/UIColor+Swissors.swift
@@ -7,6 +7,7 @@
//
import Foundation
+#if canImport(UIKit)
import UIKit
public extension UIColor {
@@ -223,3 +224,4 @@ public extension CGColor {
uiColor
}
}
+#endif
diff --git a/Sources/Swissors/Extensions/UIKit/UIEdgeInsets+Swissors.swift b/Sources/Swissors/Extensions/UIKit/UIEdgeInsets+Swissors.swift
index 7116816..cb92a72 100644
--- a/Sources/Swissors/Extensions/UIKit/UIEdgeInsets+Swissors.swift
+++ b/Sources/Swissors/Extensions/UIKit/UIEdgeInsets+Swissors.swift
@@ -5,6 +5,7 @@
// Created by viktor.volkov on 15.04.2022.
//
+#if canImport(UIKit)
import UIKit
public extension UIEdgeInsets {
@@ -104,3 +105,5 @@ public extension UIEdgeInsets {
self.init(top: vertical, left: .zero, bottom: vertical, right: right)
}
}
+
+#endif
diff --git a/Sources/Swissors/Extensions/UIKit/UIImage+Swissors.swift b/Sources/Swissors/Extensions/UIKit/UIImage+Swissors.swift
index acf6375..c30c2b3 100644
--- a/Sources/Swissors/Extensions/UIKit/UIImage+Swissors.swift
+++ b/Sources/Swissors/Extensions/UIKit/UIImage+Swissors.swift
@@ -6,6 +6,7 @@
// Copyright © 2017 e-Legion. All rights reserved.
//
+#if canImport(UIKit)
import UIKit
public extension UIImage {
@@ -82,6 +83,7 @@ public extension UIImage {
}
}
+ @MainActor
class func ovalImage(with size: CGSize, color: UIColor, fill: Bool) -> UIImage? {
image(with: size) {
_, rect in
@@ -155,6 +157,7 @@ public extension UIImage {
}
@available(*, deprecated, renamed: "ovalImage")
+ @MainActor
class func sw_ovalImage(with size: CGSize, color: UIColor, fill: Bool) -> UIImage? {
ovalImage(with: size, color: color, fill: fill)
}
@@ -164,3 +167,5 @@ public extension UIImage {
alphaBlended(with: color)
}
}
+
+#endif
diff --git a/Sources/Swissors/Extensions/UIKit/UINib+Swissors.swift b/Sources/Swissors/Extensions/UIKit/UINib+Swissors.swift
index 75a3a11..6acc22c 100644
--- a/Sources/Swissors/Extensions/UIKit/UINib+Swissors.swift
+++ b/Sources/Swissors/Extensions/UIKit/UINib+Swissors.swift
@@ -6,6 +6,7 @@
// Copyright © 2017 e-Legion. All rights reserved.
//
+#if canImport(UIKit)
import UIKit
public extension UINib {
@@ -18,3 +19,4 @@ public extension UINib {
self.init(nibName: name, bundle: bundle)
}
}
+#endif
diff --git a/Sources/Swissors/Extensions/UIKit/UIRectCorner+Swissors.swift b/Sources/Swissors/Extensions/UIKit/UIRectCorner+Swissors.swift
index 9b9200a..4176d80 100644
--- a/Sources/Swissors/Extensions/UIKit/UIRectCorner+Swissors.swift
+++ b/Sources/Swissors/Extensions/UIKit/UIRectCorner+Swissors.swift
@@ -6,6 +6,7 @@
// Copyright © 2017 e-Legion. All rights reserved.
//
+#if canImport(UIKit)
import UIKit
public extension UIRectCorner {
@@ -13,3 +14,5 @@ public extension UIRectCorner {
static let bottom: UIRectCorner = [.bottomLeft, .bottomRight]
static let top: UIRectCorner = [.topLeft, .topRight]
}
+
+#endif
diff --git a/Sources/Swissors/Extensions/UIKit/UIStackView+Swissors.swift b/Sources/Swissors/Extensions/UIKit/UIStackView+Swissors.swift
index 306b699..4400803 100644
--- a/Sources/Swissors/Extensions/UIKit/UIStackView+Swissors.swift
+++ b/Sources/Swissors/Extensions/UIKit/UIStackView+Swissors.swift
@@ -5,6 +5,7 @@
// Created by viktor.volkov on 15.04.2022.
//
+#if canImport(UIKit)
import UIKit
public extension UIStackView {
@@ -52,3 +53,4 @@ public extension UIStackView {
return removedSubviews
}
}
+#endif
diff --git a/Sources/Swissors/Extensions/UIKit/UITableView+Swissors.swift b/Sources/Swissors/Extensions/UIKit/UITableView+Swissors.swift
index 222cfd6..70657b6 100644
--- a/Sources/Swissors/Extensions/UIKit/UITableView+Swissors.swift
+++ b/Sources/Swissors/Extensions/UIKit/UITableView+Swissors.swift
@@ -6,6 +6,7 @@
// Copyright © 2016 e-Legion. All rights reserved.
//
+#if canImport(UIKit)
import UIKit
public extension UITableView {
@@ -64,3 +65,5 @@ public extension UITableView {
dequeueHeaderFooter(of: viewType)
}
}
+
+#endif
diff --git a/Sources/Swissors/Extensions/UIKit/UIView+Swissors.swift b/Sources/Swissors/Extensions/UIKit/UIView+Swissors.swift
index 293a549..fb241eb 100644
--- a/Sources/Swissors/Extensions/UIKit/UIView+Swissors.swift
+++ b/Sources/Swissors/Extensions/UIKit/UIView+Swissors.swift
@@ -6,6 +6,7 @@
// Copyright © 2016 e-Legion. All rights reserved.
//
+#if canImport(UIKit)
import UIKit
public extension UIView {
@@ -13,47 +14,12 @@ public extension UIView {
// MARK: - Public
static func fullFrameConstraints(for superView: UIView, subview: UIView, with insets: UIEdgeInsets = .zero) -> [NSLayoutConstraint] {
- if #available(iOS 9.0, *) {
- return [
- subview.topAnchor.constraint(equalTo: superView.topAnchor, constant: insets.top),
- subview.bottomAnchor.constraint(equalTo: superView.bottomAnchor, constant: -insets.bottom),
- subview.leadingAnchor.constraint(equalTo: superView.leadingAnchor, constant: insets.left),
- subview.trailingAnchor.constraint(equalTo: superView.trailingAnchor, constant: -insets.right),
- ]
- } else {
- return [NSLayoutConstraint(item: subview,
- attribute: .top,
- relatedBy: .equal,
- toItem: superView,
- attribute: .top,
- multiplier: 1.0,
- constant: insets.top),
-
- NSLayoutConstraint(item: subview,
- attribute: .left,
- relatedBy: .equal,
- toItem: superView,
- attribute: .left,
- multiplier: 1.0,
- constant: insets.left),
-
- NSLayoutConstraint(item: subview,
- attribute: .bottom,
- relatedBy: .equal,
- toItem: superView,
- attribute: .bottom,
- multiplier: 1.0,
- constant: -insets.bottom),
-
- NSLayoutConstraint(item: subview,
- attribute: .right,
- relatedBy: .equal,
- toItem: superView,
- attribute: .right,
- multiplier: 1,
- constant: -insets.right),
- ]
- }
+ return [
+ subview.topAnchor.constraint(equalTo: superView.topAnchor, constant: insets.top),
+ subview.bottomAnchor.constraint(equalTo: superView.bottomAnchor, constant: -insets.bottom),
+ subview.leadingAnchor.constraint(equalTo: superView.leadingAnchor, constant: insets.left),
+ subview.trailingAnchor.constraint(equalTo: superView.trailingAnchor, constant: -insets.right),
+ ]
}
class func viewFromNib(in bundle: Bundle = Bundle.main, owner: Any? = nil, options: [UINib.OptionsKey: Any]? = nil) -> Self {
@@ -208,3 +174,4 @@ public extension UIView {
descendants(of: targetClass, avoiding: avoidedViews)
}
}
+#endif
diff --git a/Sources/Swissors/Extensions/UIKit/UIViewAutoresizing+Swissors.swift b/Sources/Swissors/Extensions/UIKit/UIViewAutoresizing+Swissors.swift
index f7274c9..566b804 100644
--- a/Sources/Swissors/Extensions/UIKit/UIViewAutoresizing+Swissors.swift
+++ b/Sources/Swissors/Extensions/UIKit/UIViewAutoresizing+Swissors.swift
@@ -6,6 +6,7 @@
// Copyright © 2017 e-Legion. All rights reserved.
//
+#if canImport(UIKit)
import UIKit
public extension UIView.AutoresizingMask {
@@ -29,3 +30,5 @@ public extension UIView.AutoresizingMask {
flexibleSize
}()
}
+
+#endif
diff --git a/Sources/Swissors/Extensions/UIKit/UIViewController+Swissors.swift b/Sources/Swissors/Extensions/UIKit/UIViewController+Swissors.swift
index 174fdc6..fceb95b 100644
--- a/Sources/Swissors/Extensions/UIKit/UIViewController+Swissors.swift
+++ b/Sources/Swissors/Extensions/UIKit/UIViewController+Swissors.swift
@@ -6,6 +6,7 @@
// Copyright © 2016 e-Legion. All rights reserved.
//
+#if canImport(UIKit)
import UIKit
public extension UIViewController {
@@ -36,3 +37,5 @@ public extension UIViewController {
removeFromParentViewController()
}
}
+
+#endif
diff --git a/Sources/Swissors/Extensions/UIKit/UIWindow+Swissors.swift b/Sources/Swissors/Extensions/UIKit/UIWindow+Swissors.swift
index c26950c..8d02cd2 100644
--- a/Sources/Swissors/Extensions/UIKit/UIWindow+Swissors.swift
+++ b/Sources/Swissors/Extensions/UIKit/UIWindow+Swissors.swift
@@ -6,6 +6,7 @@
// Copyright © 2016 e-Legion. All rights reserved.
//
+#if canImport(UIKit)
import UIKit
public extension UIWindow {
@@ -126,3 +127,5 @@ public extension UIWindow {
dismissPresentedViewControllers(for: viewController, completion: completion)
}
}
+
+#endif
diff --git a/Sources/Swissors/Info.plist b/Sources/Swissors/Info.plist
deleted file mode 100644
index d3de8ee..0000000
--- a/Sources/Swissors/Info.plist
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- en
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- FMWK
- CFBundleShortVersionString
- 1.0
- CFBundleSignature
- ????
- CFBundleVersion
- $(CURRENT_PROJECT_VERSION)
- NSPrincipalClass
-
-
-
diff --git a/Sources/Swissors/Swissors.h b/Sources/Swissors/Swissors.h
deleted file mode 100644
index 8d0a3e7..0000000
--- a/Sources/Swissors/Swissors.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-// Swissors.h
-// Swissors
-//
-// Created by Ilya Kulebyakin on 8/3/16.
-// Copyright © 2016 e-Legion. All rights reserved.
-//
-
-#import
-
-//! Project version number for Swissors.
-FOUNDATION_EXPORT double SwissorsVersionNumber;
-
-//! Project version string for Swissors.
-FOUNDATION_EXPORT const unsigned char SwissorsVersionString[];
-
-// In this header, you should import all the public headers of your framework using statements like #import
diff --git a/Sources/Swissors/Types/AttributedStringBuilder.swift b/Sources/Swissors/Types/AttributedStringBuilder.swift
index b50781f..78cd092 100644
--- a/Sources/Swissors/Types/AttributedStringBuilder.swift
+++ b/Sources/Swissors/Types/AttributedStringBuilder.swift
@@ -6,6 +6,7 @@
// Copyright © 2017 SB. All rights reserved.
//
+#if canImport(UIKit)
import UIKit
public enum AttributedStringBuilderError: Swift.Error {
@@ -409,58 +410,6 @@ extension AttributedStringBuilder {
Don't forget about calling build() function after all attributes are set.
*/
- @available (iOS, obsoleted: 9.0)
- public func withParagraphStyle(withLineSpacing lineSpacing: CGFloat? = nil,
- paragraphSpacing: CGFloat? = nil,
- alignment: NSTextAlignment? = nil,
- firstLineHeadIndent: CGFloat? = nil,
- headIndent: CGFloat? = nil,
- tailIndent: CGFloat? = nil,
- lineBreakMode: NSLineBreakMode? = nil,
- minimumLineHeight: CGFloat? = nil,
- maximumLineHeight: CGFloat? = nil,
- baseWritingDirection: NSWritingDirection? = nil,
- lineHeightMultiple: CGFloat? = nil,
- paragraphSpacingBefore: CGFloat? = nil,
- hyphenationFactor: Float? = nil,
- tabStops: [NSTextTab]? = nil,
- defaultTabInterval: CGFloat? = nil,
- range: NSRange? = nil) -> AttributedStringBuilder {
-
- let resultParagraphStyle = paragraphStyle(withLineSpacing: lineSpacing,
- paragraphSpacing: paragraphSpacing,
- alignment: alignment,
- firstLineHeadIndent: firstLineHeadIndent,
- headIndent: headIndent,
- tailIndent: tailIndent,
- lineBreakMode: lineBreakMode,
- minimumLineHeight: minimumLineHeight,
- maximumLineHeight: maximumLineHeight,
- baseWritingDirection: baseWritingDirection,
- lineHeightMultiple: lineHeightMultiple,
- paragraphSpacingBefore: paragraphSpacing,
- hyphenationFactor: hyphenationFactor,
- tabStops: tabStops,
- defaultTabInterval: defaultTabInterval,
- range: range)
-
- return with(paragraphStyle: resultParagraphStyle)
- }
-
- /**
- Adds paragraph style with your own properties to attrubutes array of string builder.
-
- - returns:
- Attributed string builder with modified attributes array.
-
- - parameters:
- - all properties of NSMutableParagraphStyle
- - range: Range on which attribute will be applied. Optional parameter. Defaults to full range.
-
- Don't forget about calling build() function after all attributes are set.
- */
-
- @available (iOS 9.0, *)
public func withParagraphStyle(withLineSpacing lineSpacing: CGFloat? = nil,
paragraphSpacing: CGFloat? = nil,
alignment: NSTextAlignment? = nil,
@@ -832,10 +781,10 @@ extension AttributedStringBuilder {
resultParagraphStyle.tabStops = tabStops ?? resultParagraphStyle.tabStops
resultParagraphStyle.defaultTabInterval = defaultTabInterval ?? resultParagraphStyle.defaultTabInterval
- if #available(iOS 9, *) {
- resultParagraphStyle.allowsDefaultTighteningForTruncation = allowsDefaultTighteningForTruncation ?? resultParagraphStyle.allowsDefaultTighteningForTruncation
- }
+ resultParagraphStyle.allowsDefaultTighteningForTruncation = allowsDefaultTighteningForTruncation ?? resultParagraphStyle.allowsDefaultTighteningForTruncation
return resultParagraphStyle
}
}
+
+#endif
diff --git a/Sources/Swissors/Types/KeyboardObserver.swift b/Sources/Swissors/Types/KeyboardObserver.swift
index 36073ff..d8f00da 100644
--- a/Sources/Swissors/Types/KeyboardObserver.swift
+++ b/Sources/Swissors/Types/KeyboardObserver.swift
@@ -7,8 +7,10 @@
//
import Foundation
+#if canImport(UIKit)
import UIKit
+@MainActor
public class KeyboardObserver {
public typealias ObservationInfo = (beginFrame: CGRect,
@@ -21,8 +23,6 @@ public class KeyboardObserver {
public static let shared = KeyboardObserver()
- var keyboardFrame: CGRect = .null
-
private var observers: [ObservationTuple] = []
private init() {
@@ -58,12 +58,7 @@ public class KeyboardObserver {
return
}
- var isLocal: Bool?
- if #available(iOS 9.0, *) {
- isLocal = userInfo[UIResponder.keyboardIsLocalUserInfoKey] as? Bool
- }
-
- keyboardFrame = endFrame
+ let isLocal = userInfo[UIResponder.keyboardIsLocalUserInfoKey] as? Bool
let info: ObservationInfo = (beginFrame, endFrame, animationDuration, curve, isLocal ?? true)
notify(with: info)
@@ -82,6 +77,7 @@ public class KeyboardObserver {
}
}
+@MainActor
public extension KeyboardObserver {
typealias HeightInfo = (height: CGFloat, animationDuration: TimeInterval, curve: UIView.AnimationCurve)
@@ -135,3 +131,5 @@ public extension KeyboardObserver {
}
}
}
+
+#endif
diff --git a/Sources/Swissors/Types/Throttler.swift b/Sources/Swissors/Types/Throttler.swift
index 14bd990..74ca9f2 100644
--- a/Sources/Swissors/Types/Throttler.swift
+++ b/Sources/Swissors/Types/Throttler.swift
@@ -6,7 +6,7 @@
// Copyright © 2017 e-Legion. All rights reserved.
//
-import Foundation
+@preconcurrency import Foundation
public class Throttler {
@@ -33,8 +33,9 @@ public class Throttler {
}
} else {
executionQueue.asyncAfter(deadline: .now() + delay) {
- if self.currentItem === workItem {
- self.currentItem = nil
+ [currentItem] in
+
+ if currentItem === workItem {
workItem.perform()
}
}
diff --git a/Swissors.podspec b/Swissors.podspec
deleted file mode 100644
index 07d2981..0000000
--- a/Swissors.podspec
+++ /dev/null
@@ -1,13 +0,0 @@
-Pod::Spec.new do |s|
- s.name = File.basename(__FILE__).chomp(".podspec")
- s.version = '2.1.0'
- s.summary = 'Swift utilities'
- s.homepage = 'https://github.com/elegion/ios-Swissors'
- s.license = 'MIT'
- s.author = { 'Ilya Kulebyakin' => 'ilya.kulebyakin@e-legion.com' }
- s.source = { :git => 'https://github.com/elegion/ios-Swissors.git', :tag => "v#{s.version}" }
- s.swift_versions = '5.0'
- s.ios.deployment_target = '9.0'
- s.source_files = 'Sources/**/*.swift'
- s.frameworks = 'Foundation', 'UIKit'
-end
diff --git a/Swissors.xcodeproj/Swissors_Info.plist b/Swissors.xcodeproj/Swissors_Info.plist
deleted file mode 100644
index 57ada9f..0000000
--- a/Swissors.xcodeproj/Swissors_Info.plist
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
- CFBundleDevelopmentRegion
- en
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- FMWK
- CFBundleShortVersionString
- 1.0
- CFBundleSignature
- ????
- CFBundleVersion
- $(CURRENT_PROJECT_VERSION)
- NSPrincipalClass
-
-
-
diff --git a/Swissors.xcodeproj/project.pbxproj b/Swissors.xcodeproj/project.pbxproj
deleted file mode 100644
index 7597fac..0000000
--- a/Swissors.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,1003 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 46;
- objects = {
-
-/* Begin PBXAggregateTarget section */
- "ios-swissors::SwissorsPackageTests::ProductTarget" /* SwissorsPackageTests */ = {
- isa = PBXAggregateTarget;
- buildConfigurationList = OBJ_173 /* Build configuration list for PBXAggregateTarget "SwissorsPackageTests" */;
- buildPhases = (
- );
- dependencies = (
- OBJ_176 /* PBXTargetDependency */,
- );
- name = SwissorsPackageTests;
- productName = SwissorsPackageTests;
- };
-/* End PBXAggregateTarget section */
-
-/* Begin PBXBuildFile section */
- OBJ_100 /* DefaultTrue.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_70 /* DefaultTrue.swift */; };
- OBJ_101 /* ISO8601Strategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_71 /* ISO8601Strategy.swift */; };
- OBJ_102 /* ISO8601WithFractionalSecondsStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_72 /* ISO8601WithFractionalSecondsStrategy.swift */; };
- OBJ_103 /* LosslessArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_73 /* LosslessArray.swift */; };
- OBJ_104 /* LosslessValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_74 /* LosslessValue.swift */; };
- OBJ_105 /* LossyArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_75 /* LossyArray.swift */; };
- OBJ_106 /* LossyDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_76 /* LossyDictionary.swift */; };
- OBJ_107 /* LossyOptional.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_77 /* LossyOptional.swift */; };
- OBJ_108 /* RFC2822Strategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_78 /* RFC2822Strategy.swift */; };
- OBJ_109 /* RFC3339Strategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_79 /* RFC3339Strategy.swift */; };
- OBJ_110 /* TimestampStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_80 /* TimestampStrategy.swift */; };
- OBJ_111 /* YearMonthDayStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_81 /* YearMonthDayStrategy.swift */; };
- OBJ_118 /* Package.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_82 /* Package.swift */; };
- OBJ_124 /* DefaultDateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_12 /* DefaultDateFormatter.swift */; };
- OBJ_125 /* DefaultURLStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_13 /* DefaultURLStrategy.swift */; };
- OBJ_126 /* OptionalDateValueCodableFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_14 /* OptionalDateValueCodableFormatter.swift */; };
- OBJ_127 /* CGPoint+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_17 /* CGPoint+Swissors.swift */; };
- OBJ_128 /* CGRect+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_18 /* CGRect+Swissors.swift */; };
- OBJ_129 /* CGSize+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_19 /* CGSize+Swissors.swift */; };
- OBJ_130 /* DispatchQueue+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_21 /* DispatchQueue+Swissors.swift */; };
- OBJ_131 /* Bundle+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_23 /* Bundle+Swissors.swift */; };
- OBJ_132 /* Date+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_24 /* Date+Swissors.swift */; };
- OBJ_133 /* Decimal+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_25 /* Decimal+Swissors.swift */; };
- OBJ_134 /* FileManager+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_26 /* FileManager+Swissors.swift */; };
- OBJ_135 /* Locale+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_27 /* Locale+Swissors.swift */; };
- OBJ_136 /* NSError+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_28 /* NSError+Swissors.swift */; };
- OBJ_137 /* NSRange+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_29 /* NSRange+Swissors.swift */; };
- OBJ_138 /* Collection+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_31 /* Collection+Swissors.swift */; };
- OBJ_139 /* Comparable + Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_32 /* Comparable + Swissors.swift */; };
- OBJ_140 /* FloatingPoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_33 /* FloatingPoint.swift */; };
- OBJ_141 /* Int+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_34 /* Int+Swissors.swift */; };
- OBJ_142 /* String+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_35 /* String+Swissors.swift */; };
- OBJ_143 /* NSLayoutConstraint+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_37 /* NSLayoutConstraint+Swissors.swift */; };
- OBJ_144 /* UIApplication+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_38 /* UIApplication+Swissors.swift */; };
- OBJ_145 /* UICollectionView+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_39 /* UICollectionView+Swissors.swift */; };
- OBJ_146 /* UIColor+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_40 /* UIColor+Swissors.swift */; };
- OBJ_147 /* UIEdgeInsets+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_41 /* UIEdgeInsets+Swissors.swift */; };
- OBJ_148 /* UIImage+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_42 /* UIImage+Swissors.swift */; };
- OBJ_149 /* UINib+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_43 /* UINib+Swissors.swift */; };
- OBJ_150 /* UIRectCorner+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_44 /* UIRectCorner+Swissors.swift */; };
- OBJ_151 /* UIStackView+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_45 /* UIStackView+Swissors.swift */; };
- OBJ_152 /* UITableView+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_46 /* UITableView+Swissors.swift */; };
- OBJ_153 /* UIView+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_47 /* UIView+Swissors.swift */; };
- OBJ_154 /* UIViewAutoresizing+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_48 /* UIViewAutoresizing+Swissors.swift */; };
- OBJ_155 /* UIViewController+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_49 /* UIViewController+Swissors.swift */; };
- OBJ_156 /* UIWindow+Swissors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_50 /* UIWindow+Swissors.swift */; };
- OBJ_157 /* AttributedStringBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_52 /* AttributedStringBuilder.swift */; };
- OBJ_158 /* Closure.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_53 /* Closure.swift */; };
- OBJ_159 /* KeyboardObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_54 /* KeyboardObserver.swift */; };
- OBJ_160 /* Throttler.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_55 /* Throttler.swift */; };
- OBJ_161 /* Weak.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_56 /* Weak.swift */; };
- OBJ_162 /* UserDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_58 /* UserDefault.swift */; };
- OBJ_164 /* BetterCodable.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = "bettercodable::BetterCodable::Product" /* BetterCodable.framework */; };
- OBJ_171 /* Package.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_6 /* Package.swift */; };
- OBJ_182 /* DefaultURLFormatterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_60 /* DefaultURLFormatterTests.swift */; };
- OBJ_183 /* DefaultDateFormatterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_61 /* DefaultDateFormatterTests.swift */; };
- OBJ_185 /* Swissors.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = "ios-swissors::Swissors::Product" /* Swissors.framework */; };
- OBJ_186 /* BetterCodable.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = "bettercodable::BetterCodable::Product" /* BetterCodable.framework */; };
- OBJ_95 /* DateValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_65 /* DateValue.swift */; };
- OBJ_96 /* DefaultCodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_66 /* DefaultCodable.swift */; };
- OBJ_97 /* DefaultEmptyArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_67 /* DefaultEmptyArray.swift */; };
- OBJ_98 /* DefaultEmptyDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_68 /* DefaultEmptyDictionary.swift */; };
- OBJ_99 /* DefaultFalse.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_69 /* DefaultFalse.swift */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXContainerItemProxy section */
- A20D17A32869990F00B3ADB5 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = OBJ_1 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = "bettercodable::BetterCodable";
- remoteInfo = BetterCodable;
- };
- A20D17A42869990F00B3ADB5 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = OBJ_1 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = "ios-swissors::Swissors";
- remoteInfo = Swissors;
- };
- A20D17A52869990F00B3ADB5 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = OBJ_1 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = "bettercodable::BetterCodable";
- remoteInfo = BetterCodable;
- };
- A20D17A62869990F00B3ADB5 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = OBJ_1 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = "ios-swissors::SwissorsTests";
- remoteInfo = SwissorsTests;
- };
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXFileReference section */
- OBJ_10 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- OBJ_12 /* DefaultDateFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultDateFormatter.swift; sourceTree = ""; };
- OBJ_13 /* DefaultURLStrategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultURLStrategy.swift; sourceTree = ""; };
- OBJ_14 /* OptionalDateValueCodableFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OptionalDateValueCodableFormatter.swift; sourceTree = ""; };
- OBJ_17 /* CGPoint+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGPoint+Swissors.swift"; sourceTree = ""; };
- OBJ_18 /* CGRect+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGRect+Swissors.swift"; sourceTree = ""; };
- OBJ_19 /* CGSize+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGSize+Swissors.swift"; sourceTree = ""; };
- OBJ_21 /* DispatchQueue+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "DispatchQueue+Swissors.swift"; sourceTree = ""; };
- OBJ_23 /* Bundle+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Bundle+Swissors.swift"; sourceTree = ""; };
- OBJ_24 /* Date+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Date+Swissors.swift"; sourceTree = ""; };
- OBJ_25 /* Decimal+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Decimal+Swissors.swift"; sourceTree = ""; };
- OBJ_26 /* FileManager+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FileManager+Swissors.swift"; sourceTree = ""; };
- OBJ_27 /* Locale+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Locale+Swissors.swift"; sourceTree = ""; };
- OBJ_28 /* NSError+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSError+Swissors.swift"; sourceTree = ""; };
- OBJ_29 /* NSRange+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSRange+Swissors.swift"; sourceTree = ""; };
- OBJ_31 /* Collection+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Collection+Swissors.swift"; sourceTree = ""; };
- OBJ_32 /* Comparable + Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Comparable + Swissors.swift"; sourceTree = ""; };
- OBJ_33 /* FloatingPoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FloatingPoint.swift; sourceTree = ""; };
- OBJ_34 /* Int+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Int+Swissors.swift"; sourceTree = ""; };
- OBJ_35 /* String+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Swissors.swift"; sourceTree = ""; };
- OBJ_37 /* NSLayoutConstraint+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSLayoutConstraint+Swissors.swift"; sourceTree = ""; };
- OBJ_38 /* UIApplication+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIApplication+Swissors.swift"; sourceTree = ""; };
- OBJ_39 /* UICollectionView+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UICollectionView+Swissors.swift"; sourceTree = ""; };
- OBJ_40 /* UIColor+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Swissors.swift"; sourceTree = ""; };
- OBJ_41 /* UIEdgeInsets+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIEdgeInsets+Swissors.swift"; sourceTree = ""; };
- OBJ_42 /* UIImage+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImage+Swissors.swift"; sourceTree = ""; };
- OBJ_43 /* UINib+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UINib+Swissors.swift"; sourceTree = ""; };
- OBJ_44 /* UIRectCorner+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIRectCorner+Swissors.swift"; sourceTree = ""; };
- OBJ_45 /* UIStackView+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIStackView+Swissors.swift"; sourceTree = ""; };
- OBJ_46 /* UITableView+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITableView+Swissors.swift"; sourceTree = ""; };
- OBJ_47 /* UIView+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Swissors.swift"; sourceTree = ""; };
- OBJ_48 /* UIViewAutoresizing+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewAutoresizing+Swissors.swift"; sourceTree = ""; };
- OBJ_49 /* UIViewController+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+Swissors.swift"; sourceTree = ""; };
- OBJ_50 /* UIWindow+Swissors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIWindow+Swissors.swift"; sourceTree = ""; };
- OBJ_52 /* AttributedStringBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AttributedStringBuilder.swift; sourceTree = ""; };
- OBJ_53 /* Closure.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Closure.swift; sourceTree = ""; };
- OBJ_54 /* KeyboardObserver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardObserver.swift; sourceTree = ""; };
- OBJ_55 /* Throttler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Throttler.swift; sourceTree = ""; };
- OBJ_56 /* Weak.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Weak.swift; sourceTree = ""; };
- OBJ_58 /* UserDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDefault.swift; sourceTree = ""; };
- OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; };
- OBJ_60 /* DefaultURLFormatterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultURLFormatterTests.swift; sourceTree = ""; };
- OBJ_61 /* DefaultDateFormatterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultDateFormatterTests.swift; sourceTree = ""; };
- OBJ_65 /* DateValue.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateValue.swift; sourceTree = ""; };
- OBJ_66 /* DefaultCodable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultCodable.swift; sourceTree = ""; };
- OBJ_67 /* DefaultEmptyArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultEmptyArray.swift; sourceTree = ""; };
- OBJ_68 /* DefaultEmptyDictionary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultEmptyDictionary.swift; sourceTree = ""; };
- OBJ_69 /* DefaultFalse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultFalse.swift; sourceTree = ""; };
- OBJ_70 /* DefaultTrue.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultTrue.swift; sourceTree = ""; };
- OBJ_71 /* ISO8601Strategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ISO8601Strategy.swift; sourceTree = ""; };
- OBJ_72 /* ISO8601WithFractionalSecondsStrategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ISO8601WithFractionalSecondsStrategy.swift; sourceTree = ""; };
- OBJ_73 /* LosslessArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LosslessArray.swift; sourceTree = ""; };
- OBJ_74 /* LosslessValue.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LosslessValue.swift; sourceTree = ""; };
- OBJ_75 /* LossyArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LossyArray.swift; sourceTree = ""; };
- OBJ_76 /* LossyDictionary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LossyDictionary.swift; sourceTree = ""; };
- OBJ_77 /* LossyOptional.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LossyOptional.swift; sourceTree = ""; };
- OBJ_78 /* RFC2822Strategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RFC2822Strategy.swift; sourceTree = ""; };
- OBJ_79 /* RFC3339Strategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RFC3339Strategy.swift; sourceTree = ""; };
- OBJ_80 /* TimestampStrategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimestampStrategy.swift; sourceTree = ""; };
- OBJ_81 /* YearMonthDayStrategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YearMonthDayStrategy.swift; sourceTree = ""; };
- OBJ_82 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; name = Package.swift; path = "/Users/maximbutin/Documents/Job/ios-Swissors/.build/checkouts/BetterCodable/Package.swift"; sourceTree = ""; };
- OBJ_87 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = ""; };
- OBJ_88 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; };
- OBJ_89 /* Swissors.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = Swissors.podspec; sourceTree = ""; };
- OBJ_9 /* Swissors.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Swissors.h; sourceTree = ""; };
- "bettercodable::BetterCodable::Product" /* BetterCodable.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = BetterCodable.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- "ios-swissors::Swissors::Product" /* Swissors.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Swissors.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- "ios-swissors::SwissorsTests::Product" /* SwissorsTests.xctest */ = {isa = PBXFileReference; lastKnownFileType = file; path = SwissorsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- OBJ_112 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 0;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- OBJ_163 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 0;
- files = (
- OBJ_164 /* BetterCodable.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- OBJ_184 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 0;
- files = (
- OBJ_185 /* Swissors.framework in Frameworks */,
- OBJ_186 /* BetterCodable.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- OBJ_11 /* Codable */ = {
- isa = PBXGroup;
- children = (
- OBJ_12 /* DefaultDateFormatter.swift */,
- OBJ_13 /* DefaultURLStrategy.swift */,
- OBJ_14 /* OptionalDateValueCodableFormatter.swift */,
- );
- path = Codable;
- sourceTree = "";
- };
- OBJ_15 /* Extensions */ = {
- isa = PBXGroup;
- children = (
- OBJ_16 /* CoreGraphics */,
- OBJ_20 /* Dispatch */,
- OBJ_22 /* Foundation */,
- OBJ_30 /* Swift */,
- OBJ_36 /* UIKit */,
- );
- path = Extensions;
- sourceTree = "";
- };
- OBJ_16 /* CoreGraphics */ = {
- isa = PBXGroup;
- children = (
- OBJ_17 /* CGPoint+Swissors.swift */,
- OBJ_18 /* CGRect+Swissors.swift */,
- OBJ_19 /* CGSize+Swissors.swift */,
- );
- path = CoreGraphics;
- sourceTree = "";
- };
- OBJ_20 /* Dispatch */ = {
- isa = PBXGroup;
- children = (
- OBJ_21 /* DispatchQueue+Swissors.swift */,
- );
- path = Dispatch;
- sourceTree = "";
- };
- OBJ_22 /* Foundation */ = {
- isa = PBXGroup;
- children = (
- OBJ_23 /* Bundle+Swissors.swift */,
- OBJ_24 /* Date+Swissors.swift */,
- OBJ_25 /* Decimal+Swissors.swift */,
- OBJ_26 /* FileManager+Swissors.swift */,
- OBJ_27 /* Locale+Swissors.swift */,
- OBJ_28 /* NSError+Swissors.swift */,
- OBJ_29 /* NSRange+Swissors.swift */,
- );
- path = Foundation;
- sourceTree = "";
- };
- OBJ_30 /* Swift */ = {
- isa = PBXGroup;
- children = (
- OBJ_31 /* Collection+Swissors.swift */,
- OBJ_32 /* Comparable + Swissors.swift */,
- OBJ_33 /* FloatingPoint.swift */,
- OBJ_34 /* Int+Swissors.swift */,
- OBJ_35 /* String+Swissors.swift */,
- );
- path = Swift;
- sourceTree = "";
- };
- OBJ_36 /* UIKit */ = {
- isa = PBXGroup;
- children = (
- OBJ_37 /* NSLayoutConstraint+Swissors.swift */,
- OBJ_38 /* UIApplication+Swissors.swift */,
- OBJ_39 /* UICollectionView+Swissors.swift */,
- OBJ_40 /* UIColor+Swissors.swift */,
- OBJ_41 /* UIEdgeInsets+Swissors.swift */,
- OBJ_42 /* UIImage+Swissors.swift */,
- OBJ_43 /* UINib+Swissors.swift */,
- OBJ_44 /* UIRectCorner+Swissors.swift */,
- OBJ_45 /* UIStackView+Swissors.swift */,
- OBJ_46 /* UITableView+Swissors.swift */,
- OBJ_47 /* UIView+Swissors.swift */,
- OBJ_48 /* UIViewAutoresizing+Swissors.swift */,
- OBJ_49 /* UIViewController+Swissors.swift */,
- OBJ_50 /* UIWindow+Swissors.swift */,
- );
- path = UIKit;
- sourceTree = "";
- };
- OBJ_5 /* */ = {
- isa = PBXGroup;
- children = (
- OBJ_6 /* Package.swift */,
- OBJ_7 /* Sources */,
- OBJ_59 /* Tests */,
- OBJ_62 /* Dependencies */,
- OBJ_83 /* Products */,
- OBJ_87 /* LICENSE */,
- OBJ_88 /* README.md */,
- OBJ_89 /* Swissors.podspec */,
- );
- name = "";
- sourceTree = "";
- };
- OBJ_51 /* Types */ = {
- isa = PBXGroup;
- children = (
- OBJ_52 /* AttributedStringBuilder.swift */,
- OBJ_53 /* Closure.swift */,
- OBJ_54 /* KeyboardObserver.swift */,
- OBJ_55 /* Throttler.swift */,
- OBJ_56 /* Weak.swift */,
- );
- path = Types;
- sourceTree = "";
- };
- OBJ_57 /* Wrappers */ = {
- isa = PBXGroup;
- children = (
- OBJ_58 /* UserDefault.swift */,
- );
- path = Wrappers;
- sourceTree = "";
- };
- OBJ_59 /* Tests */ = {
- isa = PBXGroup;
- children = (
- OBJ_60 /* DefaultURLFormatterTests.swift */,
- OBJ_61 /* DefaultDateFormatterTests.swift */,
- );
- path = Tests;
- sourceTree = SOURCE_ROOT;
- };
- OBJ_62 /* Dependencies */ = {
- isa = PBXGroup;
- children = (
- OBJ_63 /* BetterCodable 0.4.0 */,
- );
- name = Dependencies;
- sourceTree = "";
- };
- OBJ_63 /* BetterCodable 0.4.0 */ = {
- isa = PBXGroup;
- children = (
- OBJ_64 /* BetterCodable */,
- OBJ_82 /* Package.swift */,
- );
- name = "BetterCodable 0.4.0";
- sourceTree = SOURCE_ROOT;
- };
- OBJ_64 /* BetterCodable */ = {
- isa = PBXGroup;
- children = (
- OBJ_65 /* DateValue.swift */,
- OBJ_66 /* DefaultCodable.swift */,
- OBJ_67 /* DefaultEmptyArray.swift */,
- OBJ_68 /* DefaultEmptyDictionary.swift */,
- OBJ_69 /* DefaultFalse.swift */,
- OBJ_70 /* DefaultTrue.swift */,
- OBJ_71 /* ISO8601Strategy.swift */,
- OBJ_72 /* ISO8601WithFractionalSecondsStrategy.swift */,
- OBJ_73 /* LosslessArray.swift */,
- OBJ_74 /* LosslessValue.swift */,
- OBJ_75 /* LossyArray.swift */,
- OBJ_76 /* LossyDictionary.swift */,
- OBJ_77 /* LossyOptional.swift */,
- OBJ_78 /* RFC2822Strategy.swift */,
- OBJ_79 /* RFC3339Strategy.swift */,
- OBJ_80 /* TimestampStrategy.swift */,
- OBJ_81 /* YearMonthDayStrategy.swift */,
- );
- name = BetterCodable;
- path = .build/checkouts/BetterCodable/Sources/BetterCodable;
- sourceTree = SOURCE_ROOT;
- };
- OBJ_7 /* Sources */ = {
- isa = PBXGroup;
- children = (
- OBJ_8 /* Swissors */,
- );
- name = Sources;
- sourceTree = SOURCE_ROOT;
- };
- OBJ_8 /* Swissors */ = {
- isa = PBXGroup;
- children = (
- OBJ_9 /* Swissors.h */,
- OBJ_10 /* Info.plist */,
- OBJ_11 /* Codable */,
- OBJ_15 /* Extensions */,
- OBJ_51 /* Types */,
- OBJ_57 /* Wrappers */,
- );
- name = Swissors;
- path = Sources/Swissors;
- sourceTree = SOURCE_ROOT;
- };
- OBJ_83 /* Products */ = {
- isa = PBXGroup;
- children = (
- "bettercodable::BetterCodable::Product" /* BetterCodable.framework */,
- "ios-swissors::Swissors::Product" /* Swissors.framework */,
- "ios-swissors::SwissorsTests::Product" /* SwissorsTests.xctest */,
- );
- name = Products;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- "bettercodable::BetterCodable" /* BetterCodable */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = OBJ_91 /* Build configuration list for PBXNativeTarget "BetterCodable" */;
- buildPhases = (
- OBJ_94 /* Sources */,
- OBJ_112 /* Frameworks */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = BetterCodable;
- productName = BetterCodable;
- productReference = "bettercodable::BetterCodable::Product" /* BetterCodable.framework */;
- productType = "com.apple.product-type.framework";
- };
- "bettercodable::SwiftPMPackageDescription" /* BetterCodablePackageDescription */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = OBJ_114 /* Build configuration list for PBXNativeTarget "BetterCodablePackageDescription" */;
- buildPhases = (
- OBJ_117 /* Sources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = BetterCodablePackageDescription;
- productName = BetterCodablePackageDescription;
- productType = "com.apple.product-type.framework";
- };
- "ios-swissors::SwiftPMPackageDescription" /* SwissorsPackageDescription */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = OBJ_167 /* Build configuration list for PBXNativeTarget "SwissorsPackageDescription" */;
- buildPhases = (
- OBJ_170 /* Sources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = SwissorsPackageDescription;
- productName = SwissorsPackageDescription;
- productType = "com.apple.product-type.framework";
- };
- "ios-swissors::Swissors" /* Swissors */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = OBJ_120 /* Build configuration list for PBXNativeTarget "Swissors" */;
- buildPhases = (
- OBJ_123 /* Sources */,
- OBJ_163 /* Frameworks */,
- );
- buildRules = (
- );
- dependencies = (
- OBJ_165 /* PBXTargetDependency */,
- );
- name = Swissors;
- productName = Swissors;
- productReference = "ios-swissors::Swissors::Product" /* Swissors.framework */;
- productType = "com.apple.product-type.framework";
- };
- "ios-swissors::SwissorsTests" /* SwissorsTests */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = OBJ_178 /* Build configuration list for PBXNativeTarget "SwissorsTests" */;
- buildPhases = (
- OBJ_181 /* Sources */,
- OBJ_184 /* Frameworks */,
- );
- buildRules = (
- );
- dependencies = (
- OBJ_187 /* PBXTargetDependency */,
- OBJ_188 /* PBXTargetDependency */,
- );
- name = SwissorsTests;
- productName = SwissorsTests;
- productReference = "ios-swissors::SwissorsTests::Product" /* SwissorsTests.xctest */;
- productType = "com.apple.product-type.bundle.unit-test";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- OBJ_1 /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastSwiftMigration = 9999;
- LastUpgradeCheck = 9999;
- };
- buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "Swissors" */;
- compatibilityVersion = "Xcode 3.2";
- developmentRegion = en;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- );
- mainGroup = OBJ_5 /* */;
- productRefGroup = OBJ_83 /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- "bettercodable::BetterCodable" /* BetterCodable */,
- "bettercodable::SwiftPMPackageDescription" /* BetterCodablePackageDescription */,
- "ios-swissors::Swissors" /* Swissors */,
- "ios-swissors::SwiftPMPackageDescription" /* SwissorsPackageDescription */,
- "ios-swissors::SwissorsPackageTests::ProductTarget" /* SwissorsPackageTests */,
- "ios-swissors::SwissorsTests" /* SwissorsTests */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXSourcesBuildPhase section */
- OBJ_117 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 0;
- files = (
- OBJ_118 /* Package.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- OBJ_123 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 0;
- files = (
- OBJ_124 /* DefaultDateFormatter.swift in Sources */,
- OBJ_125 /* DefaultURLStrategy.swift in Sources */,
- OBJ_126 /* OptionalDateValueCodableFormatter.swift in Sources */,
- OBJ_127 /* CGPoint+Swissors.swift in Sources */,
- OBJ_128 /* CGRect+Swissors.swift in Sources */,
- OBJ_129 /* CGSize+Swissors.swift in Sources */,
- OBJ_130 /* DispatchQueue+Swissors.swift in Sources */,
- OBJ_131 /* Bundle+Swissors.swift in Sources */,
- OBJ_132 /* Date+Swissors.swift in Sources */,
- OBJ_133 /* Decimal+Swissors.swift in Sources */,
- OBJ_134 /* FileManager+Swissors.swift in Sources */,
- OBJ_135 /* Locale+Swissors.swift in Sources */,
- OBJ_136 /* NSError+Swissors.swift in Sources */,
- OBJ_137 /* NSRange+Swissors.swift in Sources */,
- OBJ_138 /* Collection+Swissors.swift in Sources */,
- OBJ_139 /* Comparable + Swissors.swift in Sources */,
- OBJ_140 /* FloatingPoint.swift in Sources */,
- OBJ_141 /* Int+Swissors.swift in Sources */,
- OBJ_142 /* String+Swissors.swift in Sources */,
- OBJ_143 /* NSLayoutConstraint+Swissors.swift in Sources */,
- OBJ_144 /* UIApplication+Swissors.swift in Sources */,
- OBJ_145 /* UICollectionView+Swissors.swift in Sources */,
- OBJ_146 /* UIColor+Swissors.swift in Sources */,
- OBJ_147 /* UIEdgeInsets+Swissors.swift in Sources */,
- OBJ_148 /* UIImage+Swissors.swift in Sources */,
- OBJ_149 /* UINib+Swissors.swift in Sources */,
- OBJ_150 /* UIRectCorner+Swissors.swift in Sources */,
- OBJ_151 /* UIStackView+Swissors.swift in Sources */,
- OBJ_152 /* UITableView+Swissors.swift in Sources */,
- OBJ_153 /* UIView+Swissors.swift in Sources */,
- OBJ_154 /* UIViewAutoresizing+Swissors.swift in Sources */,
- OBJ_155 /* UIViewController+Swissors.swift in Sources */,
- OBJ_156 /* UIWindow+Swissors.swift in Sources */,
- OBJ_157 /* AttributedStringBuilder.swift in Sources */,
- OBJ_158 /* Closure.swift in Sources */,
- OBJ_159 /* KeyboardObserver.swift in Sources */,
- OBJ_160 /* Throttler.swift in Sources */,
- OBJ_161 /* Weak.swift in Sources */,
- OBJ_162 /* UserDefault.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- OBJ_170 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 0;
- files = (
- OBJ_171 /* Package.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- OBJ_181 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 0;
- files = (
- OBJ_182 /* DefaultURLFormatterTests.swift in Sources */,
- OBJ_183 /* DefaultDateFormatterTests.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- OBJ_94 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 0;
- files = (
- OBJ_95 /* DateValue.swift in Sources */,
- OBJ_96 /* DefaultCodable.swift in Sources */,
- OBJ_97 /* DefaultEmptyArray.swift in Sources */,
- OBJ_98 /* DefaultEmptyDictionary.swift in Sources */,
- OBJ_99 /* DefaultFalse.swift in Sources */,
- OBJ_100 /* DefaultTrue.swift in Sources */,
- OBJ_101 /* ISO8601Strategy.swift in Sources */,
- OBJ_102 /* ISO8601WithFractionalSecondsStrategy.swift in Sources */,
- OBJ_103 /* LosslessArray.swift in Sources */,
- OBJ_104 /* LosslessValue.swift in Sources */,
- OBJ_105 /* LossyArray.swift in Sources */,
- OBJ_106 /* LossyDictionary.swift in Sources */,
- OBJ_107 /* LossyOptional.swift in Sources */,
- OBJ_108 /* RFC2822Strategy.swift in Sources */,
- OBJ_109 /* RFC3339Strategy.swift in Sources */,
- OBJ_110 /* TimestampStrategy.swift in Sources */,
- OBJ_111 /* YearMonthDayStrategy.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXTargetDependency section */
- OBJ_165 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = "bettercodable::BetterCodable" /* BetterCodable */;
- targetProxy = A20D17A32869990F00B3ADB5 /* PBXContainerItemProxy */;
- };
- OBJ_176 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = "ios-swissors::SwissorsTests" /* SwissorsTests */;
- targetProxy = A20D17A62869990F00B3ADB5 /* PBXContainerItemProxy */;
- };
- OBJ_187 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = "ios-swissors::Swissors" /* Swissors */;
- targetProxy = A20D17A42869990F00B3ADB5 /* PBXContainerItemProxy */;
- };
- OBJ_188 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = "bettercodable::BetterCodable" /* BetterCodable */;
- targetProxy = A20D17A52869990F00B3ADB5 /* PBXContainerItemProxy */;
- };
-/* End PBXTargetDependency section */
-
-/* Begin XCBuildConfiguration section */
- OBJ_115 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- LD = /usr/bin/true;
- OTHER_SWIFT_FLAGS = "-swift-version 5 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/ManifestAPI -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -package-description-version 5.2.0";
- SWIFT_VERSION = 5.0;
- };
- name = Debug;
- };
- OBJ_116 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- LD = /usr/bin/true;
- OTHER_SWIFT_FLAGS = "-swift-version 5 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/ManifestAPI -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -package-description-version 5.2.0";
- SWIFT_VERSION = 5.0;
- };
- name = Release;
- };
- OBJ_121 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CURRENT_PROJECT_VERSION = 1;
- DRIVERKIT_DEPLOYMENT_TARGET = 19.0;
- ENABLE_TESTABILITY = YES;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PLATFORM_DIR)/Developer/Library/Frameworks",
- );
- HEADER_SEARCH_PATHS = "$(inherited)";
- INFOPLIST_FILE = Swissors.xcodeproj/Swissors_Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
- MACOSX_DEPLOYMENT_TARGET = 10.10;
- OTHER_CFLAGS = "$(inherited)";
- OTHER_LDFLAGS = "$(inherited)";
- OTHER_SWIFT_FLAGS = "$(inherited)";
- PRODUCT_BUNDLE_IDENTIFIER = Swissors;
- PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
- PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
- SKIP_INSTALL = YES;
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)";
- SWIFT_VERSION = 5.0;
- TARGET_NAME = Swissors;
- TVOS_DEPLOYMENT_TARGET = 9.0;
- WATCHOS_DEPLOYMENT_TARGET = 2.0;
- };
- name = Debug;
- };
- OBJ_122 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CURRENT_PROJECT_VERSION = 1;
- DRIVERKIT_DEPLOYMENT_TARGET = 19.0;
- ENABLE_TESTABILITY = YES;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PLATFORM_DIR)/Developer/Library/Frameworks",
- );
- HEADER_SEARCH_PATHS = "$(inherited)";
- INFOPLIST_FILE = Swissors.xcodeproj/Swissors_Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
- MACOSX_DEPLOYMENT_TARGET = 10.10;
- OTHER_CFLAGS = "$(inherited)";
- OTHER_LDFLAGS = "$(inherited)";
- OTHER_SWIFT_FLAGS = "$(inherited)";
- PRODUCT_BUNDLE_IDENTIFIER = Swissors;
- PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
- PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
- SKIP_INSTALL = YES;
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)";
- SWIFT_VERSION = 5.0;
- TARGET_NAME = Swissors;
- TVOS_DEPLOYMENT_TARGET = 9.0;
- WATCHOS_DEPLOYMENT_TARGET = 2.0;
- };
- name = Release;
- };
- OBJ_168 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- LD = /usr/bin/true;
- OTHER_SWIFT_FLAGS = "-swift-version 5 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/ManifestAPI -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -package-description-version 5.0.0";
- SWIFT_VERSION = 5.0;
- };
- name = Debug;
- };
- OBJ_169 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- LD = /usr/bin/true;
- OTHER_SWIFT_FLAGS = "-swift-version 5 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/ManifestAPI -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -package-description-version 5.0.0";
- SWIFT_VERSION = 5.0;
- };
- name = Release;
- };
- OBJ_174 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- };
- name = Debug;
- };
- OBJ_175 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- };
- name = Release;
- };
- OBJ_179 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_MODULES = YES;
- CURRENT_PROJECT_VERSION = 1;
- DRIVERKIT_DEPLOYMENT_TARGET = 19.0;
- EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PLATFORM_DIR)/Developer/Library/Frameworks",
- );
- HEADER_SEARCH_PATHS = "$(inherited)";
- INFOPLIST_FILE = Swissors.xcodeproj/SwissorsTests_Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 14.0;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/../Frameworks @loader_path/Frameworks";
- MACOSX_DEPLOYMENT_TARGET = 11.0;
- OTHER_CFLAGS = "$(inherited)";
- OTHER_LDFLAGS = "$(inherited)";
- OTHER_SWIFT_FLAGS = "$(inherited)";
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)";
- SWIFT_VERSION = 5.0;
- TARGET_NAME = SwissorsTests;
- TVOS_DEPLOYMENT_TARGET = 14.0;
- WATCHOS_DEPLOYMENT_TARGET = 7.0;
- };
- name = Debug;
- };
- OBJ_180 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_MODULES = YES;
- CURRENT_PROJECT_VERSION = 1;
- DRIVERKIT_DEPLOYMENT_TARGET = 19.0;
- EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PLATFORM_DIR)/Developer/Library/Frameworks",
- );
- HEADER_SEARCH_PATHS = "$(inherited)";
- INFOPLIST_FILE = Swissors.xcodeproj/SwissorsTests_Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 14.0;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/../Frameworks @loader_path/Frameworks";
- MACOSX_DEPLOYMENT_TARGET = 11.0;
- OTHER_CFLAGS = "$(inherited)";
- OTHER_LDFLAGS = "$(inherited)";
- OTHER_SWIFT_FLAGS = "$(inherited)";
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)";
- SWIFT_VERSION = 5.0;
- TARGET_NAME = SwissorsTests;
- TVOS_DEPLOYMENT_TARGET = 14.0;
- WATCHOS_DEPLOYMENT_TARGET = 7.0;
- };
- name = Release;
- };
- OBJ_3 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_ARC = YES;
- COMBINE_HIDPI_IMAGES = YES;
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
- DYLIB_INSTALL_NAME_BASE = "@rpath";
- ENABLE_NS_ASSERTIONS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "$(inherited)",
- "SWIFT_PACKAGE=1",
- "DEBUG=1",
- );
- MACOSX_DEPLOYMENT_TARGET = 10.10;
- ONLY_ACTIVE_ARCH = YES;
- OTHER_SWIFT_FLAGS = "$(inherited) -DXcode";
- PRODUCT_NAME = "$(TARGET_NAME)";
- SDKROOT = macosx;
- SUPPORTED_PLATFORMS = "$(AVAILABLE_PLATFORMS)";
- SUPPORTS_MACCATALYST = YES;
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) SWIFT_PACKAGE DEBUG";
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- USE_HEADERMAP = NO;
- };
- name = Debug;
- };
- OBJ_4 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_ARC = YES;
- COMBINE_HIDPI_IMAGES = YES;
- COPY_PHASE_STRIP = YES;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- DYLIB_INSTALL_NAME_BASE = "@rpath";
- GCC_OPTIMIZATION_LEVEL = s;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "$(inherited)",
- "SWIFT_PACKAGE=1",
- );
- MACOSX_DEPLOYMENT_TARGET = 10.10;
- OTHER_SWIFT_FLAGS = "$(inherited) -DXcode";
- PRODUCT_NAME = "$(TARGET_NAME)";
- SDKROOT = macosx;
- SUPPORTED_PLATFORMS = "$(AVAILABLE_PLATFORMS)";
- SUPPORTS_MACCATALYST = YES;
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) SWIFT_PACKAGE";
- SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
- USE_HEADERMAP = NO;
- };
- name = Release;
- };
- OBJ_92 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CURRENT_PROJECT_VERSION = 1;
- DRIVERKIT_DEPLOYMENT_TARGET = 19.0;
- ENABLE_TESTABILITY = YES;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PLATFORM_DIR)/Developer/Library/Frameworks",
- );
- HEADER_SEARCH_PATHS = "$(inherited)";
- INFOPLIST_FILE = Swissors.xcodeproj/BetterCodable_Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 10.0;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
- MACOSX_DEPLOYMENT_TARGET = 10.12;
- OTHER_CFLAGS = "$(inherited)";
- OTHER_LDFLAGS = "$(inherited)";
- OTHER_SWIFT_FLAGS = "$(inherited)";
- PRODUCT_BUNDLE_IDENTIFIER = BetterCodable;
- PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
- PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
- SKIP_INSTALL = YES;
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)";
- SWIFT_VERSION = 5.0;
- TARGET_NAME = BetterCodable;
- TVOS_DEPLOYMENT_TARGET = 10.0;
- WATCHOS_DEPLOYMENT_TARGET = 3.0;
- };
- name = Debug;
- };
- OBJ_93 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CURRENT_PROJECT_VERSION = 1;
- DRIVERKIT_DEPLOYMENT_TARGET = 19.0;
- ENABLE_TESTABILITY = YES;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PLATFORM_DIR)/Developer/Library/Frameworks",
- );
- HEADER_SEARCH_PATHS = "$(inherited)";
- INFOPLIST_FILE = Swissors.xcodeproj/BetterCodable_Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 10.0;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
- MACOSX_DEPLOYMENT_TARGET = 10.12;
- OTHER_CFLAGS = "$(inherited)";
- OTHER_LDFLAGS = "$(inherited)";
- OTHER_SWIFT_FLAGS = "$(inherited)";
- PRODUCT_BUNDLE_IDENTIFIER = BetterCodable;
- PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
- PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
- SKIP_INSTALL = YES;
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)";
- SWIFT_VERSION = 5.0;
- TARGET_NAME = BetterCodable;
- TVOS_DEPLOYMENT_TARGET = 10.0;
- WATCHOS_DEPLOYMENT_TARGET = 3.0;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- OBJ_114 /* Build configuration list for PBXNativeTarget "BetterCodablePackageDescription" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- OBJ_115 /* Debug */,
- OBJ_116 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- OBJ_120 /* Build configuration list for PBXNativeTarget "Swissors" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- OBJ_121 /* Debug */,
- OBJ_122 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- OBJ_167 /* Build configuration list for PBXNativeTarget "SwissorsPackageDescription" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- OBJ_168 /* Debug */,
- OBJ_169 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- OBJ_173 /* Build configuration list for PBXAggregateTarget "SwissorsPackageTests" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- OBJ_174 /* Debug */,
- OBJ_175 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- OBJ_178 /* Build configuration list for PBXNativeTarget "SwissorsTests" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- OBJ_179 /* Debug */,
- OBJ_180 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- OBJ_2 /* Build configuration list for PBXProject "Swissors" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- OBJ_3 /* Debug */,
- OBJ_4 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- OBJ_91 /* Build configuration list for PBXNativeTarget "BetterCodable" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- OBJ_92 /* Debug */,
- OBJ_93 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = OBJ_1 /* Project object */;
-}
diff --git a/Swissors.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Swissors.xcodeproj/project.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index fe1aa71..0000000
--- a/Swissors.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/Swissors.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Swissors.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
deleted file mode 100644
index 18d9810..0000000
--- a/Swissors.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- IDEDidComputeMac32BitWarning
-
-
-
diff --git a/Swissors.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Swissors.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
deleted file mode 100644
index a72dc2b..0000000
--- a/Swissors.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded
-
-
-
\ No newline at end of file
diff --git a/Swissors.xcodeproj/xcshareddata/xcschemes/Swissors.xcscheme b/Swissors.xcodeproj/xcshareddata/xcschemes/Swissors.xcscheme
deleted file mode 100644
index 2b94ea5..0000000
--- a/Swissors.xcodeproj/xcshareddata/xcschemes/Swissors.xcscheme
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Tests/DefaultDateFormatterTests.swift b/Tests/DefaultDateFormatterTests.swift
index ec4118b..ff89e46 100644
--- a/Tests/DefaultDateFormatterTests.swift
+++ b/Tests/DefaultDateFormatterTests.swift
@@ -5,44 +5,47 @@
// Created by Maxim Butin on 23.06.2022.
//
-import XCTest
+import Foundation
import Swissors
+import Testing
-// swiftlint:disable nesting
-class ServerDateFormatterTests: XCTestCase {
-
- func testDecodingAndEncodingDefaultDateFormmater() throws {
- struct Fixture: Codable {
- @OptionalDateValue var date: Date?
- }
-
- let json = #"{"date": "2022-06-16T11:33:52.786Z"}"#.data(using: .utf8)!
-
- let fixure = try JSONDecoder().decode(Fixture.self, from: json)
- let date = try ServerDataFormatter.decode("2022-06-16T11:33:52.786Z")
-
- XCTAssertEqual(fixure.date, date)
- }
-
- func testDecodingAndEncodingNilDefaultDateFormmater() throws {
- struct Fixture: Codable {
- @OptionalDateValue var date: Date?
- }
- let json = #"{}"#.data(using: .utf8)!
-
- let fixure = try JSONDecoder().decode(Fixture.self, from: json)
- XCTAssertEqual(fixure.date, nil)
- }
-
- func testDecodingAndEncodingNoValidDefaultDateFormmater() throws {
- struct Fixture: Codable {
- @OptionalDateValue var date: Date?
- }
- let json = #"{"date": 123}"#.data(using: .utf8)!
-
- let fixure = try JSONDecoder().decode(Fixture.self, from: json)
- XCTAssertEqual(fixure.date, nil)
- }
+struct ServerDateFormatterTests {
+
+ @Test
+ func decodingAndEncodingDefaultDateFormmater() async throws {
+ struct Fixture: Codable {
+ @OptionalDateValue var date: Date?
+ }
+
+ let json = #"{"date": "2022-06-16T11:33:52.786Z"}"#.data(using: .utf8)!
+
+ let fixure = try JSONDecoder().decode(Fixture.self, from: json)
+ let date = try ServerDataFormatter.decode("2022-06-16T11:33:52.786Z")
+
+ #expect(fixure.date == date)
+ }
+
+ @Test
+ func decodingAndEncodingNilDefaultDateFormmater() async throws {
+ struct Fixture: Codable {
+ @OptionalDateValue var date: Date?
+ }
+ let json = #"{}"#.data(using: .utf8)!
+
+ let fixure = try JSONDecoder().decode(Fixture.self, from: json)
+ #expect(fixure.date == nil)
+ }
+
+ @Test
+ func decodingAndEncodingNoValidDefaultDateFormmater() async throws {
+ struct Fixture: Codable {
+ @OptionalDateValue var date: Date?
+ }
+ let json = #"{"date": 123}"#.data(using: .utf8)!
+
+ let fixure = try JSONDecoder().decode(Fixture.self, from: json)
+ #expect(fixure.date == nil)
+ }
}
class ServerDataFormatter: DefaultDateFormatter {
diff --git a/Tests/DefaultEmptyStringTests.swift b/Tests/DefaultEmptyStringTests.swift
index 6594cde..19e158f 100644
--- a/Tests/DefaultEmptyStringTests.swift
+++ b/Tests/DefaultEmptyStringTests.swift
@@ -5,14 +5,15 @@
// Created by Alexander Rozhdestvenskiy on 03.10.2022.
//
-import XCTest
import Swissors
+import Foundation
+import Testing
import BetterCodable
-// swiftlint:disable nesting
-class DefaultEmptyStringTests: XCTestCase {
+struct DefaultEmptyStringTests {
- func testDefaultEmptyStringCorrupted() throws {
+ @Test
+ func defaultEmptyStringCorrupted() async throws {
struct Model: Codable {
@@ -22,10 +23,11 @@ class DefaultEmptyStringTests: XCTestCase {
let json = #"{}"#.data(using: .utf8)!
let model = try JSONDecoder().decode(Model.self, from: json)
- XCTAssertEqual(model.name, "")
+ #expect(model.name == "")
}
- func testDefaultEmptyString() throws {
+ @Test
+ func defaultEmptyString() async throws {
struct Model: Codable {
@@ -35,10 +37,11 @@ class DefaultEmptyStringTests: XCTestCase {
let json = #"{"name": "Alexander"}"#.data(using: .utf8)!
let model = try JSONDecoder().decode(Model.self, from: json)
- XCTAssertEqual(model.name, "Alexander")
+ #expect(model.name == "Alexander")
}
- func testDefaultEmptyStringNil() throws {
+ @Test
+ func defaultEmptyStringNil() async throws {
struct Model: Codable {
@@ -48,7 +51,7 @@ class DefaultEmptyStringTests: XCTestCase {
let json = #"{"name": null}"#.data(using: .utf8)!
let model = try JSONDecoder().decode(Model.self, from: json)
- XCTAssertEqual(model.name, "")
+ #expect(model.name == "")
}
}
diff --git a/Tests/DefaultNotEmptyStringTests.swift b/Tests/DefaultNotEmptyStringTests.swift
index 1d501a8..283018c 100644
--- a/Tests/DefaultNotEmptyStringTests.swift
+++ b/Tests/DefaultNotEmptyStringTests.swift
@@ -5,18 +5,19 @@
// Created by viktor.volkov on 25.08.2022.
//
-import XCTest
+import Testing
+import Foundation
import Swissors
import BetterCodable
-// swiftlint:disable nesting
-class DefaultNotEmptyStringTests: XCTestCase {
+struct DefaultNotEmptyStringTests {
- func testDefaultNotEmptyStringCorrupted() throws {
+ @Test
+ func defaultNotEmptyStringCorrupted() async throws {
struct Model: Codable {
struct X2ValueStrategy: StringCodableStrategy {
- static var defaultValue: String = "x2"
+ static let defaultValue: String = "x2"
}
@DefaultNotEmptyString
@@ -25,14 +26,15 @@ class DefaultNotEmptyStringTests: XCTestCase {
let json = #"{}"#.data(using: .utf8)!
let model = try JSONDecoder().decode(Model.self, from: json)
- XCTAssertEqual(model.name, Model.X2ValueStrategy.defaultValue)
+ #expect(model.name == Model.X2ValueStrategy.defaultValue)
}
- func testDefaultNotEmptyStringNil() throws {
+ @Test
+ func defaultNotEmptyStringNil() async throws {
struct Model: Codable {
struct X2ValueStrategy: StringCodableStrategy {
- static var defaultValue: String = "x2"
+ static let defaultValue: String = "x2"
}
@DefaultNotEmptyString
@@ -41,14 +43,15 @@ class DefaultNotEmptyStringTests: XCTestCase {
let json = #"{"name": null}"#.data(using: .utf8)!
let model = try JSONDecoder().decode(Model.self, from: json)
- XCTAssertEqual(model.name, Model.X2ValueStrategy.defaultValue)
+ #expect(model.name == Model.X2ValueStrategy.defaultValue)
}
- func testDefaultNotEmptyStringEmpty() throws {
+ @Test
+ func defaultNotEmptyStringEmpty() async throws {
struct Model: Codable {
struct X2ValueStrategy: StringCodableStrategy {
- static var defaultValue: String = "x2"
+ static let defaultValue: String = "x2"
}
@DefaultNotEmptyString
@@ -57,14 +60,15 @@ class DefaultNotEmptyStringTests: XCTestCase {
let json = #"{"name": ""}"#.data(using: .utf8)!
let model = try JSONDecoder().decode(Model.self, from: json)
- XCTAssertEqual(model.name, Model.X2ValueStrategy.defaultValue)
+ #expect(model.name == Model.X2ValueStrategy.defaultValue)
}
- func testDefaultNotEmptyStringDefault() throws {
+ @Test
+ func defaultNotEmptyStringDefault() async throws {
struct Model: Codable {
struct X2ValueStrategy: StringCodableStrategy {
- static var defaultValue: String = "x2"
+ static let defaultValue: String = "x2"
}
@DefaultNotEmptyString
@@ -72,6 +76,6 @@ class DefaultNotEmptyStringTests: XCTestCase {
}
let json = #"{"name": "John Frum"}"#.data(using: .utf8)!
let model = try JSONDecoder().decode(Model.self, from: json)
- XCTAssertEqual(model.name, "John Frum")
+ #expect(model.name == "John Frum")
}
}
diff --git a/Tests/DefaultURLFormatterTests.swift b/Tests/DefaultURLFormatterTests.swift
index 1227d18..867e0fc 100644
--- a/Tests/DefaultURLFormatterTests.swift
+++ b/Tests/DefaultURLFormatterTests.swift
@@ -5,39 +5,42 @@
// Created by Maxim Butin on 23.06.2022.
//
-import XCTest
+import Testing
+import Foundation
import Swissors
-// swiftlint:disable nesting
-class DefaultURLFormatterTests: XCTestCase {
+struct DefaultURLFormatterTests {
- func testDecodingAndEncodingDefaultURLFormmater() throws {
+ @Test
+ func decodingAndEncodingDefaultURLFormmater() async throws {
struct Fixture: Codable {
@URLValue var url: URL?
}
let json = #"{"url": "https://www.google.com"}"#.data(using: .utf8)!
let fixure = try JSONDecoder().decode(Fixture.self, from: json)
- XCTAssertEqual(fixure.url, URL(string: "https://www.google.com"))
+ #expect(fixure.url == URL(string: "https://www.google.com"))
}
- func testDecodingAndEncodingNilDefaultURLFormmater() throws {
+ @Test
+ func decodingAndEncodingNilDefaultURLFormmater() async throws {
struct Fixture: Codable {
@URLValue var url: URL?
}
let json = #"{}"#.data(using: .utf8)!
let fixure = try JSONDecoder().decode(Fixture.self, from: json)
- XCTAssertEqual(fixure.url, nil)
+ #expect(fixure.url == nil)
}
- func testDecodingAndEncodingNoValidDefaultURLFormmater() throws {
+ @Test
+ func decodingAndEncodingNoValidDefaultURLFormmater() async throws {
struct Fixture: Codable {
@URLValue var url: URL?
}
let json = #"{"url": true }"#.data(using: .utf8)!
let fixure = try JSONDecoder().decode(Fixture.self, from: json)
- XCTAssertEqual(fixure.url, nil)
+ #expect(fixure.url == nil)
}
}
diff --git a/Tests/MigrationTests.swift b/Tests/MigrationTests.swift
new file mode 100644
index 0000000..8768084
--- /dev/null
+++ b/Tests/MigrationTests.swift
@@ -0,0 +1,20 @@
+//
+// File.swift
+// Swissors
+//
+// Created by viktor.volkov on 28.02.2025.
+//
+
+import Testing
+import Foundation
+import Swissors
+
+struct MigrationTests {
+
+ @Test
+ func stringValidatingInitializer() {
+ let oldApiString = String(validatingUTF8: __dispatch_queue_get_label(nil))
+ let newApiString = String(cString: __dispatch_queue_get_label(nil))
+ #expect(oldApiString == newApiString)
+ }
+}