Skip to content

Commit

Permalink
v8
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Jun 20, 2023
1 parent 707652b commit 81051db
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 51 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ jobs:
wait-for-completion: true

lint:
runs-on: macos-10.15
runs-on: macos-latest
strategy:
matrix:
xcode:
- ^10
- ^11
- ^12
- ^13
- ^14
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
Expand Down
54 changes: 7 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ pod used in many of the most popular apps in the world.

[![codecov](https://codecov.io/gh/mxcl/PromiseKit/branch/master/graph/badge.svg)](https://codecov.io/gh/mxcl/PromiseKit)

# PromiseKit 6

[Release notes and migration guide][PMK6].

# Quick Start

In your [Podfile]:
Expand All @@ -45,11 +41,13 @@ In your [Podfile]:
use_frameworks!

target "Change Me!" do
pod "PromiseKit", "~> 6.8"
pod "PromiseKit", "~> 8"
end
```

> The above gives an Xcode warning? See our [Installation Guide].
PromiseKit 8 supports recent Xcodes (13+). Some Podspecs were
[dropped as a result](https://github.com/mxcl/PromiseKit/pull/1318).
Pull requests are welcome.

PromiseKit 6, 5 and 4 support Xcode 8.3, 9.x and 10.0; Swift 3.1,
3.2, 3.3, 3.4, 4.0, 4.1, 4.2, 4.3 and 5.0 (development snapshots); iOS, macOS,
Expand All @@ -73,20 +71,6 @@ tools.

[Get Professional Support for PromiseKit with TideLift](https://tidelift.com/subscription/pkg/cocoapods-promisekit?utm_source=cocoapods-promisekit&utm_medium=referral&utm_campaign=readme).

# PromiseKit is Thousands of Hours of Work

Hey there, I’m Max Howell. I’m a prolific producer of open source software and
probably you already use some of it (I created [`brew`]). I work full-time on
open source and it’s hard; currently *I earn less than minimum wage*. Please
help me continue my work, I appreciate it 🙏🏻

<a href="https://www.patreon.com/mxcl">
<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
</a>

[Other ways to say thanks](http://mxcl.dev/#donate).

[`brew`]: https://brew.sh

# Documentation

Expand Down Expand Up @@ -121,12 +105,12 @@ All our extensions are separate repositories at the [PromiseKit organization].
Then don’t have them:

```ruby
pod "PromiseKit/CorePromise", "~> 6.8"
pod "PromiseKit/CorePromise", "~> 8"
```

> *Note:* Carthage installations come with no extensions by default.
## Choose Your Networking Library
## Networking

Promise chains commonly start with a network operation. Thus, we offer
extensions for `URLSession`:
Expand Down Expand Up @@ -155,32 +139,8 @@ func makeUrlRequest() throws -> URLRequest {
}
```

And [Alamofire]:

```swift
// pod 'PromiseKit/Alamofire' # https://github.com/PromiseKit/Alamofire-

firstly {
Alamofire
.request("http://example.com", method: .post, parameters: params)
.responseDecodable(Foo.self)
}.done { foo in
//
}.catch { error in
//
}
```

Nowadays, considering that:

* We almost always POST JSON
* We now have `JSONDecoder`
* PromiseKit now has `map` and other functional primitives
* PromiseKit (like Alamofire, but not raw-`URLSession`) also defaults to having
callbacks go to the main thread
Support for Alamofire is welcome, please submit a PR.

We recommend vanilla `URLSession`. It uses fewer black boxes and sticks closer to the metal. Alamofire was essential until the three bullet points above
became true, but nowadays it isn’t really necessary.

# Support

Expand Down

0 comments on commit 81051db

Please sign in to comment.