iOS Handle push notification when app is not running

1.2k Views Asked by At

I'm trying to use push notifications for my app. It's working when the app is running or when it's in background. But if the user "kills" the app and if I send a push notification, when the user taps on the notification, the app doesn't open to handle it.

How can I do this? I want to call a specific view when the user taps on a notification.

In my function didFinishLaunchingWithOptions:, I wrote this:

if (launchOptions != nil){
    [self callView];
}

I call the same function, [self callView];, in didReceiveRemoteNotification:. But it's not working unless the app is active or in the background.

0

There are 0 best solutions below