【问题标题】:How to post push notifications in APNS and how to show the notifications in iPhone?如何在 APNS 中发布推送通知以及如何在 iPhone 中显示通知?
【发布时间】:2012-04-11 13:01:11
【问题描述】:

我对 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,请提供任何示例代码?请澄清我愚蠢的怀疑。提前致谢。请帮帮我。

【问题讨论】:

标签: iphone ios apple-push-notifications apns-php


【解决方案1】:

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

当您收到推送通知时,请NSLog userInfo

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

推送通知仅出现一次,弹出窗口打开约 10 秒(取决于通知类型)...如果单击然后 didReceiveRemoteNotification delegte 调用,如果您无法单击任何原因看到通知,请转到设置->通知点击...并检查

如果您想存储总推送通知,请使用数据库并存储在您的数据库中

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-01-11
    • 2013-06-10
    • 2015-12-29
    • 1970-01-01
    • 2018-07-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多