From e902ffd417b5e5d55d1721060e45ee5a3b1851bf Mon Sep 17 00:00:00 2001 From: Fernando Fernandes Date: Fri, 16 Jul 2021 14:02:51 +0200 Subject: [PATCH] Update to Swift 5.5, remove "insets" var - Update GCOverseer. - Update GitHub YML. --- .github/workflows/swift.yml | 4 ++-- Package.resolved | 8 ++++---- Package.swift | 2 +- README.md | 1 - Sources/CSKScene/CSKScene+Coordinates.swift | 8 +------- 5 files changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index c8c0003..abb10b5 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -6,10 +6,10 @@ jobs: build-test: runs-on: macos-11 env: - DEVELOPER_DIR: /Applications/Xcode_12.5.app/Contents/Developer + DEVELOPER_DIR: /Applications/Xcode_13.0.app/Contents/Developer steps: - name: Cancel previous jobs - uses: styfle/cancel-workflow-action@0.6.0 + uses: styfle/cancel-workflow-action@0.9.0 with: access_token: ${{ github.token }} diff --git a/Package.resolved b/Package.resolved index c99ff18..c0bc83b 100644 --- a/Package.resolved +++ b/Package.resolved @@ -2,7 +2,7 @@ "object": { "pins": [ { - "package": "AppLogger", + "package": "applogger", "repositoryURL": "https://github.com/backslash-f/applogger", "state": { "branch": null, @@ -11,12 +11,12 @@ } }, { - "package": "GCOverseer", + "package": "gcoverseer", "repositoryURL": "https://github.com/backslash-f/gcoverseer", "state": { "branch": null, - "revision": "0809c26546d12c38ab179d6bb2cbb259b60b9aa4", - "version": "0.2.1" + "revision": "908810d48f09bc62842290997177212d77296f2f", + "version": "0.2.2" } } ] diff --git a/Package.swift b/Package.swift index 2fecde8..99ef750 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.4 +// swift-tools-version:5.5 import PackageDescription diff --git a/README.md b/README.md index b3d09a3..7f12959 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,6 @@ Property | Description | Notes `var viewBottom: CGFloat`| The "lowest `SKScene` point" converted from the "lowest`SKView` point". | - `var viewLeft: CGFloat`| The "leftmost `SKScene` point" converted from the "leftmost`SKView` point". | - `var viewRight: CGFloat`| The "rightmost `SKScene` point" converted from the "rightmost`SKView` point". | - -`var insets: UIEdgeInsets`| The insets used to determine the safe area of the window. | iOS, tvOS and Mac Catalyst only, as it relies on [`UIEdgeInsets`](https://developer.apple.com/documentation/uikit/uiedgeinsets). ## Default Values These properties have the following default values: diff --git a/Sources/CSKScene/CSKScene+Coordinates.swift b/Sources/CSKScene/CSKScene+Coordinates.swift index 3f5d227..20683ca 100644 --- a/Sources/CSKScene/CSKScene+Coordinates.swift +++ b/Sources/CSKScene/CSKScene+Coordinates.swift @@ -1,3 +1,4 @@ +import Foundation import SpriteKit public extension CSKScene { @@ -31,13 +32,6 @@ public extension CSKScene { let point = CGPoint(x: view.bounds.size.width, y: .zero) return convertPoint(fromView: point).x } - - #if os(iOS) || os(tvOS) || targetEnvironment(macCatalyst) - /// The insets used to determine the safe area of the window. - var insets: UIEdgeInsets { - UIApplication.shared.delegate?.window??.safeAreaInsets ?? .zero - } - #endif } // MARK: - Private