I have implemented silent push notification. Its not working if I killed app manually. After getting silent push notification, I have called one function which will send data to server.
Here is my code for Silent Push notification
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))handler
{
NSLog(@"didReceiveRemoteNotification fetchCompletionHandler...........");
[MyviewController SendDataFunction];
handler(UIBackgroundFetchResultNewData);
}
Please guide me.
Update: -There is no way to launch app via silent notification or via background fetch if user has killed app manually in app switcher. To get notification user must start the app again. And still if anybody needs to activate app then PushKit + VOIP should be enabled for that app like whatsapp, refer the following link https://zeropush.com/guide/guide-to-pushkit-and-voip