33 款驰骋 2017 的 iOS 开源库

avatar
技术支持 @LeanCloud

文/Paweł Białecki
译/Mantra
原文:medium.com/app-coder-i…

文末仓库资源地址汇总

1. IGListKit by Instagram Engineering


IGListKit 是由 Instagram 的开发者编写的数据驱动 UICollectionView 框架,它可以构建快速灵活的列表。同时,它能帮你避免在应用程序里使用大量冗余的 View Controllers。

GitHub:github.com/Instagram/I…

2. Realm by realm.io


Realm 是一个可以直接在手机,平板电脑和可穿戴设备上运行的移动数据库,不仅只限 iOS。如果你想尝试一些与 Core Data 不同的数据库,可以试一下 Realm。 很多人说这是一个完美的作品,已经能够完全地替代苹果原生的解决方案。

GitHub:github.com/realm/realm…

3. Moya by Ash Furrow


Moya 是一个非常适合作为你应用程序网络层的第三方库。你不用再思考在何时何地去写网络请求了,Moya 统统帮你搞定。


GitHub:github.com/Moya/Moya

4. SwiftyJSON by Pinglin Tang

在 Swift 中,用来解析 JSON 的绝对王牌。

转换这个:

if let statusesArray = try? JSONSerialization.jsonObject(with: data, options: .allowFragments) as? [[String: Any]],
    let user = statusesArray[0]["user"] as? [String: Any],
    let username = user["name"] as? String {
    // Finally we got the username
}

转换为:

let json = JSON(data: dataFromNetworking)
if let userName = json[0]["user"]["name"].string {
 // Now you got your value
}

GitHub:github.com/SwiftyJSON/…

5. Valet by Square

Valet 可以让你安全地将数据存储在 iOS 或 OS X Keychain 中,并且无需知道 Keychain 是如何工作的。它支持在单个设备上的多个应用程序(同一个开发人员)之间共享数据,也可以在具有 iCloud 的不同设备之间的同一款应用程序中共享数据。Touch ID 之间也绝对没有问题!

GitHub:github.com/square/Vale…

6. Firebase Analytics by Google Developers


由 Google 开发,可能是 iOS 上最好用的免费的统计分析解决方案。跟踪应用使用情况、用户参与度和活动、设置用户属性、创建自定义受众群体以及更多。

GitHub:firebase.google.com/docs/analyt…

7. AsyncDisplayKit


Facebook 为他们的应用程序 Paper 创建了这个异步 UI SDK。如果你有兴趣以 60 帧/s 的速度渲染你的应用程序的话,绝对要看看这个库。这里你可以先读一个 story

GitHub:github.com/facebook/As…

8. DZNEmptyDataSet

用户安装了你的应用程序,却看到了一个空白的 UITableView。DZNEmptyDataSet 可以通过提供空数据集默认模式来帮助你避免这种空白情况。


GitHub:github.com/dzenbot/DZN…

9. Chameleon by Vicc Alexander


Chameleon 是 iOS 中一个轻量级,但功能强大的颜色框架。他的 idea 建立在,软件应用程序也应该轻松地实现其漂亮的界面。

使用 Chameleon,你可以节省为应用程序配色而不断修改 RGB 值所浪费的时间,并且再也不用担心你的文本是否可以在应用程序的各种背景颜色可读的问题。


GitHub:github.com/ViccAlexand…

10. PermissionScope by Nick O'Neill


ermissionScope 是一个 Swift 框架,可以智能地向用户请求权限。它不仅拥有一个简单的 UI 来请求权限,还包括一个可以告诉你任何给定的系统权限的状态或轻松请求权限的统一 API。


GitHub:github.com/nickoneill/…

11. FileKit by Nikolai Vazquez


FileKit 是一个可以提供简单和表达性的文件管理 Swift 框架。可以看下使用示例。

GitHub:github.com/nvzqz/FileK…

12. SwiftyUserDefaults by Radek Pietruszewski

SwiftyUserDefaults 使用户默认将表达式 Swifty API 与静态类型的益处相结合。你可以轻松地定义 key,轻松使用类型值,更多的安全性和更方便的编译检查,并且这些更优质服务全是免费的。

GitHub:github.com/radex/Swift…


13. Kingfisher by 王巍


Kingfisher 是一个轻量级的正经 Swift 库,用于从网络上异步下载和缓存图像。

GitHub:github.com/onevcat/Kin…


14. Hero by Luke Zhao


Hero 是构建 iOS View Controller 转换的库。它在 UIKit 繁琐的转换 API 之上提供了一个让自定义转换更容易的层。

GitHub:github.com/lkzhao/Hero


15. Hedwig by 王巍


Hedwig 是一个 Swift 包,提供了一组高级 API,使你能够轻松地发送电子邮件到 SMTP 服务器。如果你打算从你的 Swift 服务器应用程序发送电子邮件,Hedwig 可能是一个非常赞的选择。

GitHub:github.com/onevcat/Hed…


16. DeviceKit by Dennis Weissmann

DeviceKit 是 UIDevice 的值类型替换。轻松获取设备信息和电池电量。

GitHub:github.com/dennisweiss…


17. Charts


美丽的线条、饼状图、条状图、散点图等,就在 Charts library。

GitHub:github.com/danielgindi…


18. MGSwipeTableCell

一个易于使用的 UITableViewCell 子类,可以实现具有各种转换的可滑动按钮。


GitHub:github.com/MortimerGor…


19. RandomKit by Nikolai Vazquez


简单易用的随机数生成工具。

littlebitesofcocoa.com/285-generat…
GitHub:github.com/nvzqz/Rando…


20. ResponseDetective

ResponseDetective 是一个非插入式框架,用于拦截应用程序和服务器之间的任何用于调试目的的传出请求和传入响应。

