ios7 - which method iOS will call when enter by notification? -
when app in background , ios notification, after use type notification enter app, method ios call? because need open view controller after user tap notification enter app.
- (void)application:(uiapplication *)application didreceiveremotenotification:(nsdictionary *)userinfo
the above method can not distinguish app opened background.
if app receives notification while in foreground, application:didreceiveremotenotification:
called.
however, when app in background , it's launched tapping on notification, application:didfinishlaunchingwithoptions:
called launch option having key named uiapplicationlaunchoptionsremotenotificationkey
. value of key nsdictionary
payload of remote notification.
hope answers question.
ps. nice article on uiapplicationdelegate launch options
Comments
Post a Comment