Home

Awesome

YTKNetwork

License MIT Pod version Carthage Compatible Platform info Build Status

What

YTKNetwork is a high level request util based on AFNetworking. It's developed by the iOS Team of YuanTiKu. It provides a High Level API for network request.

YTKNetwork is used in all products of YuanTiKu, including: YuanTiKu, YuanSoTi, YuanFuDao, FenBiZhiBoKe.

中文说明

Features

Who

YTKNetowrk is suitable for a slightly more complex project, not for a simple personal project.

YTKNetwork is helpful if you want to cache requests, manage the dependences of requests, or validate the JSON response. And if you want to cache requests based on request version, this is one of the greatest advantages of YTKNetwork.

Why 

YTKNetwork provides YTKRequest to handle every network request. You should inherit it and override some methods to define custom requests in your project.

The main idea is use the Command Pattern. The benefits are:

But YTKNetwork is not suitable if your project is very simple. You can use AFNetworking directly in controller.

Installation

To use YTKNetwork add the following to your Podfile

pod 'YTKNetwork'

Or add this in your Cartfile:

github "yuantiku/YTKNetwork" ~> 3.0

Requirements

YTKNetwork VersionAFNetworking VersionMinimum iOS TargetNote
3.x4.xiOS 9Xcode 11+ is required.
2.x3.xiOS 7Xcode 7+ is required.
1.x2.xiOS 6n/a

YTKNetwork is based on AFNetworking. You can find more detail about version compatibility at AFNetworking README.

Guide & Demo

Contributors

Acknowledgements

Thanks for their great work.

License

YTKNetwork is available under the MIT license. See the LICENSE file for more info.

<!-- external links -->