Created
May 21, 2014 15:25
-
-
Save jmbeck/babb1b6446fe0e0872ab to your computer and use it in GitHub Desktop.
Kochava Slow Startup on Main Thread
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
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |
CLS_LOG(@"launchOptions: %@", launchOptions); | |
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys: | |
@"kothredupios3903535ae2e402049", @"kochavaAppId", | |
// @"1", @"enableLogging", | |
@"1", @"retrieveAttribution", | |
nil]; | |
NSLog(@"*** Begin init ***"); | |
kochavaTracker = [[KochavaTracker alloc] initKochavaWithParams:params]; | |
NSLog(@"*** End init ***"); | |
// ... didFinishLaunching continues | |
} | |
/* Logs | |
2014-05-21 08:20:08.501 iOS-Boutique[3103:60b] *** Begin init *** | |
2014-05-21 08:20:09.142 iOS-Boutique[3103:60b] *** End init *** | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've also noticed this and it seems that the library is doing IO on the main thread which sometimes causes the app to freeze for a moment on startup :/
Trying to move this init call on a background thread crashes the app.