Remote debugging network requests, effortlessly Mock Data, Intergrated easily with iOS
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
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']
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.
Select API you want to mock in the Network Observer
Click "set to device" on right button
if everything is going well, you will see the Mock is running now.
Specific request response via Mock Data
user/profile
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
a make reqest could be redirect to a specific address
ASDebugger.shared().enableMock(withPath: "user/profile", mockUrl: "http://www.google.com/user/profile")
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")
ASDebugger
interface header fileASIHttpRequest
yet, because the ASI used their private protocol to handle network request, so far i have no time to adopt it yet.