Hello friends I am using FCM first time in IOS, I have a condition. when I get notification I have to insert some data, But unable to do. Without sliding I am not able to trigger any function.So can anyone advice me how to resolve this issue. Only this function is calling after sliding
-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{
if (application.applicationState == UIApplicationStateActive){
//application was in foreground
NSLog(@"%@",userInfo);
} else if (application.applicationState == UIApplicationStateInactive){
//application was in background
NSLog(@"%@",userInfo);
}else if (application.applicationState == UIApplicationStateBackground){
NSLog(@"%@",userInfo);
}
}
Can anyone help me,Thanks in advance.