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

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -