ASDebugger -- App Network Monitor for iOS

Remote debugging network requests, effortlessly Mock Data, Intergrated easily with iOS


Installation

1. Get an Appkey

Sign up for free and than you could register an App you want to track, click here to Sign Up (it's free) after it will guide you to show how to register an App step by step

2. Using Cocoapods integrated

ASDebugger is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ASDebugger'

* Warning: Make sure the settings is only running on the Debug environment. so the suggestion is:

pod 'ASDebugger', :configurations => ['Debug']

* Or you could manually Install without Pods

Download the framework of ASDebugger , put it into your projects

Usage

Quick Start

Import ASDebugger header file

switch to
import ASDebugger

In general, we put the initialized code in the AppDelegate class method of didFinishLaunchingWithOptions.

ASDebugger.start(withAppKey: "Your AppKey", secret: "translation missing: en.your applied AppSecret")

after all network requesting will go through THERE (we call it NetworkFetcher), you can inspect all requests detail over there.

Mock Data

Dynamic load

Select API you want to mock in the Network Observer

Mock01 ee62be4daf9948f4995c99b934749cf7736a1fc2438da6961d6b8a575b1e6f08

Click "set to device" on right button

Mock02 68c5db6b2c2a4749f8150345282ecbf18425c1ec1ca61a6cc3923a788cdaf9a9

if everything is going well, you will see the Mock is running now.

Mock03 4363abcad2eb2571a7561889a4c80703e9e385061058219b3076608d55167cce

Manually load Mock

Specific request response via Mock Data

  1. go to Network Fetchers and choice what mock request you want, click the Mock button, and than you will be redirect to Mock Data API creating page to generate a dummy response
  2. after created succssfully, copy the API resource address, i.e: user/profile
  3. Modify initialize code :
ASDebugger.shared().enableMock(withPath: "user/profile")
              

relaunch your App, and than all the API request will use what you created mock data as a response return. you can also change your Mock data content to debugging

Redirect

a make reqest could be redirect to a specific address

ASDebugger.shared().enableMock(withPath: "user/profile", mockUrl: "http://www.google.com/user/profile")
              

Advanced Usage

1. Open or Close tracking

ASDebugger.shared().start
ASDebugger.shared().stop

2. Enable or disable Mocking

ASDebugger.shared().enableMock()
ASDebugger.shared().disableMock()

3. initialized with App key only. you could open it manually

ASDebugger.initWithAppKey("Your AppKey", secret:@"translation missing: en.your applied AppSecret")

you will see more configuration in the ASDebugger interface header file

Notes

  1. Sorry for provides the back-end codes to build a local server. because the back-end server codes has not been finish yet. it still need to be improve. so let me know what your need. any feedback would be greatly appreciated !
  2. the SDK provides iOS native network moduels which includes NSURLSession or 3rd libs like AFNetwork or SDWebImage . but it doesnt support ASIHttpRequest yet, because the ASI used their private protocol to handle network request, so far i have no time to adopt it yet.

Screen Shot

Screenshot01 ef2a7436166dc7041ec0fc107c5219fd9d5500afddb41e251cf25b8bb3d29a02

Demo