33 款馳騁 2017 的 iOS 開源庫

文/Paweł Białecki

譯/Mantra

原文:https://medium.com/app-coder-io/33-ios-open-source-libraries-that-will-dominate-2017-4762cf3ce449#.cdqp06lb5

文末倉庫資源地址彙總

1. IGListKit by Instagram Engineering


IGListKit 是由 Instagram 的開發者編寫的數據驅動 UICollectionView 框架,它可以構建快速靈活的列表。同時,它能幫你避免在應用程序裏使用大量冗餘的 View Controllers。

GitHub:https://github.com/Instagram/IGListKit

2. Realm by realm.io


Realm 是一個可以直接在手機,平板電腦和可穿戴設備上運行的移動數據庫,不僅只限 iOS。如果你想嘗試一些與 Core Data 不同的數據庫,可以試一下 Realm。 很多人說這是一個完美的作品,已經能夠完全地替代蘋果原生的解決方案。

GitHub:https://github.com/realm/realm-cocoa

3. Moya by Ash Furrow


Moya 是一個非常適合作爲你應用程序網絡層的第三方庫。你不用再思考在何時何地去寫網絡請求了,Moya 統統幫你搞定。


GitHub:https://github.com/Moya/Moya

4. SwiftyJSON by Pinglin Tang

在 Swift 中,用來解析 JSON 的絕對王牌。

轉換這個:

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

轉換爲:

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

GitHub:https://github.com/SwiftyJSON/SwiftyJSON

5. Valet by Square

Valet 可以讓你安全地將數據存儲在 iOS 或 OS X Keychain 中,並且無需知道 Keychain 是如何工作的。它支持在單個設備上的多個應用程序(同一個開發人員)之間共享數據,也可以在具有 iCloud 的不同設備之間的同一款應用程序中共享數據。Touch ID 之間也絕對沒有問題!

GitHub:https://github.com/square/Valet

6. Firebase Analytics by Google Developers


由 Google 開發,可能是 iOS 上最好用的免費的統計分析解決方案。跟蹤應用使用情況、用戶參與度和活動、設置用戶屬性、創建自定義受衆羣體以及更多。

GitHub:https://firebase.google.com/docs/analytics/

7. AsyncDisplayKit


Facebook 爲他們的應用程序 Paper 創建了這個異步 UI SDK。如果你有興趣以 60 幀/s 的速度渲染你的應用程序的話,絕對要看看這個庫。這裏你可以先讀一個story

GitHub:https://github.com/facebook/AsyncDisplayKit

8. DZNEmptyDataSet

用戶安裝了你的應用程序,卻看到了一個空白的 UITableView。DZNEmptyDataSet 可以通過提供空數據集默認模式來幫助你避免這種空白情況。


GitHub:https://github.com/dzenbot/DZNEmptyDataSet

9. Chameleon by Vicc Alexander


Chameleon 是 iOS 中一個輕量級,但功能強大的顏色框架。他的 idea 建立在,軟件應用程序也應該輕鬆地實現其漂亮的界面。

使用 Chameleon,你可以節省爲應用程序配色而不斷修改 RGB 值所浪費的時間,並且再也不用擔心你的文本是否可以在應用程序的各種背景顏色可讀的問題。



GitHub:https://github.com/ViccAlexander/Chameleon

10. PermissionScope by Nick O'Neill


ermissionScope 是一個 Swift 框架,可以智能地向用戶請求權限。它不僅擁有一個簡單的 UI 來請求權限,還包括一個可以告訴你任何給定的系統權限的狀態或輕鬆請求權限的統一 API。


GitHub:https://github.com/nickoneill/PermissionScope

11. FileKit by Nikolai Vazquez


FileKit 是一個可以提供簡單和表達性的文件管理 Swift 框架。可以看下使用示例。

GitHub:https://github.com/nvzqz/FileKit

12. SwiftyUserDefaults by Radek Pietruszewski

SwiftyUserDefaults 使用戶默認將表達式 Swifty API 與靜態類型的益處相結合。你可以輕鬆地定義 key,輕鬆使用類型值,更多的安全性和更方便的編譯檢查,並且這些更優質服務全是免費的。

GitHub:https://github.com/radex/SwiftyUserDefaults

13. Kingfisher by 王巍


Kingfisher 是一個輕量級的正經 Swift 庫,用於從網絡上異步下載和緩存圖像。

GitHub:https://github.com/onevcat/Kingfisher

14. Hero by Luke Zhao


Hero 是構建 iOS View Controller 轉換的庫。它在 UIKit 繁瑣的轉換 API 之上提供了一個讓自定義轉換更容易的層。

GitHub:https://github.com/lkzhao/Hero

