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类等。

   

 

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