【发布时间】:2013-02-12 19:09:08
【问题描述】:
我发现这篇文章对设置非常有帮助,但我还没有看到安装了通行证的 iPhone 上的推送通知。
Passkit-push-notification-not-working-with-urban-airship
我在 Urban airship 的网站上设置了我的应用程序,并将其推送到 Apple 的开发服务器。我在我的手机上安装了一个 pass 并运行了我在上面的帖子中找到的以下命令:
airship = urbanairship.Airship(_UrbanAirshipPassbookKey, _UrbanAirshipPassbookMasterSecret)
airship.push({'aps': {'alert': 'Go.'}}, device_tokens=tokens)
然后我会在 Xcode 的 iPhone 控制台窗口中看到此推送的确认。
Received push for topic pass.xxx.xxx: {
...
aps = {
banner = "Hello";
};
然后 iPhone 将其更新标签连同其传递类型 ID 和设备库 ID 发送回 Web 服务。此时,Web 服务应该发回更改的通行证列表。但是,我看到以下错误消息:
<Warning>: Web service error for pass.mypasstype.id (http://192.168.30.209:8000): Response to 'What changed?' request included 1 serial numbers but the lastUpdated tag (2013-02-11T17:25:25) remained the same.
有人知道为什么会这样吗?我是否需要实际修改 pass 中的字段才能让推送通知出现在设备上?
【问题讨论】:
-
我通过手动将 lastUpdated 标签设置为昨天临时修复了这个问题。不理想,但我会继续寻找更优雅的解决方案。
-
我有同样的问题你能帮我吗??
标签: apple-push-notifications urbanairship.com passbook