Skip to content

Commit 7fbdd8b

Browse files
Nunzio Giulio CaggegiNunzio Giulio Caggegi
authored andcommitted
Fixes SPM support
1 parent 695ccee commit 7fbdd8b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+24
-15
lines changed

β€ŽPackage.swiftβ€Ž

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,36 @@
1-
// swift-tools-version:4.0
2-
// The swift-tools-version declares the minimum version of Swift required to build this package.
1+
// swift-tools-version:5.7
32

43
import PackageDescription
54

65
let package = Package(
76
name: "Wormholy",
7+
platforms: [.iOS(.v11)],
88
products: [
9-
// Products define the executables and libraries produced by a package, and make them visible to other packages.
109
.library(
1110
name: "Wormholy",
12-
targets: ["Wormholy"]),
11+
targets: ["WormholySwift", "WormholyObjC"]),
1312
],
1413
dependencies: [
15-
// Dependencies declare other packages that this package depends on.
16-
// .package(url: /* package url */, from: "1.0.0"),
1714
],
1815
targets: [
19-
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
20-
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
2116
.target(
22-
name: "Wormholy",
23-
dependencies: []),
17+
name: "WormholySwift",
18+
dependencies: [],
19+
resources: [
20+
.process("Support Files/Assets.xcassets")
21+
],
22+
linkerSettings: [.linkedFramework("UIKit")]
23+
),
24+
.target(
25+
name: "WormholyObjC",
26+
dependencies: [
27+
"WormholySwift"
28+
]),
2429
.testTarget(
2530
name: "WormholyTests",
26-
dependencies: ["Wormholy"]),
31+
dependencies: [
32+
"WormholySwift",
33+
"WormholyObjC"
34+
]),
2735
]
2836
)

β€ŽSources/Objc/NSURLSessionConfiguration+Wormholy.mβ€Ž renamed to β€ŽSources/WormholyObjC/NSURLSessionConfiguration+Wormholy.mβ€Ž

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88

99
#import "NSURLSessionConfiguration+Wormholy.h"
1010
#import "WormholyMethodSwizzling.h"
11-
#if __has_include(<Wormholy/Wormholy-Swift.h>)
12-
#import <Wormholy/Wormholy-Swift.h>
11+
12+
#if SWIFT_PACKAGE
13+
@import WormholySwift;
1314
#else
14-
#import "Wormholy-Swift.h"
15+
#import <Wormholy/Wormholy-Swift.h>
1516
#endif
1617

1718
typedef NSURLSessionConfiguration*(*SessionConfigConstructor)(id,SEL);
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
Β (0)