我对 APNS 有几个疑问。我正在尝试澄清 APNS,但仍需要一些澄清。我必须知道how we are posting push notification in APN Server and how we push the notification to Apple APN Server?
我如何接收来自 Apple 的通知并向用户显示通知?我知道我们收到了以下代表的通知,
-(void)application:(UIApplication *)app didReceiveRemoteNotification:(NSDictionary *)userInfo
How we should show the notifications to the user
,请建议任何示例代码?请澄清我愚蠢的疑问。提前致谢。请帮我。
这个教程很有用,请参阅http://mobiforge.com/developing/story/programming-apple-push-notification-services http://mobiforge.com/developing/story/programming-apple-push-notification-services
当您收到推送通知时,请NSLog userInfo
-(void)application:(UIApplication *)app didReceiveRemoteNotification:(NSDictionary *)userInfo
{
NsLog("%@",userInfo);
}
推送通知仅出现一次,弹出窗口打开约 10 秒(取决于通知类型)...如果您单击,则 didReceiveRemoteNotification delegte 被调用,如果您无法单击任何原因,您可以通过转到设置 -> 看到通知通知点击...并检查
如果您想存储总推送通知,请使用数据库并存储在您的数据库中
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)