www.netguru.co/blog/respon…
GitHub:github.com/netguru/Res…


21. Onboard


简单几行代码,即可轻松创建引人入胜的开屏体验。

GitHub:github.com/mamaral/Onb…


22. Quick + Nimble by もどかしい


Quick 是 Swift 和 Objective-C 的 BDD 测试框架,由 Nimble 这个匹配器框架配合使用。

GitHub:github.com/Quick/Quick
GitHub:github.com/Quick/Nimbl…


23. Natalie by Marcin Krzyzanowski

Natalie 生成基于 storyboard 文件的,能够使Storyboards 和 segues 更容易工作的 Swift 代码。生成的文件减少 Strings 作为 Segues 或 Storyboard 标识符的使用。

GitHub:github.com/krzyzanowsk…


24. RxSwift by ReactiveExtensions*


对 Swift 中的反应式编程感兴趣?这里是 RxSwift。

GitHub:github.com/ReactiveX/R…


25. GDPerformanceView by Daniil Gavrilov





GDPerformanceView 在状态栏上方显示 FPS,CPU 使用情况,应用程序和 iOS 版本,并通过委托报告 FPS 和 CPU 使用情况。

GitHub:github.com/dani-gavril…


26. Alamofire


Alamofire 是一个用 Swift 编写的 HTTP 网络库。

www.appcoda.com/alamofire-b…
GitHub:github.com/Alamofire/A…


27. SwiftyStoreKit by Andrea Bizzotto


SwiftyStoreKit 是一个为 iOS 8.0+、tvOS 9.0+和macOS 10.10+ 而开发的轻量级的 In App Purchases 框架。

GitHub:github.com/bizz84/Swif…


28. Timepiece by AnyType

在 Swift 中直观的日期处理。

GitHub:github.com/naoty/Timep…


29. CryptoSwift by Marcin Krzyzanowski

Swift 中实现的加密相关的函数和零件。

GitHub:github.com/krzyzanowsk…

30. FSCalendar


完全可定制的 iOS 日历库,可兼容 Objective-C 和 Swift。

GitHub:github.com/WenchaoD/FS…


31. ImageViewer by Kristian Angyal

高仿 Twitter ImageViewer

GitHub:github.com/MailOnline/…


32. PromiseKit


PromiseKit 可以保证带有 swiftc 的平台细致完整的实现,在 iOS,macOS,tvOS 和 watchOS,有非常靠谱的 Objective-C 支撑。

GitHub:github.com/mxcl/Promis…


33. Ensembles by Drew McCormack


Ensembles 是一个 Objective-C 框架 ,支持 Swift,它扩展了 Apple 的 Core Data 框架,为 Mac OS 和 iOS 添加了点对点同步。多样的 SQLite 持久稳固存储,可以通过文件同步平台(如 iCloud 或 Dropbox)链接在一起。该框架可以轻松地扩展,用来支持能够在设备之间同步文件的任何服务,包括 custom servers。

GitHub:github.com/drewmccorma…

TL;DR list of libraries for quick access:

1、IGListKit[UICollectionView framework] -> pod 'IGListKit', '~> 2.0.0'
2、Realm [mobile database] -> pod 'RealmSwift'
3、Moya [encapsulated network layer] -> pod 'Moya', '8.0.0'
4、SwiftyJSON [JSON parsing] -> pod 'SwiftyJSON'
5、Valet [Keychain helper] -> pod 'Valet'
6、Firebase Analytics [analytics] -> pod 'Firebase/Core'
7、AsyncDisplayKit [asynchronous UI SDK] ->pod 'AsyncDisplayKit'
8、DZNEmptyDataSet[empty state pattern] -> pod 'DZNEmptyDataSet'
9、Chameleon [flat colors framework] -> pod 'ChameleonFramework/Swift', :git => 'https://github.com/ViccAlexander/Chameleon.git'
10、PermissionScope [iOS permissions framework] -> pod 'PermissionScope'
11、FileKit [file management] -> pod 'FileKit', '~> 4.0.0'
12、SwiftyUserDefaults [user defaults helper] -> pod 'SwiftyUserDefaults'
13、Kingfisher [image downloading] -> pod 'Kingfisher', '~> 3.0'
14、Hero [custom view controller transitions] -> pod 'Hero'
15、Hedwig [email sending]
16、DeviceKit [device info] -> pod 'DeviceKit', '~> 1.0'
17、Charts [well… charts] -> pod 'Charts'
18、MGSwipeTableCell [swipeable table cells] -> pod 'MGSwipeTableCell'
19、RandomKit [random numbers generation] -> pod 'RandomKit', '~> 3.0.0'
20、ResponseDetective [debug network requests] -> pod 'ResponseDetective'
21、Onboard [user onboarding] -> pod 'Onboard'
22、Quick + Nimble [BDD testing] -> pod 'Quick' pod 'Nimble'
23、Natalie [code generating from storyboard]
24、RxSwift [reactive programming] -> pod 'RxSwift', '~> 3.0'
25、GDPerformanceView [real time FPS and CPU usage] -> pod 'GDPerformanceView-Swift', '~> 1.1.0'
26、Alamofire [networking] -> pod 'Alamofire', '~> 4.3'
27、SwiftyStoreKit [In App Purchases] -> pod 'SwiftyStoreKit'
28、Timepiece [date helper] -> pod 'Timepiece'
29、CryptoSwift [cryptography] -> pod 'CryptoSwift'
30、FSCalendar [calendar] -> pod 'FSCalendar'
31、ImageViewer [Twitter inspired image viewer] -> pod 'ImageViewer'
32、PromiseKit [promises] ->pod 'PromiseKit', '~> 4.0'
33、Ensembles [Core Data synchronization] -> pod 'Ensembles'