Skip to content

Commit

Permalink
IPFM-2791: Modernize podspec and Package with iOS 15 as base. (#52)
Browse files Browse the repository at this point in the history
* IPFM-2791: Modernize podspec and Package with iOS 15 as base.

IPFM-2791: Run bundle install.

* IPFM-2791: Migrate to Quick + Nimble latest versions.

* IPFM-2791: Update CI action scripts to v4.

* IPFM-2791: More test cleanup and modernization.

* IPFM-2791: Set to iPhone 16 Pro (18.0) for fastlane to replicate local development conditions.

* IPFM-2791: iPhone 15 pro 17.5.

* IPFM-2791: Update other Package.resolved.
  • Loading branch information
kf-score authored Oct 30, 2024
1 parent b5131f2 commit bed17bd
Show file tree
Hide file tree
Showing 25 changed files with 286 additions and 175 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Gems
run: bundle install
Expand All @@ -40,7 +40,7 @@ jobs:
fi
- name: Upload Test XCResult
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: xcresult
path: ./fastlane/test_output/xcresult.tar.gz
Expand Down
4 changes: 2 additions & 2 deletions Fisticuffs.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Pod::Spec.new do |s|
s.author = { "Darren Clark" => "[email protected]" }
s.source = { :git => "https://github.com/scoremedia/Fisticuffs.git", :tag => s.version.to_s }

s.platform = :ios, '14.0'
s.swift_version = '5.3'
s.platform = :ios, '15.0'
s.swift_version = '5.9'
s.requires_arc = true

s.source_files = 'Sources/**/*.{m,swift}'
Expand Down
105 changes: 65 additions & 40 deletions Fisticuffs.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
@@ -1,43 +1,68 @@
{
"object": {
"pins": [
{
"package": "CwlCatchException",
"repositoryURL": "https://github.com/mattgallagher/CwlCatchException.git",
"state": {
"branch": null,
"revision": "f809deb30dc5c9d9b78c872e553261a61177721a",
"version": "2.0.0"
}
},
{
"package": "CwlPreconditionTesting",
"repositoryURL": "https://github.com/mattgallagher/CwlPreconditionTesting.git",
"state": {
"branch": null,
"revision": "02b7a39a99c4da27abe03cab2053a9034379639f",
"version": "2.0.0"
}
},
{
"package": "Nimble",
"repositoryURL": "https://github.com/Quick/Nimble.git",
"state": {
"branch": null,
"revision": "e491a6731307bb23783bf664d003be9b2fa59ab5",
"version": "9.0.0"
}
},
{
"package": "Quick",
"repositoryURL": "https://github.com/Quick/Quick.git",
"state": {
"branch": null,
"revision": "0038bcbab4292f3b028632556507c124e5ba69f3",
"version": "3.0.0"
}
"pins" : [
{
"identity" : "cwlcatchexception",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mattgallagher/CwlCatchException.git",
"state" : {
"revision" : "07b2ba21d361c223e25e3c1e924288742923f08c",
"version" : "2.2.1"
}
]
},
"version": 1
},
{
"identity" : "cwlpreconditiontesting",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mattgallagher/CwlPreconditionTesting.git",
"state" : {
"revision" : "0139c665ebb45e6a9fbdb68aabfd7c39f3fe0071",
"version" : "2.2.2"
}
},
{
"identity" : "nimble",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Quick/Nimble.git",
"state" : {
"revision" : "6416749c3c0488664fff6b42f8bf3ea8dc282ca1",
"version" : "13.6.0"
}
},
{
"identity" : "quick",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Quick/Quick.git",
"state" : {
"revision" : "1163a1b1b114a657c7432b63dd1f92ce99fe11a6",
"version" : "7.6.2"
}
},
{
"identity" : "swift-algorithms",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-algorithms.git",
"state" : {
"revision" : "f6919dfc309e7f1b56224378b11e28bab5bccc42",
"version" : "1.2.0"
}
},
{
"identity" : "swift-argument-parser",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser.git",
"state" : {
"revision" : "41982a3656a71c768319979febd796c6fd111d5c",
"version" : "1.5.0"
}
},
{
"identity" : "swift-numerics",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-numerics.git",
"state" : {
"revision" : "0a5bc04095a675662cf24757cc0640aa2204253b",
"version" : "1.0.2"
}
}
],
"version" : 2
}
3 changes: 2 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,12 @@ GEM
xcpretty (~> 0.2, >= 0.0.7)

PLATFORMS
arm64-darwin-22
universal-darwin-20
x86_64-linux

DEPENDENCIES
fastlane (~> 2.190)

BUNDLED WITH
2.2.21
2.4.22
105 changes: 65 additions & 40 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,43 +1,68 @@
{
"object": {
"pins": [
{
"package": "CwlCatchException",
"repositoryURL": "https://github.com/mattgallagher/CwlCatchException.git",
"state": {
"branch": null,
"revision": "f809deb30dc5c9d9b78c872e553261a61177721a",
"version": "2.0.0"
}
},
{
"package": "CwlPreconditionTesting",
"repositoryURL": "https://github.com/mattgallagher/CwlPreconditionTesting.git",
"state": {
"branch": null,
"revision": "02b7a39a99c4da27abe03cab2053a9034379639f",
"version": "2.0.0"
}
},
{
"package": "Nimble",
"repositoryURL": "https://github.com/Quick/Nimble.git",
"state": {
"branch": null,
"revision": "af1730dde4e6c0d45bf01b99f8a41713ce536790",
"version": "9.2.0"
}
},
{
"package": "Quick",
"repositoryURL": "https://github.com/Quick/Quick.git",
"state": {
"branch": null,
"revision": "bd86ca0141e3cfb333546de5a11ede63f0c4a0e6",
"version": "4.0.0"
}
"pins" : [
{
"identity" : "cwlcatchexception",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mattgallagher/CwlCatchException.git",
"state" : {
"revision" : "07b2ba21d361c223e25e3c1e924288742923f08c",
"version" : "2.2.1"
}
]
},
"version": 1
},
{
"identity" : "cwlpreconditiontesting",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mattgallagher/CwlPreconditionTesting.git",
"state" : {
"revision" : "0139c665ebb45e6a9fbdb68aabfd7c39f3fe0071",
"version" : "2.2.2"
}
},
{
"identity" : "nimble",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Quick/Nimble.git",
"state" : {
"revision" : "6416749c3c0488664fff6b42f8bf3ea8dc282ca1",
"version" : "13.6.0"
}
},
{
"identity" : "quick",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Quick/Quick.git",
"state" : {
"revision" : "1163a1b1b114a657c7432b63dd1f92ce99fe11a6",
"version" : "7.6.2"
}
},
{
"identity" : "swift-algorithms",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-algorithms.git",
"state" : {
"revision" : "f6919dfc309e7f1b56224378b11e28bab5bccc42",
"version" : "1.2.0"
}
},
{
"identity" : "swift-argument-parser",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser.git",
"state" : {
"revision" : "41982a3656a71c768319979febd796c6fd111d5c",
"version" : "1.5.0"
}
},
{
"identity" : "swift-numerics",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-numerics.git",
"state" : {
"revision" : "0a5bc04095a675662cf24757cc0640aa2204253b",
"version" : "1.0.2"
}
}
],
"version" : 2
}
8 changes: 4 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// swift-tools-version:5.3
// swift-tools-version:5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Fisticuffs",
platforms: [.iOS(.v14)],
platforms: [.iOS(.v15)],
products: [
.library(
name: "Fisticuffs",
targets: ["Fisticuffs"]),
],
dependencies: [
.package(name: "Quick", url: "https://github.com/Quick/Quick.git", from: Version(4, 0, 0)),
.package(name: "Nimble", url: "https://github.com/Quick/Nimble.git", from: Version(9, 2, 0)),
.package(url: "https://github.com/Quick/Quick.git", from: "7.3.0"),
.package(url: "https://github.com/Quick/Nimble.git", from: "13.0.0"),
],
targets: [
.target(
Expand Down
6 changes: 4 additions & 2 deletions Tests/FisticuffsTests/AnySubscribableSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ import Nimble
@testable import Fisticuffs


class AnySubscribableSpec: QuickSpec {
override func spec() {
final class AnySubscribableSpec: QuickSpec {
override class func spec() {
super.spec()

describe("AnySubscribableBox") {
it("should use the identity of the boxed AnySubscribable for Equatable") {
let currentValueSubscribable: CurrentValueSubscribable<String> = CurrentValueSubscribable("test")
Expand Down
22 changes: 15 additions & 7 deletions Tests/FisticuffsTests/BidirectionalBindingSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,19 @@ import Nimble
@testable import Fisticuffs


class BidirectionalBindingSpec: QuickSpec {
override func spec() {
final class BidirectionalBindingSpec: QuickSpec {
override class func spec() {
super.spec()

describe("BidirectionalBindableProperty") {
@TestState var subject: BidirectionalBindingSpec!
var backingVariable = ""
var binding: BidirectionalBindableProperty<BidirectionalBindingSpec, String>!

beforeEach {
subject = BidirectionalBindingSpec()
binding = BidirectionalBindableProperty(
control: self,
control: subject,
getter: { _ in backingVariable },
setter: { _, value in backingVariable = value }
)
Expand Down Expand Up @@ -79,7 +83,7 @@ class BidirectionalBindingSpec: QuickSpec {

autoreleasepool {
let _ = BidirectionalBindableProperty<BidirectionalBindingSpec, Void>(
control: self,
control: subject,
getter: { _ in },
setter: { _, _ in },
extraCleanup: DisposableBlock { disposed = true }
Expand Down Expand Up @@ -110,15 +114,19 @@ class BidirectionalBindingSpec: QuickSpec {
}

@available(*, deprecated)
class BidirectionalBindingDeprecatedSpec: QuickSpec {
override func spec() {
final class BidirectionalBindingDeprecatedSpec: QuickSpec {
override class func spec() {
super.spec()

describe("BidirectionalBindableProperty") {
@TestState var subject: BidirectionalBindingDeprecatedSpec!
var backingVariable = ""
var binding: BidirectionalBindableProperty<BidirectionalBindingDeprecatedSpec, String>!

beforeEach {
subject = BidirectionalBindingDeprecatedSpec()
binding = BidirectionalBindableProperty(
control: self,
control: subject,
getter: { _ in backingVariable },
setter: { _, value in backingVariable = value }
)
Expand Down
12 changes: 8 additions & 4 deletions Tests/FisticuffsTests/BindingHandlersSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@ import Nimble
@testable import Fisticuffs


class BindingHandlersSpec: QuickSpec {
override func spec() {
final class BindingHandlersSpec: QuickSpec {
override class func spec() {
super.spec()

@TestState var subject: BindingHandlersSpec!
var backingVariable = ""
var property: BidirectionalBindableProperty<BindingHandlersSpec, String>!

beforeEach {
subject = BindingHandlersSpec()
property = BidirectionalBindableProperty(
control: self,
control: subject,
getter: { _ in backingVariable },
setter: { _, value in backingVariable = value }
)
Expand Down Expand Up @@ -148,7 +152,7 @@ class BindingHandlersSpec: QuickSpec {
var optionalBackingVariable: String?

let optionalProperty: BidirectionalBindableProperty<BindingHandlersSpec, String?> = BidirectionalBindableProperty(
control: self,
control: subject,
getter: {_ in optionalBackingVariable},
setter: { (_, value) in optionalBackingVariable = value}
)
Expand Down
Loading

0 comments on commit bed17bd

Please sign in to comment.