Skip to content

Commit

Permalink
Deprecate iOS 11.
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleve committed Aug 15, 2021
1 parent ee6310f commit f22e262
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 77 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/tests.yaml
Expand Up @@ -16,9 +16,6 @@ jobs:
fail-fast: false # Don’t fail-fast so that we get all snapshot test changes
matrix:
include:
- sdk: "11.4"
destination: platform=iOS Simulator,OS=11.4,name=iPhone 7

- sdk: "12.4"
destination: platform=iOS Simulator,OS=12.4,name=iPhone 7

Expand Down
2 changes: 1 addition & 1 deletion BlueprintUI.podspec
Expand Up @@ -11,7 +11,7 @@ Pod::Spec.new do |s|

s.swift_version = '5.1'

s.ios.deployment_target = '11.0'
s.ios.deployment_target = '12.0'

s.source_files = 'BlueprintUI/Sources/**/*.swift'

Expand Down
120 changes: 53 additions & 67 deletions BlueprintUI/Sources/Internal/Logger.swift
Expand Up @@ -7,93 +7,79 @@ enum Logger {}
/// BlueprintView signposts
extension Logger {
static func logLayoutStart(view: BlueprintView) {
if #available(iOS 12.0, *) {
os_signpost(
.begin,
log: .active,
name: "Layout",
signpostID: OSSignpostID(log: .active, object: view),
"%{public}s",
view.name ?? "BlueprintView"
)
}
os_signpost(
.begin,
log: .active,
name: "Layout",
signpostID: OSSignpostID(log: .active, object: view),
"%{public}s",
view.name ?? "BlueprintView"
)
}

static func logLayoutEnd(view: BlueprintView) {
if #available(iOS 12.0, *) {
os_signpost(
.end,
log: .active,
name: "Layout",
signpostID: OSSignpostID(log: .active, object: view)
)
}
os_signpost(
.end,
log: .active,
name: "Layout",
signpostID: OSSignpostID(log: .active, object: view)
)
}

static func logViewUpdateStart(view: BlueprintView) {
if #available(iOS 12.0, *) {
os_signpost(
.begin,
log: .active,
name: "View Update",
signpostID: OSSignpostID(log: .active, object: view),
"%{public}s",
view.name ?? "BlueprintView"
)
}
os_signpost(
.begin,
log: .active,
name: "View Update",
signpostID: OSSignpostID(log: .active, object: view),
"%{public}s",
view.name ?? "BlueprintView"
)
}

static func logViewUpdateEnd(view: BlueprintView) {
if #available(iOS 12.0, *) {
os_signpost(
.end,
log: .active,
name: "View Update",
signpostID: OSSignpostID(log: .active, object: view)
)
}
os_signpost(
.end,
log: .active,
name: "View Update",
signpostID: OSSignpostID(log: .active, object: view)
)
}

static func logElementAssigned(view: BlueprintView) {
if #available(iOS 12.0, *) {
os_signpost(
.event,
log: .active,
name: "Element assigned",
signpostID: OSSignpostID(log: .active, object: view),
"Element assigned to %{public}s",
view.name ?? "BlueprintView"
)
}
os_signpost(
.event,
log: .active,
name: "Element assigned",
signpostID: OSSignpostID(log: .active, object: view),
"Element assigned to %{public}s",
view.name ?? "BlueprintView"
)
}
}

/// Measuring signposts
extension Logger {
static func logMeasureStart(object: AnyObject, description: String, constraint: SizeConstraint) {
if #available(iOS 12.0, *) {
os_signpost(
.begin,
log: .active,
name: "Measuring",
signpostID: OSSignpostID(log: .active, object: object),
// nb: os_signpost seems to ignore precision specifiers
"%{public}s in %.1f×%.1f",
description,
constraint.width.constrainedValue ?? .infinity,
constraint.height.constrainedValue ?? .infinity
)
}
os_signpost(
.begin,
log: .active,
name: "Measuring",
signpostID: OSSignpostID(log: .active, object: object),
// nb: os_signpost seems to ignore precision specifiers
"%{public}s in %.1f×%.1f",
description,
constraint.width.constrainedValue ?? .infinity,
constraint.height.constrainedValue ?? .infinity
)
}

static func logMeasureEnd(object: AnyObject) {
if #available(iOS 12.0, *) {
os_signpost(
.end,
log: .active,
name: "Measuring",
signpostID: OSSignpostID(log: .active, object: object)
)
}
os_signpost(
.end,
log: .active,
name: "Measuring",
signpostID: OSSignpostID(log: .active, object: object)
)
}
}
2 changes: 1 addition & 1 deletion BlueprintUICommonControls.podspec
Expand Up @@ -11,7 +11,7 @@ Pod::Spec.new do |s|

s.swift_version = '5.1'

s.ios.deployment_target = '11.0'
s.ios.deployment_target = '12.0'

s.source_files = 'BlueprintUICommonControls/Sources/**/*.swift'

Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Removed

- [Removed support for / deprecated iOS 11](https://github.com/square/Blueprint/pull/250).

### Changed

### Deprecated
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Expand Up @@ -6,7 +6,7 @@ import PackageDescription
let package = Package(
name: "BlueprintUI",
platforms: [
.iOS(.v11),
.iOS(.v12),
],
products: [
.library(
Expand Down
2 changes: 1 addition & 1 deletion SampleApp/Podfile
@@ -1,4 +1,4 @@
platform :ios, '11.0'
platform :ios, '12.0'

project 'SampleApp.xcodeproj'

Expand Down
6 changes: 3 additions & 3 deletions SampleApp/Podfile.lock
Expand Up @@ -16,9 +16,9 @@ EXTERNAL SOURCES:
:path: "../BlueprintUICommonControls.podspec"

SPEC CHECKSUMS:
BlueprintUI: 0fe7dfb34d43c8ff1b6b69ca1bce853fa1eda084
BlueprintUICommonControls: d852ecc315896740739f4e44a387321a66d2111c
BlueprintUI: e7b5f4d1ac32c1158c4fceee565c57d0d18239ea
BlueprintUICommonControls: 7ad2bc4fc3416d699b2c1aad8b32e2ab6f7ad235

PODFILE CHECKSUM: a01a59366bcd21b6f7030cb454d88867c7b2cf25
PODFILE CHECKSUM: 63720a1a50b146640cc4fcc4f36d3770895c7e0d

COCOAPODS: 1.9.3

0 comments on commit f22e262

Please sign in to comment.