NetGuard is a lightweight native iOS network debugger. 🚀
target 'YourTargetName' do
use_frameworks!
pod 'NetGuard', :git => 'https://github.com/batikansosun/NetGuard.git', :tag => '2.0'
end
All you need is to call the "loadNetGuard" method in "didFinishLaunchingWithOptions" "AppDelegate". That's it
//import NetGuard
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
NetGuard().loadNetGuard()
return true
}
//@import NetGuard;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[NetGuard new] loadNetGuard];
}
'enabled' default value is true. You don't need to setting up to 'true'. 'false' value disables network watching.
NetGuard.enabled = false
'shakeEnabled' default value is true. You don't need to setting up to 'true' for shake for showing request list UI.
NetGuard.shakeEnabled = false
You can disable shake with setting up to 'false' and you can call 'showNetGuard()' anywhere.
NetGuard().showNetGuard()
With 'blackListHosts' you can exclude requests you defined.
NetGuard.blackListHosts = ["example.com"]
For all questions please start a new discussion
Made with ❤️ by Batikan Sosun
NetGuard is available under the MIT license. See the LICENSE file for more info.