|
2 | 2 |
|
3 | 3 | Swift module that helps with running multiple, concurrent, asynchronous tasks in a clean way.
|
4 | 4 |
|
| 5 | +## Contents |
| 6 | + |
| 7 | +1. [Requirements](#requirements) |
| 8 | +2. [Installation](#installation) |
| 9 | + - [CocoaPods](#cocoapods) |
| 10 | + - [Carthage](#carthage) |
| 11 | + - [Swift Package Manager](#swift-package-manager) |
| 12 | + - [Manually](#manually) |
| 13 | +3. [Documentation](#documentation) |
| 14 | +4. [Example Usage](#example-usage) |
| 15 | +5. [Working Example](#working-example) |
| 16 | +6. [License](#license) |
| 17 | +7. [Authors](#authors) |
| 18 | + |
5 | 19 | ## Requirements
|
6 | 20 |
|
7 |
| -Swift 4 / Xcode 9 |
| 21 | +Swift 4 |
8 | 22 |
|
9 | 23 | ## Installation
|
10 | 24 |
|
| 25 | +#### CocoaPods |
| 26 | + |
| 27 | +For [CocoaPods](http://cocoapods.org/), add to `Podfile`: |
| 28 | + |
| 29 | +```ruby |
| 30 | +pod 'GroupWork', '~> 0.0.3' |
| 31 | +``` |
| 32 | + |
| 33 | +#### Carthage |
| 34 | +For [Carthage](https://github.com/Carthage/Carthage), add to `Cartfile`: |
| 35 | + |
| 36 | +``` |
| 37 | +github "quanvo87/GroupWork" |
| 38 | +``` |
| 39 | + |
| 40 | +#### Swift Package Manager |
| 41 | + |
| 42 | +For [SPM](https://swift.org/package-manager/), add to your package dependencies: |
| 43 | + |
| 44 | +``` |
| 45 | +.package(url: "https://github.com/quanvo87/GroupWork.git", .upToNextMinor(from: "0.0.0")), |
| 46 | +``` |
| 47 | + |
| 48 | +#### Manually |
| 49 | + |
| 50 | +- for projects, drag `GroupWork.swift` to the project tree |
| 51 | +- for workspaces, include the whole `GroupWork.xcodeproj` |
| 52 | + |
| 53 | +## Documentation |
| 54 | + |
| 55 | +[Here]() |
| 56 | + |
11 | 57 | ## Example Usage
|
12 | 58 |
|
13 |
| -### End Goal |
| 59 | +#### End Goal |
14 | 60 |
|
15 | 61 | ```swift
|
16 | 62 | import GroupWork
|
@@ -39,7 +85,7 @@ Caveats:
|
39 | 85 | - `work.result` is only a simple `Bool`
|
40 | 86 | - this is not an answer to [callback hell](http://callbackhell.com/)
|
41 | 87 |
|
42 |
| -### Set Up |
| 88 | +#### Set Up |
43 | 89 |
|
44 | 90 | There is some set up required in order to create `complexFunc()` from above:
|
45 | 91 |
|
@@ -76,3 +122,16 @@ Caveats:
|
76 | 122 | - notice that in each function, `start()` is called before each asynchronous task
|
77 | 123 | - `finish(withResult:)` is called in the completion handler of each asynchronous task
|
78 | 124 | - `start()` and `finish()` calls MUST be balanced
|
| 125 | + |
| 126 | +## Working Example |
| 127 | + |
| 128 | +The [tests]() have a working example. |
| 129 | + |
| 130 | +## License |
| 131 | +[MIT](http://opensource.org/licenses/MIT) [LICENSE](LICENSE) |
| 132 | + |
| 133 | +## Authors |
| 134 | + |
| 135 | +[Quan Vo](https://github.com/quanvo87), [Wilson Ding](https://github.com/dingwilson) |
| 136 | + |
| 137 | +*Please provide attribution, it is greatly appreciated.* |
0 commit comments