[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6687":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":22,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},6687,"PromiseKit","mxcl\u002FPromiseKit","mxcl","Promises for Swift & ObjC.","",null,"Swift",14238,1457,247,10,0,4,69.89,"MIT License",false,"master",true,[24,25,26],"objc","promises","swift","2026-06-12 04:00:30","![PromiseKit](..\u002Fgh-pages\u002Fpublic\u002Fimg\u002Flogo-tight.png)\n\n[![badge-pod][]][cocoapods] ![badge-languages][] ![badge-pms][] ![badge-platforms][] [![codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fmxcl\u002FPromiseKit\u002Fbranch\u002Fmaster\u002Fgraph\u002Fbadge.svg?token=wHSAz7N8WA)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fmxcl\u002FPromiseKit)\n\n---\n\nPromises simplify asynchronous programming, freeing you up to focus on the more\nimportant things. They are easy to learn, easy to master and result in clearer,\nmore readable code. Your co-workers will thank you.\n\n```swift\nUIApplication.shared.isNetworkActivityIndicatorVisible = true\n\nlet fetchImage = URLSession.shared.dataTask(.promise, with: url).compactMap{ UIImage(data: $0.data) }\nlet fetchLocation = CLLocationManager.requestLocation().lastValue\n\nfirstly {\n    when(fulfilled: fetchImage, fetchLocation)\n}.done { image, location in\n    self.imageView.image = image\n    self.label.text = \"\\(location)\"\n}.ensure {\n    UIApplication.shared.isNetworkActivityIndicatorVisible = false\n}.catch { error in\n    self.show(UIAlertController(for: error), sender: self)\n}\n```\n\nPromiseKit is a thoughtful and complete implementation of promises for any\nplatform that has a `swiftc`. It has *excellent* Objective-C bridging and\n*delightful* specializations for iOS, macOS, tvOS and watchOS. It is a top-100\npod used in many of the most popular apps in the world.\n\n[![codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fmxcl\u002FPromiseKit\u002Fbranch\u002Fmaster\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fmxcl\u002FPromiseKit)\n\n# Quick Start\n\nIn your [Podfile]:\n\n```ruby\nuse_frameworks!\n\ntarget \"Change Me!\" do\n  pod \"PromiseKit\", \"~> 8\"\nend\n```\n\nPromiseKit 8 supports recent Xcodes (13+). Some Podspecs were\n[dropped as a result](https:\u002F\u002Fgithub.com\u002Fmxcl\u002FPromiseKit\u002Fpull\u002F1318).\nPull requests are welcome.\n\nPromiseKit 6, 5 and 4 support Xcode 8.3, 9.x and 10.0; Swift 3.1,\n3.2, 3.3, 3.4, 4.0, 4.1, 4.2, 4.3 and 5.0 (development snapshots); iOS, macOS,\ntvOS, watchOS, Linux and Android; CocoaPods, Carthage and SwiftPM;\n([CI Matrix](https:\u002F\u002Ftravis-ci.org\u002Fmxcl\u002FPromiseKit)).\n\nFor Carthage, SwiftPM, Accio, etc., or for instructions when using older Swifts or Xcodes, see our [Installation Guide]. We recommend\n[Carthage](https:\u002F\u002Fgithub.com\u002FCarthage\u002FCarthage) or\n[Accio](https:\u002F\u002Fgithub.com\u002FJamitLabs\u002FAccio).\n\n# PromiseKit and Swift 5.5+ Async\u002FAwait\n\nAs of Swift 5.5, the Swift language now offers support for [built-in concurrency with async \u002F await](https:\u002F\u002Fdocs.swift.org\u002Fswift-book\u002FLanguageGuide\u002FConcurrency.html).  See [Async+](https:\u002F\u002Fgithub.com\u002Fasync-plus\u002Fasync-plus) for a port of PromiseKit's most useful patterns to this new paradigm.\n\n# Professionally Supported PromiseKit is Now Available\n\nTideLift gives software development teams a single source for purchasing\nand maintaining their software, with professional grade assurances from\nthe experts who know it best, while seamlessly integrating with existing\ntools.\n\n[Get Professional Support for PromiseKit with TideLift](https:\u002F\u002Ftidelift.com\u002Fsubscription\u002Fpkg\u002Fcocoapods-promisekit?utm_source=cocoapods-promisekit&utm_medium=referral&utm_campaign=readme).\n\n\n# Documentation\n\n* Handbook\n  * [Getting Started](Documentation\u002FGettingStarted.md)\n  * [Promises: Common Patterns](Documentation\u002FCommonPatterns.md)\n  * [Frequently Asked Questions](Documentation\u002FFAQ.md)\n* Manual\n  * [Installation Guide](Documentation\u002FInstallation.md)\n  * [Objective-C Guide](Documentation\u002FObjectiveC.md)\n  * [Troubleshooting](Documentation\u002FTroubleshooting.md) (e.g., solutions to common compile errors)\n  * [Appendix](Documentation\u002FAppendix.md)\n* [API Reference](https:\u002F\u002Fmxcl.dev\u002FPromiseKit\u002Freference\u002Fv6\u002FClasses\u002FPromise.html)\n\n# Extensions\n\nPromises are only as useful as the asynchronous tasks they represent. Thus, we\nhave converted (almost) all of Apple’s APIs to promises. The default CocoaPod\nprovides Promises and the extensions for Foundation and UIKit. The other\nextensions are available by specifying additional subspecs in your `Podfile`,\ne.g.:\n\n```ruby\npod \"PromiseKit\u002FMapKit\"          # MKDirections().calculate().then { \u002F*…*\u002F }\npod \"PromiseKit\u002FCoreLocation\"    # CLLocationManager.requestLocation().then { \u002F*…*\u002F }\n```\n\nAll our extensions are separate repositories at the [PromiseKit organization].\n\n## I don't want the extensions!\n\nThen don’t have them:\n\n```ruby\npod \"PromiseKit\u002FCorePromise\", \"~> 8\"\n```\n\n> *Note:* Carthage installations come with no extensions by default.\n\n## Networking\n\nPromise chains commonly start with a network operation. Thus, we offer\nextensions for `URLSession`:\n\n```swift\n\u002F\u002F pod 'PromiseKit\u002FFoundation'  # https:\u002F\u002Fgithub.com\u002FPromiseKit\u002FFoundation\n\nfirstly {\n    URLSession.shared.dataTask(.promise, with: try makeUrlRequest()).validate()\n    \u002F\u002F ^^ we provide `.validate()` so that eg. 404s get converted to errors\n}.map {\n    try JSONDecoder().decode(Foo.self, with: $0.data)\n}.done { foo in\n    \u002F\u002F…\n}.catch { error in\n    \u002F\u002F…\n}\n\nfunc makeUrlRequest() throws -> URLRequest {\n    var rq = URLRequest(url: url)\n    rq.httpMethod = \"POST\"\n    rq.addValue(\"application\u002Fjson\", forHTTPHeaderField: \"Content-Type\")\n    rq.addValue(\"application\u002Fjson\", forHTTPHeaderField: \"Accept\")\n    rq.httpBody = try JSONEncoder().encode(obj)\n    return rq\n}\n```\n\nSupport for Alamofire is welcome, please submit a PR.\n\n\n# Support\n\nPlease check our [Troubleshooting Guide](Documentation\u002FTroubleshooting.md), and\nif after that you still have a question, ask at our [Gitter chat channel] or on [our bug tracker].\n\n## Security & Vulnerability Reporting or Disclosure\n\nhttps:\u002F\u002Ftidelift.com\u002Fsecurity\n\n\n[badge-pod]: https:\u002F\u002Fimg.shields.io\u002Fcocoapods\u002Fv\u002FPromiseKit.svg?label=version\n[badge-pms]: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fsupports-CocoaPods%20%7C%20Carthage%20%7C%20Accio%20%7C%20SwiftPM-green.svg\n[badge-languages]: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flanguages-Swift%20%7C%20ObjC-orange.svg\n[badge-platforms]: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatforms-macOS%20%7C%20iOS%20%7C%20watchOS%20%7C%20tvOS%20%7C%20Linux-lightgrey.svg\n[badge-mit]: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg\n[OMGHTTPURLRQ]: https:\u002F\u002Fgithub.com\u002FPromiseKit\u002FOMGHTTPURLRQ\n[Alamofire]: http:\u002F\u002Fgithub.com\u002FPromiseKit\u002FAlamofire-\n[PromiseKit organization]: https:\u002F\u002Fgithub.com\u002FPromiseKit\n[Gitter chat channel]: https:\u002F\u002Fgitter.im\u002Fmxcl\u002FPromiseKit\n[our bug tracker]: https:\u002F\u002Fgithub.com\u002Fmxcl\u002FPromiseKit\u002Fissues\u002Fnew\n[Podfile]: https:\u002F\u002Fguides.cocoapods.org\u002Fsyntax\u002Fpodfile.html\n[PMK6]: http:\u002F\u002Fmxcl.dev\u002FPromiseKit\u002Fnews\u002F2018\u002F02\u002FPromiseKit-6.0-Released\u002F\n[Installation Guide]: Documentation\u002FInstallation.md\n[badge-travis]: https:\u002F\u002Ftravis-ci.org\u002Fmxcl\u002FPromiseKit.svg?branch=master\n[travis]: https:\u002F\u002Ftravis-ci.org\u002Fmxcl\u002FPromiseKit\n[cocoapods]: https:\u002F\u002Fcocoapods.org\u002Fpods\u002FPromiseKit\n","PromiseKit 是一个为 Swift 和 Objective-C 设计的 Promise 库，用于简化异步编程。其核心功能包括易于理解和掌握的 Promise 模型，支持链式调用、错误处理以及并行和顺序执行任务，从而让代码更加清晰易读。它具备出色的 Objective-C 互操作性和针对 iOS、macOS、tvOS 及 watchOS 的专门优化。适用于需要进行复杂网络请求、文件操作等异步任务的应用场景，特别是在那些追求代码可维护性和可读性的大型项目中表现尤为突出。",2,"2026-06-11 03:08:18","top_language"]