Skip to content

Commit 32404e4

Browse files
committed
Adding SPM support
moved sources into Sources subfolder added Package.swift file
1 parent d573240 commit 32404e4

File tree

5 files changed

+34
-3
lines changed

5 files changed

+34
-3
lines changed

Package.swift

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// swift-tools-version: 5.6
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "WrapModel",
8+
platforms: [
9+
.iOS(.v11)
10+
],
11+
products: [
12+
// Products define the executables and libraries a package produces, and make them visible to other packages.
13+
.library(
14+
name: "WrapModel",
15+
targets: ["WrapModel"]),
16+
],
17+
dependencies: [
18+
// Dependencies declare other packages that this package depends on.
19+
// .package(url: /* package url */, from: "1.0.0"),
20+
],
21+
targets: [
22+
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
23+
// Targets can depend on other targets in this package, and on products in packages this package depends on.
24+
.target(
25+
name: "WrapModel",
26+
dependencies: []),
27+
],
28+
swiftLanguageVersions: [
29+
.v4_2, .v5
30+
]
31+
)

WrapModel/WrapModel.swift renamed to Sources/WrapModel/WrapModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ fileprivate extension Dictionary {
375375
// MARK: AnyWrapProperty protocol
376376

377377
// Protocol which all WrapProperty instances conform to
378-
public protocol AnyWrapProperty : class {
378+
public protocol AnyWrapProperty : AnyObject {
379379
// Key path within the model's data dictionary where this property's value is found
380380
var keyPath: String {get}
381381
// The model this property resides in - set by the model itself at initialization
File renamed without changes.

WrapModel.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ s.source = { :git => "https://github.com/1stdibs/WrapModel.git", :tag => s.versi
1919
# Dependencies
2020
# none currently
2121

22-
s.source_files = 'WrapModel/*.{swift}'
22+
s.source_files = 'Sources/WrapModel/*.{swift}'
2323

2424
end
2525

WrapModelSample/WrapModelSample.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
BEC46B9622384AEF00C0AF1B /* WrapModel.swift */,
113113
);
114114
name = WrapModel;
115-
path = ../WrapModel;
115+
path = ../Sources/WrapModel;
116116
sourceTree = "<group>";
117117
};
118118
/* End PBXGroup section */

0 commit comments

Comments
 (0)