viz-swift-lib/README.md

33 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

2021-02-22 16:30:56 +08:00
# viz-swift-lib
2018-05-21 18:00:19 +08:00
2021-02-22 16:30:56 +08:00
VIZ library for Swift.
2018-05-21 18:00:19 +08:00
Installation
------------
Using the [Swift package manager](https://swift.org/package-manager/):
2021-02-22 16:30:56 +08:00
In your `Package.swift` just add:
2018-05-21 18:00:19 +08:00
```
dependencies: [
2021-02-22 16:30:56 +08:00
.package(url: "https://github.com/viz-blockchain/viz-swift-lib.git", .branch("master"))
2018-05-21 18:00:19 +08:00
]
```
2021-02-22 16:30:56 +08:00
and run `swift package update`. Now you can `import VIZ` in your Swift project.
2018-05-21 18:00:19 +08:00
Running tests
-------------
2021-02-22 16:30:56 +08:00
To run all tests simply run `swift test`, this will run both the unit- and integration-tests. To run them separately use the `--filter` flag, e.g. `swift test --filter IntegrationTests`
2018-05-21 18:00:19 +08:00
Developing
----------
Development of the library is best done with Xcode, to generate a `.xcodeproj` you need to run `swift package generate-xcodeproj`.
2021-02-22 16:30:56 +08:00
To enable test coverage display go "Scheme > Manage Schemes..." menu item and edit the "viz-swift-lib" scheme, select the Test configuration and under the Options tab enable "Gather coverage for some targets" and add the `viz-swift-lib` target.
2018-05-21 18:00:19 +08:00
After adding adding more unit tests the `swift test --generate-linuxmain` command has to be run and the XCTestManifest changes committed for the tests to be run on Linux.