Giter Club home page Giter Club logo

objc-wispsdk's Introduction

WISP SDK介绍

本SDK用于获取用户HTTP/HTTPS请求的性能统计。

原理:

使用NSURLProtocol去重新定义苹果的URL加载系统 (URL Loading System)的行为。当URL Loading System使用NSURLRequest去获取资源的时候,它会创建一个NSURLProtocol子类的实例。我们重新实现了NSURLProtocol的方法以获得请求相关的详细信息:

  • 请求URL
  • 首包时间
  • 总下载字节
  • 总下载时间
  • 错误码
  • 错误描述

目前支持NSURLConnection、NSURLSession、AFNetworking、第三方库。

使用:

这里有一个简单的例子

1. Podfile

platform :ios, '7.0'
pod 'QiniuWISP', '~> 0.2.4'

2. 手动

objc-wispSDK目录下的源文件(.h和.m)拷贝到自己的项目中。

使用例子:

[WISPURLProtocol enableWithAppID:@"57f89e2e61f0c4745ffe6bbf"
                           andAppKey:@"57f89e2e4cf0836f0a60a161"];

objc-wispsdk's People

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.