I create deep link for my application which is register on branch.io . I sent the url using message,email,FB. When user clicked on that link it is redirecting base on condition if app installed then open app and show Deeplink view controller if app not installed then open app store with this app.But i am facing issue , when app installed and user clicked on link app not automatically open with deeplink view controller it will show blank view for 2 seconds and after it will close that view.
Please help me .
CODE IN DID FINISH LUNCHING
//Branch.io
Branch *branch = [Branch getInstance];
[branch initSessionWithLaunchOptions:launchOptions automaticallyDisplayDeepLinkController:YES];
....
CODE FOR NAVIGATION CONTROLLER
....
//Registered DEEPLINK VC
DeepLinkVC *controllerDeepLink = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"DeepLinkingController"];
[branch setDebug];
[branch registerDeepLinkController:controllerDeepLink forKey:@"sms"];
NSDictionary* dictionary = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
[branch initSessionWithLaunchOptions:dictionary isReferrable:YES andRegisterDeepLinkHandler:^(NSDictionary *params, NSError *error) {
if ([params valueForKey:@"questionId"])
{
//CHECK FOR LOGIN
if([kNSUserDefaults objectForKey:kUserId] != nil)
{
controllerDeepLink.dicPost=params;
UINavigationController *currNavi = (UINavigationController *)tabBar_Controller.selectedViewController;
id tempDeepVC =[[currNavi viewControllers] lastObject];
if ([tempDeepVC isKindOfClass:[DeepLinkVC class]] == NO)
{
[currNavi pushViewController:controllerDeepLink animated:YES];
}
}
}
}];