Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to handle Push on App not running state?

Is it possible to open the iOS App based on push notification content? I believe it's not possible. Is there any other way around? I believe we can go with the widget in iOS10, right? Please suggest some good solution?

Thanks!

like image 785
Gopik Avatar asked Jul 02 '17 13:07

Gopik


1 Answers

Whenever your payload has content-available:1 your app will get called in the backgroundstate as soon as it arrives and will call application(_:didReceiveRemoteNotification:fetchCompletionHandler:). It will only not get called if the user killed the app manually. (This doesn't launch your app. It requires your app to be launched though)

Having that said if your app was terminated (by user) but the user taps on the notitication then your app is launched from didFinishLaunching...delegate method.

like image 140
mfaani Avatar answered Sep 27 '22 20:09

mfaani