简体   繁体   English

如何在iOS5中注册消息通知?

[英]How to register the message notification in ios5?

I am developing an application in ios5 and i need the code to get notification when a message arrives as well as when a message dispatches. 我正在ios5中开发应用程序,我需要代码来在消息到达以及消息调度时获得通知。 I have the code to fire the notification for every 10 seconds. 我有代码可以每10秒触发一次通知。 But i want to receive a notification, when message arrives or dispatches. 但是我想在消息到达或发送时收到通知。

Thanks 谢谢

You will want to have a look at this page , and use the correct delegate method (assuming you are talking about push notifications). 您将需要在此页面上进行查看,并使用正确的委托方法(假设您正在谈论推送通知)。

Eg 例如

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo

Remote (Push) and local notification delegates: 远程(推送)和本地通知代表:

application:didReceiveRemoteNotification:
application:didReceiveLocalNotification:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM