I have an app in which I’m using push notifications. What I really want to do is when a user slides to view from the lock screen he should be able to go to a specific view controller, and not just simply open the app.
Is this possible? Can anyone direct me towards right direction?
Thanks a lot!
In your
application:didFinishLaunchingWithOptions:method you can check whether your app was started due to a remote notification by looking into thelaunchOptionsdictionary. The keyUIApplicationLaunchOptionsRemoteNotificationKeywill give you the remote notification, if any, and you would then need to present your view controller.If your app is still running while the remote notification arrives your app delegate’s
application:didReceiveRemoteNotification:method is called.See the UIApplicationDelegate documentation.