mxcl/PromiseKit được TopGit xếp vào nhóm dự án di động, với 14.2k sao trên GitHub, viết chủ yếu bằng Swift. Promises for Swift & ObjC.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Promises simplify asynchronous programming, freeing you up to focus on the more
important things. They are easy to learn, easy to master and result in clearer,
more readable code. Your co-workers will thank you.
PromiseKit is a thoughtful and complete implementation of promises for any
platform that has a swiftc. It has excellent Objective-C bridging and
delightful specializations for iOS, macOS, tvOS and watchOS. It is a top-100
pod used in many of the most popular apps in the world.
Quick Start
In your Podfile:
use_frameworks!
target "Change Me!" do
pod "PromiseKit", "~> 8"
end
PromiseKit 8 supports recent Xcodes (13+). Some Podspecs were
dropped as a result.
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,
tvOS, watchOS, Linux and Android; CocoaPods, Carthage and SwiftPM;
(CI Matrix).
For Carthage, SwiftPM, Accio, etc., or for instructions when using older Swifts or Xcodes, see our Installation Guide. We recommend
Carthage or
Accio.
PromiseKit and Swift 5.5+ Async/Await
As of Swift 5.5, the Swift language now offers support for built-in concurrency with async / await. See Async+ for a port of PromiseKit's most useful patterns to this new paradigm.
Professionally Supported PromiseKit is Now Available
TideLift gives software development teams a single source for purchasing
and maintaining their software, with professional grade assurances from
the experts who know it best, while seamlessly integrating with existing
tools.
Get Professional Support for PromiseKit with TideLift.
Documentation
Handbook
Getting Started
Promises: Common Patterns
Frequently Asked Questions
Manual
Installation Guide
Objective-C Guide
Troubleshooting (e.g., solutions to common compile errors)
Appendix
API Reference
Extensions
Promises are only as useful as the asynchronous tasks they represent. Thus, we
have converted (almost) all of Apple’s APIs to promises. The default CocoaPod
provides Promises and the extensions for Foundation and UIKit. The other
extensions are available by specifying additional subspecs in your Podfile,
e.g.:
pod "PromiseKit/MapKit" # MKDirections().calculate().then { /*…*/ }
pod "PromiseKit/CoreLocation" # CLLocationManager.requestLocation().then { /*…*/ }
All our extensions are separate repositories at the PromiseKit organization.
I don't want the extensions!
Then don’t have them:
pod "PromiseKit/CorePromise", "~> 8"
Note: Carthage installations come with no extensions by default.
Networking
Promise chains commonly start with a network operation. Thus, we offer
extensions for URLSession:
// pod 'PromiseKit/Foundation' # https://github.com/PromiseKit/Foundation
firstly {
URLSession.shared.dataTask(.promise, with: try makeUrlRequest()).validate()
// ^^ we provide `.validate()` so that eg. 404s get converted to errors
}.map {
try JSONDecoder().decode(Foo.self, with: $0.data)
}.done { foo in
//…
}.catch { error in
//…
}
func makeUrlRequest() throws -> URLRequest {
var rq = URLRequest(url: url)
rq.httpMethod = "POST"
rq.addValue("application/json", forHTTPHeaderField: "Content-Type")
rq.addValue("application/json", forHTTPHeaderField: "Accept")
rq.httpBody = try JSONEncoder().encode(obj)
return rq
}
Support for Alamofire is welcome, please submit a PR.
Support
Please check our Troubleshooting Guide, and
if after that you still have a question, ask at our Gitter chat channel or on our bug tracker.
mxcl/PromiseKit thuộc nhóm Mobile trên TopGit, cùng 3 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về mxcl/PromiseKit ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/mxcl/PromiseKit là nguồn chính thức.
mxcl/PromiseKit có phải mã nguồn mở không?
Có — mxcl/PromiseKit phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/mxcl/PromiseKit.
mxcl/PromiseKit có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho mxcl/PromiseKit. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
mxcl/PromiseKit dùng license gì?
mxcl/PromiseKit phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
mxcl/PromiseKit là gì?
mxcl/PromiseKit (mxcl/PromiseKit) là dự án Swift trên GitHub. Theo mô tả gốc: Promises for Swift & ObjC.
Vì sao mxcl/PromiseKit được xếp vào nhóm Mobile?
TopGit xếp mxcl/PromiseKit vào nhóm Mobile dựa trên GitHub topics và mô tả của repo (gắn thẻ: "objc", "promises", "swift"). Việc phân loại dựa trên metadata thật của repo, không phải đoán theo cảm tính biên tập.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về PromiseKit?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về PromiseKit.