From 5d4b2b225eabd1275ee515805ea0d84b1ebaf86b Mon Sep 17 00:00:00 2001 From: Nick Date: Tue, 18 Aug 2020 09:15:59 -0500 Subject: [PATCH 1/4] Dynamic linking for SPM Added `.dynamic` in the products definition to make sure the SPM bundle is dynamically linked. --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 91241e5..b506a86 100644 --- a/Package.swift +++ b/Package.swift @@ -7,7 +7,7 @@ let package = Package( .macOS(.v10_10), .iOS(.v9), .tvOS(.v9), .watchOS(.v2) ], products: [ - .library(name: "ReactiveKit", targets: ["ReactiveKit"]) + .library(name: "ReactiveKit", type: .dynamic, targets: ["ReactiveKit"]) ], targets: [ .target(name: "ReactiveKit", path: "Sources"), From 5fdeede56fead6ae4d18080b07abc9f9e93df314 Mon Sep 17 00:00:00 2001 From: Nick Date: Tue, 18 Aug 2020 11:56:58 -0500 Subject: [PATCH 2/4] Adding dynamically linked library This option allows us to keep both the statically and dynamically linked libraries. The "default" one will be (`ReactiveKit`) *should* be statically linked -- unless SPM can, in the future, manage to automatically decide what the best scenario is -- and `ReactiveKitDynamic` will be dynamically linked (always). --- Package.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index b506a86..cda323f 100644 --- a/Package.swift +++ b/Package.swift @@ -7,7 +7,9 @@ let package = Package( .macOS(.v10_10), .iOS(.v9), .tvOS(.v9), .watchOS(.v2) ], products: [ - .library(name: "ReactiveKit", type: .dynamic, targets: ["ReactiveKit"]) + .library(name: "ReactiveKit", targets: ["ReactiveKit"]) + .library(name: "ReactiveKitDynamic", type: .dynamic, targets: ["ReactiveKit"]) + ], targets: [ .target(name: "ReactiveKit", path: "Sources"), From e08cb672f489ad8175005f17418812df2bcc74b3 Mon Sep 17 00:00:00 2001 From: Nick Date: Tue, 18 Aug 2020 14:30:18 -0500 Subject: [PATCH 3/4] Missing comma --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index cda323f..ab390fb 100644 --- a/Package.swift +++ b/Package.swift @@ -7,7 +7,7 @@ let package = Package( .macOS(.v10_10), .iOS(.v9), .tvOS(.v9), .watchOS(.v2) ], products: [ - .library(name: "ReactiveKit", targets: ["ReactiveKit"]) + .library(name: "ReactiveKit", targets: ["ReactiveKit"]), .library(name: "ReactiveKitDynamic", type: .dynamic, targets: ["ReactiveKit"]) ], From 23bbfaf21f67ae780a1e9681a7c0e58c4e8bb20f Mon Sep 17 00:00:00 2001 From: Nick Date: Tue, 18 Aug 2020 16:19:37 -0500 Subject: [PATCH 4/4] Updated to include explicit static library We now have both explicitly declared a statically and dynamically linked library, in addition to the "undefined" RK library. --- Package.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Package.swift b/Package.swift index ab390fb..369729b 100644 --- a/Package.swift +++ b/Package.swift @@ -8,6 +8,7 @@ let package = Package( ], products: [ .library(name: "ReactiveKit", targets: ["ReactiveKit"]), + .library(name: "ReactiveKitStatic", type: .static, targets: ["ReactiveKit"]), .library(name: "ReactiveKitDynamic", type: .dynamic, targets: ["ReactiveKit"]) ],