From 19c79f56c95746634c7232c6ee1445f3976ea794 Mon Sep 17 00:00:00 2001 From: Andrew Breckenridge Date: Thu, 28 Jan 2021 09:22:07 -0800 Subject: [PATCH 1/3] create Package.swift, support SPM --- Package.swift | 16 ++++++++++++++++ UIViewBordersSwift.xcodeproj/project.pbxproj | 2 ++ UIViewBordersSwift/UIView+Borders.swift | 2 ++ 3 files changed, 20 insertions(+) create mode 100644 Package.swift diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..61c1183 --- /dev/null +++ b/Package.swift @@ -0,0 +1,16 @@ +// swift-tools-version:5.3 + +import PackageDescription + +let name = "UIViewBordersSwift" + +let package = Package( + name: name, + platforms: [.iOS(.v10)], + products: [ + .library(name: name, targets: [name]) + ], + targets: [ + .target(name: name, path: name) + ] +) diff --git a/UIViewBordersSwift.xcodeproj/project.pbxproj b/UIViewBordersSwift.xcodeproj/project.pbxproj index 6fdac27..6417ec6 100644 --- a/UIViewBordersSwift.xcodeproj/project.pbxproj +++ b/UIViewBordersSwift.xcodeproj/project.pbxproj @@ -12,6 +12,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 4674E52725C329260070B625 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; 93A98CE71DFCDB97009FBE55 /* UIViewBordersSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = UIViewBordersSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 93A98CEA1DFCDB97009FBE55 /* UIViewBordersSwift.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UIViewBordersSwift.h; sourceTree = ""; }; 93A98CEB1DFCDB97009FBE55 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -32,6 +33,7 @@ 93A98CDD1DFCDB97009FBE55 = { isa = PBXGroup; children = ( + 4674E52725C329260070B625 /* Package.swift */, 93A98CE91DFCDB97009FBE55 /* UIViewBordersSwift */, 93A98CE81DFCDB97009FBE55 /* Products */, ); diff --git a/UIViewBordersSwift/UIView+Borders.swift b/UIViewBordersSwift/UIView+Borders.swift index 5f4f86e..23490a2 100644 --- a/UIViewBordersSwift/UIView+Borders.swift +++ b/UIViewBordersSwift/UIView+Borders.swift @@ -5,7 +5,9 @@ // Copyright © 2015 Aaron Ng. All rights reserved. // +#if canImport(UIKit) import UIKit +#endif public extension UIView { From 3eed55b143733db7181fb0ffe41bab46c542a702 Mon Sep 17 00:00:00 2001 From: Andrew Breckenridge Date: Thu, 28 Jan 2021 11:26:01 -0800 Subject: [PATCH 2/3] Package.swift: exclude Info.plist --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 61c1183..f50a92a 100644 --- a/Package.swift +++ b/Package.swift @@ -11,6 +11,6 @@ let package = Package( .library(name: name, targets: [name]) ], targets: [ - .target(name: name, path: name) + .target(name: name, path: name, exclude: ["Info.plist"]) ] ) From e222c98ee1e2d63f5d0156302bfec6517deda9df Mon Sep 17 00:00:00 2001 From: Andrew Breckenridge Date: Mon, 29 Mar 2021 20:25:19 -0700 Subject: [PATCH 3/3] Package.swift: add .dynamic variant --- Package.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index f50a92a..4affe03 100644 --- a/Package.swift +++ b/Package.swift @@ -8,7 +8,8 @@ let package = Package( name: name, platforms: [.iOS(.v10)], products: [ - .library(name: name, targets: [name]) + .library(name: name, targets: [name]), + .library(name: "\(name)-Dynamic", type: .dynamic, targets: [name]) ], targets: [ .target(name: name, path: name, exclude: ["Info.plist"])