Skip to content

Instantly share code, notes, and snippets.

@aaustin
Last active September 21, 2015 17:36
Show Gist options
  • Save aaustin/8300c1107dad671b49f8 to your computer and use it in GitHub Desktop.
Save aaustin/8300c1107dad671b49f8 to your computer and use it in GitHub Desktop.
[[Branch getInstance] initSessionWithLaunchOptions:launchOptions andRegisterDeepLinkHandler:^(NSDictionary *deepLinkParams, NSError *error) {
if (!error) {
NSLog(@"finished init with params = %@", [deepLinkParams description]);
if ([deepLinkParams objectForKey:@"object_id"]) {
UINavigationController *navController = (UINavigationController *)self.window.rootViewController;
NSString * storyboardName = @"Main";
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:storyboardName bundle: nil];
UIViewController *nextVC = [storyboard instantiateViewControllerWithIdentifier:@"ObjectViewController"];
[navController setViewControllers:@[nextVC] animated:YES];
}
} else {
NSLog(@"failed init: %@", error);
}
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment