<p align="center">
<a href="https://github.com/johnlui/Pitaya"><img src="https://github.com/johnlui/Pitaya/blob/swift3/assets/logo@2x.jpg"></a>
</p>
<p align="center">
<a href="https://github.com/johnlui/Pitaya"><img src="https://img.shields.io/badge/platform-ios-lightgrey.svg"></a>
<a href="https://github.com/johnlui/Pitaya"><img src="https://img.shields.io/github/license/johnlui/Pitaya.svg?style=flat"></a>
<a href="https://github.com/johnlui/Pitaya"><img src="https://img.shields.io/badge/language-Swift%203-orange.svg"></a>
<a href="https://github.com/Carthage/Carthage"><img src="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat"></a>
<a href="https://travis-ci.org/johnlui/Pitaya"><img src="https://img.shields.io/travis/johnlui/Pitaya.svg"></a>
</p>
<br>
<blockquote align="center">
<span>Thus, programs must be written for people to read, and only incidentally for machines to execute.</span>
<br>
<span>Harold Abelson, "<a href="https://mitpress.mit.edu/sicp/front/node3.html">Structure and Interpretation of Computer Programs</a>" ( S.I.C.P )</span>
</blockquote>
<br>
Pitaya is a Swift HTTP / HTTPS networking library for people. Inspired by [Alamofire](https://github.com/Alamofire/Alamofire) and [JustHTTP](https://github.com/JustHTTP/Just).
<br>
### [中文简介](#中文介绍)
## Example
### Simple
```swift
Pita.build(HTTPMethod: .GET, url: "https://httpbin.org/get?hello=Hello%20Pitaya!")
.responseJSON { (json, response) -> Void in
print(json["args"]["hello"].stringValue) // get "Hello Pitaya!"
}
```
### All examples
![All Examples](https://github.com/johnlui/Pitaya/blob/swift3/assets/PitayaExample@2x.png)
## Documentation
### [Read the documentation](https://github.com/johnlui/Pitaya/wiki)
### [中文文档](https://github.com/johnlui/Pitaya/wiki/%E4%B8%AD%E6%96%87%E6%96%87%E6%A1%A3)
## Features
- [x] Support Swift Package Manager
- [x] Elegant APIs for people
- [x] Support HTTP Basic Authorization
- [x] Support setting SSL pinning
- [x] Support setting HTTP raw body (include [JSON body](https://github.com/johnlui/Pitaya/wiki#http-raw-body))
- [x] Asynchronous & Queue
- [x] Upload files fast
- [x] Internal fully JSON support with [JSONNeverDie](https://github.com/johnlui/JSONNeverDie)
- [x] Support setting custom HTTP headers
- [x] almost 100% tested
## Requirements
* iOS 7.0+
* Xcode 8 (Swift 3) (v2.x) in current swift3 branch.
* Xcode 7 (Swift 2) (v1.x) in master branch.
* Xcode 6.4 (Swift 1.2) before [v0.2.3](https://github.com/johnlui/Pitaya/releases/tag/v0.2.3)
## Installation
### Swift Package Manager
You can use [The Swift Package Manager](https://swift.org/package-manager) to install `Pitaya` by adding the proper description to your `Package.swift` file:
```swift
import PackageDescription
let package = Package(
name: "YOUR_PROJECT_NAME",
targets: [],
dependencies: [
.Package(url: "https://github.com/johnlui/Pitaya.git", versions: "1.3.4" ..< Version.max)
]
)
```
Note that the [Swift Package Manager](https://swift.org/package-manager) is still in early design and development, for more infomation checkout it's [GitHub Page](https://github.com/apple/swift-package-manager)
### Carthage
[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.
You can install Carthage with Homebrew using the following command:
```bash
$ brew update
$ brew install carthage
```
To integrate Pitaya into your Xcode project using Carthage, specify it in your Cartfile:
```json
github "JohnLui/Pitaya"
```
Then fetch and build Pitaya:
```bash
carthage update
```
At last, add it to "Embedded Binaries" in the general panel use the "Add Other..." button. The Pitaya.framework binary file is lying in `./Carthage/Build/iOS` directory.
### Manually
```bash
git submodule add https://github.com/johnlui/Pitaya.git
open .
```
then drag Pitaya.xcodeproj into your Project, that's it!
If you want to run your project on devices with Pitaya, just go to PROJECT->TARGETS->[your project name]->General->Embedded Binaries, click +, select Pitaya.frameWork and click "Add".
### Source File
Clone all files in the `Source` directory into your project.
## Contribution
You are welcome to fork and submit pull requests.
## License
Pitaya is open-sourced software licensed under the MIT license.
# 中文介绍
> Thus, programs must be written for people to read, and only incidentally for machines to execute.(代码是写给人看的,只是恰好能运行。)
>
> Harold Abelson, "[Structure and Interpretation of Computer Programs](https://mitpress.mit.edu/sicp/front/node3.html)" ( S.I.C.P )
Pitaya(火龙果) 是一个写给人看的纯 Swift 写成的 HTTP / HTTPS 网络库。从 [Alamofire](https://github.com/Alamofire/Alamofire) 和 [JustHTTP](https://github.com/JustHTTP/Just) 偷了一些创意和代码。
## 使用示例
### 基本用法
```swift
Pita.build(HTTPMethod: .GET, url: "https://httpbin.org/get?hello=Hello%20Pitaya!")
.responseJSON { (json, response) -> Void in
print(json["args"]["hello"].stringValue) // get "Hello Pitaya!"
}
```
### 所有用法
![All Examples](https://github.com/johnlui/Pitaya/blob/swift3/assets/PitayaExample@2x.png)
### [中文文档](https://github.com/johnlui/Pitaya/wiki/%E4%B8%AD%E6%96%87%E6%96%87%E6%A1%A3)
## 功能
- [x] 支持 Swift Package Manager
- [x] 写给人用的优雅 API
- [x] 支持 HTTP Basic Authorization
- [x] 支持设置 SSL 钢钉,防“中间人攻击”
- [x] 支持设置 HTTP raw body (支持 [JSON body](https://github.com/johnlui/Pitaya/wiki#http-raw-body))
- [x] 异步、队列
- [x] 快速文件上传
- [x] 内置 [JSONNeverDie](https://github.com/johnlui/JSONNeverDie),完全支持 JSON 数据
- [x] 支持设定 HTTP headers
- [x] 几乎 100% 测试率
## 环境要求
* iOS 7.0+
* Xcode 8 (Swift 3) v2.x 版,位于 swift3 分支(当前默认版本)
* Xcode 7 (Swift 2) v1.x 版,位于 master 分支
* Xcode 6.4 (Swift 1.2) 版: [v0.2.3](https://github.com/johnlui/Pitaya/releases/tag/v0.2.3)
## 安装
### Swift Package Manager
[The Swift Package Manager](https://swift.org/package-manager) 是苹果伴随 Swift 开源而推出的 Swift 语言包管理工具。
编辑你项目的 `Package.swift`:
```swift
import PackageDescription
let package = Package(
name: "YOUR_PROJECT_NAME",
targets: [],
dependencies: [
.Package(url: "https://github.com/johnlui/Pitaya.git", versions: "1.3.4" ..< Version.max)
]
)
```
[Swift Package Manager](https://swift.org/package-manager) 依然在开发中,功能不太稳定,建议关注它的 [GitHub Page](https://github.com/apple/swift-package-manager)。
### Carthage
[Carthage](https://github.com/Carthage/Carthage) 是一个去中心化的 Cocoa 应用程序自动依赖添加工具。
使用以下命令安装 Carthage
```bash
$ brew update
$ brew install carthage
```
安装好 Carthage 后,将下列内容加入你项目的 Cartfile:
```json
github "JohnLui/Pitaya"
```
自动下载、编译 Pitaya:
```bash
carthage update
```
最后,在 general panel 里 的 "Embedded Binaries" 项下点击 "Add Other..." 按钮,Pitaya.framework 已经躺在了 `./Carthage/Build/iOS` 目录里。
> 这种方法目前还不支持 BITCODE,如果需要支持,请直接将 Pitaya.xcodeproj 拖入你的工程。
### 手动安装
```bash
git clone https://github.com/johnlui/Pitaya.git
open Pitaya
```
在打开的 Finder 窗口中把 Pitaya.xcodeproj 拖到 Xcode 你的文件树里。
真机调试还需要额外的一步:打开 PROJECT->TARGETS->[your project name]->General,找到 Embedded Binaries, 点击 +, 选中 Pitaya.framework,点击“Add”即可。
### 源代码安装
把 `Source` 文件夹下的文件拖进你的文件树里即可。
## 参与开源
欢迎提交 issue 和 PR,大�
没有合适的资源?快使用搜索试试~ 我知道了~
基于Swift言编写的 Material Design风格的 iOS流媒体音乐播放器
共501个文件
h:97个
swift:94个
json:78个
需积分: 5 0 下载量 189 浏览量
2024-02-05
09:47:41
上传
评论
收藏 5.91MB ZIP 举报
温馨提示
基于Swift言编写的 Material Design风格的 iOS流媒体音乐播放器基于Swift言编写的 Material Design风格的 iOS流媒体音乐播放器基于Swift言编写的 Material Design风格的 iOS流媒体音乐播放器基于Swift言编写的 Material Design风格的 iOS流媒体音乐播放器基于Swift言编写的 Material Design风格的 iOS流媒体音乐播放器基于Swift言编写的 Material Design风格的 iOS流媒体音乐播放器基于Swift言编写的 Material Design风格的 iOS流媒体音乐播放器基于Swift言编写的 Material Design风格的 iOS流媒体音乐播放器基于Swift言编写的 Material Design风格的 iOS流媒体音乐播放器基于Swift言编写的 Material Design风格的 iOS流媒体音乐播放器基于Swift言编写的 Material Design风格的 iOS流媒体音乐播放器基于Swift言编写的 Material Design风格的 iOS流媒体音
资源推荐
资源详情
资源评论
收起资源包目录
基于Swift言编写的 Material Design风格的 iOS流媒体音乐播放器 (501个子文件)
lvwenhancom.cer 1KB
Fastfile 2KB
dancing-banana.gif 70KB
loader.gif 10KB
single-frame.gif 5KB
.gitignore 1KB
.gitignore 1KB
.gitignore 108B
DOUAudioStreamer.h 2KB
DOUSimpleHTTPRequest.h 2KB
Kingfisher.h 2KB
DOUAudioFileProvider.h 1KB
DOUAudioPlaybackItem.h 1KB
LSStubRequestDSL.h 1KB
DOUAudioDecoder.h 1KB
DOUAudioStreamer_Private.h 1KB
DOUAudioRenderer.h 1KB
DOUMPMediaLibraryAssetLoader.h 1KB
DOUAudioStreamer+Options.h 1KB
LSStubResponseDSL.h 841B
DOUAudioEventLoop.h 810B
DOUAudioVisualizer.h 805B
NSData+DOUMappedFile.h 797B
DOUAudioAnalyzer.h 794B
LSStubRequest.h 766B
Nocilla.h 738B
DOUEAGLView.h 733B
LSStubResponse.h 680B
DOUAudioLPCM.h 666B
DOUAudioAnalyzer_Private.h 662B
DOUAudioFile.h 646B
LSNocilla.h 624B
DOUAudioFilePreprocessor.h 560B
DOUAudioAnalyzer+Default.h 549B
DOUAudioBase.h 534B
DOUAudioFrequencyAnalyzer.h 498B
DOUAudioSpatialAnalyzer.h 496B
Pitaya.h 483B
LSHTTPRequest.h 304B
LSDataMatcher.h 297B
LSHTTPRequestDiff.h 275B
LSNSURLSessionHook.h 270B
NSData+Matcheable.h 267B
LSHTTPResponse.h 255B
LSASIHTTPRequestAdapter.h 219B
ASIHTTPRequestStub.h 211B
LSHTTPRequestDSLRepresentation.h 169B
Swift-MMP-Bridging-Header.h 164B
LSStringMatcher.h 154B
LSMatcher.h 147B
NSString+Nocilla.h 140B
LSRegexMatcher.h 128B
NSRegularExpression+Matcheable.h 125B
KingfisherTests-Bridging-Header.h 123B
NSURLRequest+LSHTTPRequest.h 122B
LSMatcheable.h 119B
NSString+Matcheable.h 114B
LSHTTPClientHook.h 109B
NSData+Nocilla.h 105B
NSURLRequest+DSL.h 98B
LSHTTPStubURLProtocol.h 90B
LSHTTPBody.h 90B
LSASIHTTPRequestHook.h 87B
LSNSURLHook.h 78B
NSURLRequest+LSHTTPRequest.h 72B
LSASIHTTPRequestAdapter.h 71B
LSASIHTTPRequestHook.h 68B
LSHTTPStubURLProtocol.h 67B
NSRegularExpression+Matcheable.h 66B
NSRegularExpression+Matcheable.h 66B
asihttprequeststub.h 66B
LSNSURLSessionHook.h 64B
NSURLRequest+DSL.h 62B
LSHTTPRequestDSLRepresentation.h 61B
LSNSURLHook.h 57B
NSString+Matcheable.h 55B
NSString+Matcheable.h 55B
NSString+Nocilla.h 54B
NSString+Nocilla.h 54B
NSData+Matcheable.h 53B
NSData+Matcheable.h 53B
NSData+Nocilla.h 52B
NSData+Nocilla.h 52B
LSStringMatcher.h 51B
LSRegexMatcher.h 50B
LSHTTPRequestDiff.h 49B
LSDataMatcher.h 49B
LSHTTPClientHook.h 49B
LSStubResponseDSL.h 48B
LSMatcheable.h 48B
LSMatcheable.h 48B
LSStubResponseDSL.h 48B
LSStubResponse.h 47B
LSStubRequestDSL.h 47B
LSHTTPResponse.h 47B
LSStubRequestDSL.h 47B
LSStubRequest.h 46B
LSHTTPRequest.h 46B
LSMatcher.h 45B
LSHTTPBody.h 43B
共 501 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
小码叔
- 粉丝: 4197
- 资源: 1197
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 采用P-f和Q-V滞控的去中心化逆变器型交流微电网的模拟(Simulink仿真实现)
- 彩虹聚合二级域名DNS管理系统源码v1.3
- 【TOF相机笔记3】Simulink使用方法
- 算法部署-基于C++和Python使用ONNXRuntime部署RT-DETR目标检测算法-附项目源码-优质项目实战.zip
- Bitree.cpp
- 改变浏览器大小,图片(img)内容居中显示
- 全景分割-基于FAIR-DETR对Cityscapes数据集进行微调实现全景分割-附项目源码-优质项目实战.zip
- Tru master.m4a
- 基于ELMAN神经网络的用气量预测,基于ELMAN的天然气消费量预测(代码完整,数据齐全)
- 基于Vue3+ThreeJS实现机械臂控制和预览+源码+开发文档+代码解析(高分优秀项目)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功