From be36702da621b67c6528e6f966394b00abcfe777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=CC=81s=CC=8C=20Hromadni=CC=81k?= Date: Wed, 25 Nov 2020 11:57:46 +0100 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=94=A5=20Remove=20SnapKit=20dependenc?= =?UTF-8?q?y?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UIViewControllerChildrenTests.swift | 12 +-- ACKategories.xcodeproj/project.pbxproj | 35 --------- .../xcschemes/ACKategoriesExample.xcscheme | 78 +++++++++++++++++++ .../ExampleListViewController.swift | 10 ++- .../Screens/MapView/MapViewController.swift | 10 ++- .../Screens/Modal/ModalViewController.swift | 8 +- .../UIControlBlocksViewController.swift | 8 +- .../VC composition/TitleViewController.swift | 9 ++- .../VCCompositionViewController.swift | 12 +-- Cartfile.private | 1 - Cartfile.resolved | 1 - .../ACKategoriesExample-inputPaths.xcfilelist | 1 - ...ACKategoriesExample-outputPaths.xcfilelist | 1 - 13 files changed, 122 insertions(+), 64 deletions(-) create mode 100644 ACKategories.xcodeproj/xcshareddata/xcschemes/ACKategoriesExample.xcscheme delete mode 100644 Cartfile.private delete mode 100644 Cartfile.resolved delete mode 100644 Carthage/xcfilelists/ACKategoriesExample-inputPaths.xcfilelist delete mode 100644 Carthage/xcfilelists/ACKategoriesExample-outputPaths.xcfilelist diff --git a/ACKategories-iOSTests/UIViewControllerChildrenTests.swift b/ACKategories-iOSTests/UIViewControllerChildrenTests.swift index 799a1a42..316dc2c8 100644 --- a/ACKategories-iOSTests/UIViewControllerChildrenTests.swift +++ b/ACKategories-iOSTests/UIViewControllerChildrenTests.swift @@ -8,7 +8,6 @@ import UIKit import XCTest -import SnapKit import ACKategories final class UIViewControllerChildrenTests: XCTestCase { @@ -37,10 +36,13 @@ final class UIViewControllerChildrenTests: XCTestCase { let container = UIView() vc.view.addSubview(container) - container.snp.makeConstraints { (make) in - make.center.equalToSuperview() - make.width.height.equalTo(100) - } + container.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + container.centerXAnchor.constraint(equalTo: vc.view.centerXAnchor), + container.centerYAnchor.constraint(equalTo: vc.view.centerYAnchor), + container.widthAnchor.constraint(equalToConstant: 100), + container.heightAnchor.constraint(equalToConstant: 100) + ]) vc.display(childViewController: childVC, in: container) vc.view.layoutIfNeeded() diff --git a/ACKategories.xcodeproj/project.pbxproj b/ACKategories.xcodeproj/project.pbxproj index 8cfbe218..2aeac363 100644 --- a/ACKategories.xcodeproj/project.pbxproj +++ b/ACKategories.xcodeproj/project.pbxproj @@ -107,7 +107,6 @@ 69FA5FC223C8690A00B44BCD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 69FA5FC123C8690A00B44BCD /* LaunchScreen.storyboard */; }; 6A31C9F3250572FE0047A983 /* SelfSizingTableHeaderFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A31C9F2250572FE0047A983 /* SelfSizingTableHeaderFooterView.swift */; }; A33559012555270F009B9D89 /* FlowCoordinatorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A33559002555270F009B9D89 /* FlowCoordinatorTests.swift */; }; - A3BA6848256BD043006DB42F /* SnapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 695096B523C78F6600E8F457 /* SnapKit.framework */; }; A3BA685B256BEC7B006DB42F /* UIWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BA685A256BEC7B006DB42F /* UIWindow.swift */; }; A3BA6867256BECC6006DB42F /* UINavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BA6866256BECC6006DB42F /* UINavigationController.swift */; }; A3BA686E256BED96006DB42F /* Dummies.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BA686D256BED96006DB42F /* Dummies.swift */; }; @@ -233,8 +232,6 @@ 6950969523C78CC200E8F457 /* DateFormattingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateFormattingTests.swift; sourceTree = ""; }; 6950969623C78CC200E8F457 /* StringTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringTests.swift; sourceTree = ""; }; 6950969723C78CC200E8F457 /* ArrayTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ArrayTests.swift; sourceTree = ""; }; - 695096B423C78E6400E8F457 /* Cartfile.private */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; path = Cartfile.private; sourceTree = ""; }; - 695096B523C78F6600E8F457 /* SnapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SnapKit.framework; path = Carthage/Build/iOS/SnapKit.framework; sourceTree = ""; }; 695096D823C7908B00E8F457 /* ACKategoriesExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ACKategoriesExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 696DF853245304F400A6AC69 /* ReusableViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReusableViewTests.swift; sourceTree = ""; }; 697CECF023C877B20019FE61 /* Aliases.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Aliases.swift; sourceTree = ""; }; @@ -311,7 +308,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A3BA6848256BD043006DB42F /* SnapKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -382,7 +378,6 @@ isa = PBXGroup; children = ( 69FA5FC323C869A200B44BCD /* ACKategories.podspec */, - 695096B423C78E6400E8F457 /* Cartfile.private */, 69FA5FE423C8712D00B44BCD /* Package.swift */, 69E819EC23C773240054687B /* ACKategoriesCore */, 69E819F723C773240054687B /* ACKategoriesCoreTests */, @@ -390,7 +385,6 @@ 69E81A1323C773370054687B /* ACKategories-iOSTests */, 695096D923C7908B00E8F457 /* ACKategoriesExample */, 69E819EB23C773240054687B /* Products */, - 69E81A1E23C7735D0054687B /* Frameworks */, ); sourceTree = ""; }; @@ -490,14 +484,6 @@ path = "ACKategories-iOSTests"; sourceTree = ""; }; - 69E81A1E23C7735D0054687B /* Frameworks */ = { - isa = PBXGroup; - children = ( - 695096B523C78F6600E8F457 /* SnapKit.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; 69FA5F9123C868A900B44BCD /* Screens */ = { isa = PBXGroup; children = ( @@ -672,7 +658,6 @@ 695096D523C7908B00E8F457 /* Frameworks */, 695096D623C7908B00E8F457 /* Resources */, 695096F323C790A900E8F457 /* Embed Frameworks */, - CB998696568B841F5A05E3A0 /* Carthage */, ); buildRules = ( ); @@ -919,26 +904,6 @@ shellPath = /bin/sh; shellScript = "swiftlint autocorrect || true\nswiftlint || true\n"; }; - CB998696568B841F5A05E3A0 /* Carthage */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "$(SRCROOT)/Carthage/xcfilelists/ACKategoriesExample-inputPaths.xcfilelist", - ); - inputPaths = ( - ); - name = Carthage; - outputFileListPaths = ( - "$(SRCROOT)/Carthage/xcfilelists/ACKategoriesExample-outputPaths.xcfilelist", - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/usr/local/bin/carthage copy-frameworks\n"; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ diff --git a/ACKategories.xcodeproj/xcshareddata/xcschemes/ACKategoriesExample.xcscheme b/ACKategories.xcodeproj/xcshareddata/xcschemes/ACKategoriesExample.xcscheme new file mode 100644 index 00000000..aabccaea --- /dev/null +++ b/ACKategories.xcodeproj/xcshareddata/xcschemes/ACKategoriesExample.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ACKategoriesExample/Screens/Example list/ExampleListViewController.swift b/ACKategoriesExample/Screens/Example list/ExampleListViewController.swift index e5a5bf9b..263f74f6 100644 --- a/ACKategoriesExample/Screens/Example list/ExampleListViewController.swift +++ b/ACKategoriesExample/Screens/Example list/ExampleListViewController.swift @@ -36,9 +36,13 @@ final class ExampleListViewController: BaseViewController { let mapView = MKMapView() view.addSubview(mapView) mapView.delegate = self - mapView.snp.makeConstraints { make in - make.edges.equalToSuperview() - } + mapView.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + mapView.topAnchor.constraint(equalTo: view.topAnchor), + mapView.leadingAnchor.constraint(equalTo: view.leadingAnchor), + mapView.bottomAnchor.constraint(equalTo: view.bottomAnchor), + mapView.trailingAnchor.constraint(equalTo: view.trailingAnchor) + ]) self.mapView = mapView } diff --git a/ACKategoriesExample/Screens/Modal/ModalViewController.swift b/ACKategoriesExample/Screens/Modal/ModalViewController.swift index 9b62616a..46619182 100644 --- a/ACKategoriesExample/Screens/Modal/ModalViewController.swift +++ b/ACKategoriesExample/Screens/Modal/ModalViewController.swift @@ -25,9 +25,11 @@ final class ModalViewController: BaseViewControllerNoVM { let button = UIButton(type: .system) button.setTitle("Dismiss", for: .normal) view.addSubview(button) - button.snp.makeConstraints { (make) in - make.center.equalToSuperview() - } + button.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + button.centerXAnchor.constraint(equalTo: view.centerXAnchor), + button.centerYAnchor.constraint(equalTo: view.centerYAnchor) + ]) self.button = button } diff --git a/ACKategoriesExample/Screens/UIControl blocks/UIControlBlocksViewController.swift b/ACKategoriesExample/Screens/UIControl blocks/UIControlBlocksViewController.swift index d80cbb85..557ed65d 100644 --- a/ACKategoriesExample/Screens/UIControl blocks/UIControlBlocksViewController.swift +++ b/ACKategoriesExample/Screens/UIControl blocks/UIControlBlocksViewController.swift @@ -28,9 +28,11 @@ final class UIControlBlocksViewController: BaseViewControllerNoVM { } view.addSubview(button) - button.snp.makeConstraints { make in - make.center.equalToSuperview() - } + button.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + button.centerXAnchor.constraint(equalTo: view.centerXAnchor), + button.centerYAnchor.constraint(equalTo: view.centerYAnchor) + ]) self.button = button } diff --git a/ACKategoriesExample/Screens/VC composition/TitleViewController.swift b/ACKategoriesExample/Screens/VC composition/TitleViewController.swift index f59e42a5..fe16baf3 100644 --- a/ACKategoriesExample/Screens/VC composition/TitleViewController.swift +++ b/ACKategoriesExample/Screens/VC composition/TitleViewController.swift @@ -38,9 +38,12 @@ class TitleViewController: BaseViewControllerNoVM { nameLabel.textAlignment = .center nameLabel.text = name view.addSubview(nameLabel) - nameLabel.snp.makeConstraints { (make) in - make.leading.trailing.top.equalTo(view.safeAreaLayoutGuide).inset(20) - } + nameLabel.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + nameLabel.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 20), + nameLabel.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor, constant: 20), + nameLabel.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: -20) + ]) self.nameLabel = nameLabel } } diff --git a/ACKategoriesExample/Screens/VC composition/VCCompositionViewController.swift b/ACKategoriesExample/Screens/VC composition/VCCompositionViewController.swift index 066baca9..6858b789 100644 --- a/ACKategoriesExample/Screens/VC composition/VCCompositionViewController.swift +++ b/ACKategoriesExample/Screens/VC composition/VCCompositionViewController.swift @@ -7,7 +7,6 @@ // import UIKit -import SnapKit final class VCCompositionViewController: TitleViewController { @@ -28,10 +27,13 @@ final class VCCompositionViewController: TitleViewController { let containerView = UIView() view.addSubview(containerView) - containerView.snp.makeConstraints { (make) in - make.leading.trailing.bottom.equalToSuperview() - make.top.equalTo(nameLabel.snp.bottom).offset(30) - } + containerView.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + containerView.topAnchor.constraint(equalTo: nameLabel.bottomAnchor, constant: 30), + containerView.leadingAnchor.constraint(equalTo: view.leadingAnchor), + containerView.trailingAnchor.constraint(equalTo: view.trailingAnchor), + containerView.bottomAnchor.constraint(equalTo: view.bottomAnchor), + ]) let childVC = TitleViewController(name: "Child", color: .blue) display(childViewController: childVC, in: containerView) diff --git a/Cartfile.private b/Cartfile.private deleted file mode 100644 index 706d8891..00000000 --- a/Cartfile.private +++ /dev/null @@ -1 +0,0 @@ -github "SnapKit/SnapKit" ~> 5.0 diff --git a/Cartfile.resolved b/Cartfile.resolved deleted file mode 100644 index a050f0f7..00000000 --- a/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "SnapKit/SnapKit" "5.0.1" diff --git a/Carthage/xcfilelists/ACKategoriesExample-inputPaths.xcfilelist b/Carthage/xcfilelists/ACKategoriesExample-inputPaths.xcfilelist deleted file mode 100644 index 0fcf6029..00000000 --- a/Carthage/xcfilelists/ACKategoriesExample-inputPaths.xcfilelist +++ /dev/null @@ -1 +0,0 @@ -$(SRCROOT)/Carthage/Build/iOS/SnapKit.framework \ No newline at end of file diff --git a/Carthage/xcfilelists/ACKategoriesExample-outputPaths.xcfilelist b/Carthage/xcfilelists/ACKategoriesExample-outputPaths.xcfilelist deleted file mode 100644 index f065f5ed..00000000 --- a/Carthage/xcfilelists/ACKategoriesExample-outputPaths.xcfilelist +++ /dev/null @@ -1 +0,0 @@ -$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/SnapKit.framework \ No newline at end of file From 8ad0643046a3ed9cd6674d502356eb8f931adb3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=CC=81s=CC=8C=20Hromadni=CC=81k?= Date: Wed, 25 Nov 2020 11:58:19 +0100 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=94=A5=20Remove=20unavailable=20type?= =?UTF-8?q?=20that=20causes=20archivation=20failure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ACKategoriesCore/PropertyWrappers/UserDefault.swift | 3 --- 1 file changed, 3 deletions(-) diff --git a/ACKategoriesCore/PropertyWrappers/UserDefault.swift b/ACKategoriesCore/PropertyWrappers/UserDefault.swift index 66f0304c..b018f321 100644 --- a/ACKategoriesCore/PropertyWrappers/UserDefault.swift +++ b/ACKategoriesCore/PropertyWrappers/UserDefault.swift @@ -106,9 +106,6 @@ extension UInt32: PropertyListValue {} extension UInt64: PropertyListValue {} extension Double: PropertyListValue {} extension Float: PropertyListValue {} -#if os(macOS) -extension Float80: PropertyListValue {} -#endif extension Array: PropertyListValue where Element: PropertyListValue {} From cbe11b9b17f51665ebf88343ac0b47490e33c3c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=CC=81s=CC=8C=20Hromadni=CC=81k?= Date: Wed, 25 Nov 2020 12:12:11 +0100 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=92=9A=20Fix=20Github=20actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/tests.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b696d8f8..a46e2c76 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,16 +9,6 @@ jobs: steps: - uses: actions/checkout@v2 - uses: AckeeCZ/load-xcode-version@1.0 - - uses: actions/cache@v1 - with: - path: Carthage - key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }} - restore-keys: | - ${{ runner.os }}-carthage- - - name: Install Carthage dependencies - env: - GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: carthage bootstrap --platform iOS --cache-builds - name: Run iOS tests run: set -o pipefail && xcodebuild test -scheme ACKategories-iOS -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11 Pro Max,OS=latest' ONLY_ACTIVE_ARCH=YES | xcpretty - name: Run macOS tests From 7e2b684c2678ac63ec2682641076643a1ba48540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=CC=81s=CC=8C=20Hromadni=CC=81k?= Date: Wed, 25 Nov 2020 12:20:43 +0100 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=92=AC=20Update=20CHANGELOG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 6 ------ CHANGELOG.md | 8 ++++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d957bd3e..3610a4d2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,12 +12,6 @@ jobs: steps: - uses: actions/checkout@v2 - uses: AckeeCZ/load-xcode-version@1.0 - - uses: actions/cache@v1 - with: - path: Carthage - key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }} - restore-keys: | - ${{ runner.os }}-carthage- - name: Build run: carthage build --no-skip-current --cache-builds - name: Archive diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e2c1bc3..2e445a38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,14 @@ ## Next +### Fixed + +- Remove support for unavailable type `Float80` on macOS ([#97](https://github.com/AckeeCZ/ACKategories/pull/97), kudos to @lukashromadnik) + +### Changed + +- Removed SnapKit from the library ([#97](https://github.com/AckeeCZ/ACKategories/pull/97), kudos to @lukashromadnik) + ## 6.7.1 ### Added