如何发布在APNS以及如何推送通知显示在iPhone的通知? [英] How to post push notifications in APNS and how to show the notifications in iPhone?

查看:229
本文介绍了如何发布在APNS以及如何推送通知显示在iPhone的通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个APNS怀疑。我试图自己做的APNS清楚,但还是需要一些澄清。我必须知道我们是如何发布推送通知的APN服务器,以及我们如何推动通知苹果APN服务器?键,还我如何从苹果公司收到通知,并显示通知用户?我知道我们是从下面委派收到通知,

I have several doubts about APNS. Am trying myself to make clear on the APNS but still need some clarifications. I have to know how we are posting push notification in APN Server and how we push the notification to Apple APN Server? And also how am i receive the notification from Apple and show the notification to user? I know we are receive the Notifications from below delegate,

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

我们应该如何显示通知给用户,请建议任何样本codeS?请澄清我傻了怀疑。提前致谢。请帮我。

How we should show the notifications to the user, please suggest any sample codes? Please clarify my silly doubts. Thanks in advance. Please help me.

推荐答案

本教程是非常有用的,请参阅
http://mobiforge.com/developing/story/programming-apple-push-notification-services

this tutorial is useful please see http://mobiforge.com/developing/story/programming-apple-push-notification-services

当您收到推送notificaion,请的NSLog USERINFO

when you receive push notificaion ,please NSLog userInfo

-(void)application:(UIApplication *)app didReceiveRemoteNotification:(NSDictionary *)userInfo
{
      NsLog("%@",userInfo);
}

推notificaion是只来一次,流行为您开放,约10秒(依靠notifcation型)...如果你点击然后didReceiveRemoteNotification delegte是电话,如果您不能单击您去看看notificaion任何理由设置 - >的通知点击...检查

push notificaion is come only one time , pop is open for about 10 second(Depend on notifcation type)... if you click then didReceiveRemoteNotification delegte is call , if you can't click any reason you see notificaion by go to setting->notification click...and check

如果你想存储总推notifaction使用的数据库和存储在数据库中。

if you want store total push notifaction use the database and store in your database

这篇关于如何发布在APNS以及如何推送通知显示在iPhone的通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