ios - Is there a way to get the last push notification when my app starts up? -
in scenario user did not swipe push notification before disappeared, there way retrieve last 1 sent device app? can go notification center , see last few push notifications app there, there way can retrieve last 1 when app opens?
there no way retrieve past push notifications.
typically, isn't needed. once launched, app can communicate server see what's new.
if app launched notification, app receive push notification passed in option key
uiapplicationlaunchoptionsremotenotificationkey
app delegate methodapplication:didfinishlaunchingwithoptions
.if app running , in foreground when push notification arrives, app delegate
application:didreceiveremotenotification
calledwith ios 7 , later, if notification type
content-available
, have background app refresh capability turned on (and user has not disabled background app refresh), app in backgroundapplication:didreceiveremotenotification
Comments
Post a Comment