Skip to content

Commit f545b64

Browse files
committed
Set product to .dynamic when bridging
1 parent d892120 commit f545b64

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

Package.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ let package = Package(
1212
defaultLocalization: "en",
1313
platforms: [.iOS(.v16), .macOS(.v13), .tvOS(.v16), .watchOS(.v9), .macCatalyst(.v16)],
1414
products: [
15-
.library(name: "SkipKeychain", type: .dynamic, targets: ["SkipKeychain"]),
15+
.library(name: "SkipKeychain", targets: ["SkipKeychain"]),
1616
],
1717
dependencies: [
1818
.package(url: "https://source.skip.tools/skip.git", from: "1.2.1"),
@@ -29,4 +29,9 @@ if ProcessInfo.processInfo.environment["SKIP_BRIDGE"] ?? "0" != "0" {
2929
package.targets.forEach({ target in
3030
target.dependencies += [.product(name: "SkipBridge", package: "skip-bridge")]
3131
})
32+
// all library types must be dynamic to support bridging
33+
package.products = package.products.map({ product in
34+
guard let libraryProduct = product as? Product.Library else { return product }
35+
return .library(name: libraryProduct.name, type: .dynamic, targets: libraryProduct.targets)
36+
})
3237
}

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,19 @@ Kotlin JUnit tests in the Robolectric Android simulation environment.
6161
Parity testing can be performed with `skip test`,
6262
which will output a table of the test results for both platforms.
6363

64+
## Contributing
65+
66+
We welcome contributions to this package in the form of enhancements and bug fixes.
67+
68+
The general flow for contributing to this and any other Skip package is:
69+
70+
1. Fork this repository and enable actions from the "Actions" tab
71+
2. Check out your fork locally
72+
3. When developing alongside a Skip app, add the package to a [shared workspace](https://skip.tools/docs/contributing) to see your changes incorporated in the app
73+
4. Push your changes to your fork and ensure the CI checks all pass in the Actions tab
74+
5. Add your name to the Skip [Contributor Agreement](https://github.com/skiptools/clabot-config)
75+
6. Open a Pull Request from your fork with a description of your changes
76+
6477
## License
6578

6679
This software is licensed under the

0 commit comments

Comments
 (0)