Skip to content

Latest commit

 

History

History
146 lines (139 loc) · 11.6 KB

2.2libnet.md

File metadata and controls

146 lines (139 loc) · 11.6 KB

Swift第三方库 - 网络

JSON & XML解析

分析对比测试

  • AEXML:XML解析器,Simple and lightweight XML parser written in Swift
  • AlamofireObjectMapper:将Alamofire JSON响应数据 转为swift对象。An Alamofire extension which converts JSON response data into swift objects using ObjectMapper
  • AlamofireSwiftyJSON:Alamofire(4) extension for serialize Data to SwiftyJSON(3.1)
  • Alembic:函数式 JSON 解析库,支持 JSON 解析、映射到对象、对象序列化为 JSON。Functional JSON parsing, mapping to objects, and serialize to JSON
  • CaesarParser:JSON 到 Model 转换工具,通过自定义操作符简化了代码编写,CaesarParser is a framework written in Swift for you to parse Model from JSON or to JSON.
  • DecodableJSON解析,Swift 2 JSON parsing done (more) right
  • Freddy:更安全地解析,且充分考虑 Swift 固有语法的 JSON 解析类。A reusable framework for parsing JSON in Swift.
  • Genome:A simple, type safe, failure driven mapping library for serializing JSON to models in Swift 2.0
  • HandyJSON:轻便的 JSON 对象序列化和反序列化工具库,A handy swift json-object serialization/deserialization library。参考:HandyJSON设计思路简析 
  • JASON:JSON 解析工具。特点:支持 subscript、使用计算属性做类型转换、Alamofire 扩展。
  • JSON:一款核心代码少于100行,基于 Swift 3 的 JSON 解析微类库。Micro framework for easily parsing JSON in Swift 3 with rich error messages in less than 100 lines of code
  • JSONSchema.swift:简单、易用的 JSON Schema 校验器类库,JSON Schema validator in Swift
  • Kanna:类似 Python 的 BeautifulSoup,可以解析 XML/HTML 字符串,然后对解析后的结果做一些操作,比如搜索、查找、修改等等。Kanna is an XML/HTML parser for macOS / iOS / tvOS.
  • Marshal:简单有效、可读性高,基于协议编程的 JSON 解析库,Marshaling the typeless wild west of [String: Any]
  • SwiftyJSON:JSON解析,The better way to deal with JSON data in Swift,参考:
    1. SwiftyJSON 介绍
    2. SwiftJSON 源码解析 (一)语法
  • SwiftyXMLParser:雅虎日本的工程师开源了这个项目,亮点是可以使用 for-in、map 和 filter。Simple XML Parser implemented in Swift
  • Wrap:对象转JSON类库,The easy to use Swift JSON encoder

客户端库&API

HTTP网络库

消息传输/聊天

  • Chatto:IM框架,A lightweight framework to build chat applications, made in Swift
  • MessageKit:消息 UI 库JSQMessagesViewController 的 Swift 版,Eventually, a Swift re-write of JSQMessagesViewController
  • NMessenger:A fast, lightweight messenger component built on AsyncDisplaykit and written in Swift
  • NoChat:一个轻量级聊天框架。NoChat is a Swift lightweight chat framework base on Chatto.
  • SlackTextViewController:Slack 开源的一个聊天输入界面的解决方案,包括了像是 @ 以及 # 等 tag 的支持,undo/redo 操作已经其他一些可定制化的部分。A drop-in UIViewController subclass with a growing text input view and other useful messaging features

网络相关

  • HanekeSwift:网络数据缓存库,A lightweight generic cache for iOS written in Swift with extra love for images.
  • Kingfisher:A lightweight and pure Swift implemented library for downloading and caching image from the web.
  • Host.swift:用Swift重写的NSHost,小巧实用的主机信息(主机名,网络地址等)捕获类。Host.swift was created because NSHost is unavailable on iOS and CFHost does not offer the full functionality of it OS X counterpart.
  • Postal:常用邮箱访问、收发框架库,A swift framework for working with emails
  • Redes:High-level network layer abstraction library written in Swift.
  • Reachability.swift:重写reachability网络库,用于替换苹果的 Reachability 类,可以方便地检测当前是否联网以及具体的联网状态,Replacement for Apple's Reachability re-written in Swift with closures
  • ReadabilityKit:超实用的文章、新闻内容图文摘要提取工具库,Preview extractor for news, articles and full-texts in Swift
  • Simplicity:用最简单的方法实现 Facebook 和 Google & 常用网站授权登录,A simple way to implement Facebook and Google login in your iOS and OS X apps.
  • SwifterSockets:Socket工具库,集合了许多常用的 Socket 工具函数。A collection of socket utilities in Swift for OS-X and iOS
  • SwiftLinkPreview:根据 URL 提取网页摘要预览库,It makes a preview from an URL, grabbing all the information such as title, relevant texts and images.
  • URITemplate.swift:方便实用的 URI 模式匹配库,Swift implementation of URI Template (RFC6570)
  • Vulcan:支持优先级设置的轻量图片下载器工具库,Multi image downloader with priority in Swift