15. Hedwig by 王巍


Hedwig 是一個 Swift 包,提供了一組高級 API,使你能夠輕鬆地發送電子郵件到 SMTP 服務器。如果你打算從你的 Swift 服務器應用程序發送電子郵件,Hedwig 可能是一個非常讚的選擇。

GitHub:https://github.com/onevcat/Hedwig

16. DeviceKit by Dennis Weissmann

DeviceKit 是 UIDevice 的值類型替換。輕鬆獲取設備信息和電池電量。

GitHub:https://github.com/dennisweissmann/DeviceKit

17. Charts


美麗的線條、餅狀圖、條狀圖、散點圖等,就在 Charts library。


GitHub:https://github.com/danielgindi/Charts

18. MGSwipeTableCell

一個易於使用的 UITableViewCell 子類,可以實現具有各種轉換的可滑動按鈕。




GitHub:https://github.com/MortimerGoro/MGSwipeTableCell

19. RandomKit by Nikolai Vazquez


簡單易用的隨機數生成工具。

https://littlebitesofcocoa.com/285-generating-random-data-with-randomkit

GitHub:https://github.com/nvzqz/RandomKit

20. ResponseDetective

ResponseDetective 是一個非插入式框架,用於攔截應用程序和服務器之間的任何用於調試目的的傳出請求和傳入響應。

https://www.netguru.co/blog/response-detective-ios-open-source

GitHub:https://github.com/netguru/ResponseDetective

21. Onboard


簡單幾行代碼,即可輕鬆創建引人入勝的開屏體驗。

GitHub:https://github.com/mamaral/Onboard

22. Quick + Nimble by もどかしい


Quick 是 Swift 和 Objective-C 的 BDD 測試框架,由 Nimble 這個匹配器框架配合使用。

GitHub:https://github.com/Quick/Quick

GitHub:https://github.com/Quick/Nimble

23. Natalie by Marcin Krzyzanowski

Natalie 生成基於 storyboard 文件的,能夠使Storyboards 和 segues 更容易工作的 Swift 代碼。生成的文件減少 Strings 作爲 Segues 或 Storyboard 標識符的使用。

GitHub:https://github.com/krzyzanowskim/Natali

24. RxSwift by ReactiveExtensions*


對 Swift 中的反應式編程感興趣?這裏是 RxSwift。

GitHub:https://github.com/ReactiveX/RxSwift

25. GDPerformanceView by Daniil Gavrilov





GDPerformanceView 在狀態欄上方顯示 FPS,CPU 使用情況,應用程序和 iOS 版本,並通過委託報告 FPS 和 CPU 使用情況。

GitHub:https://github.com/dani-gavrilov/GDPerformanceView-Swift

26. Alamofire


Alamofire 是一個用 Swift 編寫的 HTTP 網絡庫。

https://www.appcoda.com/alamofire-beginner-guide/

GitHub:https://github.com/Alamofire/Alamofire

27. SwiftyStoreKit by Andrea Bizzotto


SwiftyStoreKit 是一個爲 iOS 8.0+、tvOS 9.0+和macOS 10.10+ 而開發的輕量級的 In App Purchases 框架。

GitHub:https://github.com/bizz84/SwiftyStoreKit

28. Timepiece by AnyType

在 Swift 中直觀的日期處理。

GitHub:https://github.com/naoty/Timepiece

29. CryptoSwift by Marcin Krzyzanowski

Swift 中實現的加密相關的函數和零件。

GitHub:https://github.com/krzyzanowskim/CryptoSwift

30. FSCalendar


完全可定製的 iOS 日曆庫,可兼容 Objective-C 和 Swift。

GitHub:https://github.com/WenchaoD/FSCalendar

31. ImageViewer by Kristian Angyal

高仿 Twitter ImageViewer

GitHub:https://github.com/MailOnline/ImageViewer

32. PromiseKit


PromiseKit 可以保證帶有 swiftc 的平臺細緻完整的實現,在 iOS,macOS,tvOS 和 watchOS,有非常靠譜的 Objective-C 支撐。

GitHub:https://github.com/mxcl/PromiseKit

33. Ensembles by Drew McCormack


Ensembles 是一個 Objective-C 框架 ,支持 Swift,它擴展了 Apple 的 Core Data 框架,爲 Mac OS 和 iOS 添加了點對點同步。多樣的 SQLite 持久穩固存儲,可以通過文件同步平臺(如 iCloud 或 Dropbox)鏈接在一起。該框架可以輕鬆地擴展,用來支持能夠在設備之間同步文件的任何服務,包括 custom servers。

GitHub:https://github.com/drewmccormack/ensembles

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'

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章