From 4ea56916dc6bae6a785ceb983eab5f4b88dd5b8a Mon Sep 17 00:00:00 2001 From: Kirill Pahnev Date: Sat, 5 Oct 2019 18:06:36 +0300 Subject: [PATCH 1/2] Update swift package to modern syntax --- Package.swift | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index 8f7bf1e..e286069 100644 --- a/Package.swift +++ b/Package.swift @@ -1,3 +1,5 @@ +// swift-tools-version:5.0 +// // Package.swift // Copyright (c) 2017 Nicholas Maccharoli // @@ -18,9 +20,18 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. - import PackageDescription let package = Package( - name: "UIDeviceComplete" + name: "UIDeviceComplete", + platforms: [ + .iOS(.v8) + ], + products: [ + .library(name: "UIDeviceComplete", targets: ["UIDeviceComplete"]) + ], + targets: [ + .target(name: "UIDeviceComplete", path: "Sources"), + ], + swiftLanguageVersions: [.v5] ) From 20a3941994f6cb071754daa841dd15253a9a096d Mon Sep 17 00:00:00 2001 From: Kirill Pahnev Date: Sat, 5 Oct 2019 18:11:04 +0300 Subject: [PATCH 2/2] Add missing imports --- Sources/Screen.swift | 2 ++ Sources/System.swift | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Sources/Screen.swift b/Sources/Screen.swift index d9acca7..9cfe936 100644 --- a/Sources/Screen.swift +++ b/Sources/Screen.swift @@ -21,6 +21,8 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +import UIKit + public struct Screen { init(width: Double, height: Double, scale: Double) { self.width = width diff --git a/Sources/System.swift b/Sources/System.swift index cecd852..a83fe81 100644 --- a/Sources/System.swift +++ b/Sources/System.swift @@ -21,6 +21,8 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +import Foundation + class System { static var name: String? { var systemInfo = utsname()