E
E
Empty User2015-07-14 18:32:23
iOS
Empty User, 2015-07-14 18:32:23

How to do something on a push notification?

Hello! I just can't figure out how to bind some kind of action to a notification? Well, that is, for example, a notification about a new post has arrived, when you click on it, you need to open this same post. Well, if the application is running, then for example update the list of posts.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
An, 2015-07-14
@Flanker_4

Look towards the method UIApplicationDelegate
-(void) application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
It twitches when the user opens an already running application, but in the background, with a tap. Or when a push comes to an application that is currently active.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question