Skip to content

Instantly share code, notes, and snippets.

@skuenzli
Created November 1, 2014 21:56
Show Gist options
  • Save skuenzli/4c9dbc4779a71a4d3145 to your computer and use it in GitHub Desktop.
Save skuenzli/4c9dbc4779a71a4d3145 to your computer and use it in GitHub Desktop.
AppDelegate with automatic measurement of http requests
#import "AppDelegate.h"
#import <WNGLogger/logger.h>
#import <WNGLogger/NSURLConnection+WNGLogging.h> //add WNGLogging category to NSURLConnection
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSString *apiKey = @"specify your api key here";
[WNGLogger initSharedLogger:apiKey];
[NSURLConnection wng_enableLogging]; //enable logging of all requests; that's it!
// perform other post-launch-activities
return YES;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment