iOS-swift之常用框架簡單介紹

網絡框架
CocoaAsyncSocket

· GitHub地址:https://github.com/robbiehanson/CocoaAsyncSocket/

· 特點:易用、強大的socket(TCP\UDP)第三方。

SwiftHttp

· GitHub地址:https://github.com/daltoniam/SwiftHTTP 

· 特點:基於NSURLSession,簡單API、內置JSON請求序列化、上傳\下載帶有進度、支持簡單隊列(Queue)、支持參數編碼。

AFNetworking

· GitHub地址:https://github.com/AFNetworking/AFNetworking

· 特點:用swift不方便;支持ARC、支持HTTPS、只支持異步請求。

Alamofire

· GitHub地址:https://github.com/Alamofire/Alamofire

· 特點:專爲swift設計的網絡框架;

Moya

· GitHub地址:https://github.com/Moya/Moya

· 特點:基於 Alamofire 的更高層網絡請求封裝抽象層。

MKNetworkKit

· GitHub地址:https://github.com/MugunthKumar/MKNetworkKit

· 特點:高度輕量、不支持上傳進度、支持HTTPS需要插件

 

數據交換格式
NSXML · 特點:iOS自帶的解析XML框架,採用SAX模式解析。
KissXML

· GitHub地址:https://github.com/robbiehanson/KissXML

· 特點:基於libxml,使用簡單。

TBXML

· GitHub地址:https://github.com/codebots-ltd/TBXML 

· 特點:採用DOM模式解析,適用於輕量數據。

SwiftyJSON

· GitHub地址:https://github.com/SwiftyJSON/SwiftyJSON

· 特點:swift處理JSON數據

 

數據持久化
Core Data · 特點:蘋果提供的數據持久化技術,底層是SQLite數據庫。    
Realm

· GitHub地址:https://github.com/realm/realm-cocoa

· 特點:一個跨平臺的移動數據庫,支持Android和iOS;使用簡單;有自己的數據庫引擎。

FMDB

· GitHub地址:https://github.com/ccgus/fmdb

· 特點:基於SQLite;輕量;使用簡單;提供了多線程安全的數據庫操作方法。

   

 

音視頻框架
IJKPlayer

· GitHub地址:https://github.com/Bilibili/ijkplayer

· 特點:基於FFmpeg,能播放如rtsp等多種格式的流媒體。

· 我製作的framework(支持rtsp):https://download.csdn.net/download/amberoot/10555321

FFmpeg

· GitHub地址:https://github.com/FFmpeg/FFmpeg

· 特點:FFmpeg是一套可以用來記錄、轉換數字音頻、視頻,並能將其轉化爲流的開源計算機程序。

               

視圖框架
AAInfographics

· GitHub地址:https://github.com/AAChartModel/AAChartKit-Swift

· 特點: AAChartKit 的 swift 語言版本,是開源前端圖表框架Highcharts的基礎上封裝的面向對象的、簡單易用、極其精美的圖表繪製控件。

Charts

· GitHub地址:https://github.com/danielgindi/Charts

· 特點:十分強大的圖表框架,能製作折線圖、柱狀圖、餅狀圖、組合圖等。

ImageHelper

· GitHub地址:https://github.com/melvitax/ImageHelper

· 特點:swift的圖片處理框架。

       

服務端框架
Perfect

· GitHub地址:https://github.com/PerfectlySoft/Perfect

· 特點:swift服務端框架;

Vapor

· 官網:https://www.vaporcn.com

· 特點:swift寫的服務端網絡框架,可以運行在macOS和Ubuntu上面;

GCDWebServer

· GitHub地址:https://github.com/swisspol/GCDWebServer 

· 特點:基於 GCD 的輕量級服務器框架,用於內嵌到 MacOS 或者 iOS 系統的應用中提供 HTTP1.1 的服務。

 

自動佈局框架
SnapKit

· GitHub地址:https://github.com/SnapKit/SnapKit

· 特點:swift自動佈局框架;簡化代碼寫約束;容易適配多種屏幕;

   

 

緩存框架
AwesomeCache

· GitHub地址:https://github.com/aschuch/AwesomeCache

· 特點:swift寫的;基於NSCache;輕量;沒有明確區分內存(Memory)和磁盤(Disk );

Cache

· GitHub地址:https://github.com/hyperoslo/Cache

· 特點:採用swift4 Codable;默認磁盤緩存;通過DiskConfig和MemoryConfig可多種選擇;支持清空到期對象;線程安全;默認同步操作,也支持異步API;內存緩存使用NSCache, 磁盤緩存使用文件管理。

Track

· GitHub地址:https://github.com/maquannene/Track

· 特點:swift寫的;線程安全;支持LRU,可以通過限制容量,過期時間和內存使用情況來清除最近最少使用的對象;支持內存緩存和磁盤緩存;支持同步和異步操作;

   

       

SQL框架
OHMySQL

· GitHub地址:https://github.com/oleghnidets/OHMySQL

· 特點:能直連MySQL數據庫

   

 

 

異步編程框架
PromiseKit

· GitHub地址:https://github.com/mxcl/PromiseKit

· 特點:PromiseKit 是 iOS/MacOS 中一個用來處理異步編程的框架,簡化了異步編程工作。

coobjc

· GitHub地址:https://github.com/alibaba/coobjc

· 特點:coobjc 支持 await、generator 和 actor model,提供了 cokit 庫爲 Foundation 和 UIKit 中的部分 API 提供了協程化支持,包括 NSFileManager、JSON、NSData 與 UIImage 等。coobjc 也提供了元組的支持。

   

                               

日期處理框架
SwiftDate

· GitHub地址:https://github.com/malcommac/SwiftDate

· 特點:SwiftDate 是一個使用 Swift 語言編寫的 Date 封裝庫,可以很方便地對日期進行處理。

   

 

加密框架
CryptoSwift

· GitHub地址:https://github.com/krzyzanowskim/CryptoSwift

· 特點:使用swift編寫的加密工具包。

   

 

其他框架
SwifterSwift

· GitHub地址:https://github.com/SwifterSwift/SwifterSwift

· 官網:https://swifterswift.com

· 使用文檔:http://swifterswift.com/docs/

· 特點:收集了超過500個原生swift的擴展,提供了方便的方法、語法糖和性能改進,適用於各種原始數據類型、UIKit和Cocoa類等。

   

 

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