Created
November 1, 2014 21:56
-
-
Save skuenzli/4c9dbc4779a71a4d3145 to your computer and use it in GitHub Desktop.
AppDelegate with automatic measurement of http requests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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