Apple 推送通知不适用于临时构建 [英] Apple Push Notification not working with ad-hoc build

查看:28
本文介绍了Apple 推送通知不适用于临时构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在开发模式下,我可以向设备发送推送通知,而不是在生产模式下,我的设置是:

In development mode I can send push notification to devices, instead I can't in production, my setup is:

  • .pem 文件,它是配置门户的 aps_production.cer 和我的临时证书的私钥的组合
  • 苹果服务器 apn:'gateway.push.apple.com' 与 2196 端口
  • 我有一个 rails 服务器,它保存设备中的令牌,然后使用这些设备令牌和之前的 .file 向苹果发送通知以打开连接
  • 临时构建应用程序具有(它是 ruby​​motion):权利['aps-environment'] = '生产'权利['get-task-allow'] = false
  • 应用程序启动时,将令牌正确发送到我的应用程序服务器
  • 我刚刚检查了令牌是否与开发模式不同

问题是我的 rails 应用程序发送了通知但没有收到任何错误,但设备上没有任何内容.

The problem is that my rails application sends notifications and didn't receive any errors, but nothing arrived on devices.

我正在使用 testflight 分发我的应用程序的临时版本,但我不知道使用 testlight 和 APNS 有任何问题.

I'm using testflight for distribute ad-hoc version of my application, but I don't known any problem using testlight and APNS.

可以是什么?

EDIT 我解决了:端口错误,2195 而不是 2196...

EDIT I resolved: the port was wrong, 2195 instead of 2196...

推荐答案

APN 有单独的 SSL 证书用于生产和开发.

APNs have a separate SSL certificate for production and for development.

您可能在生产版本中使用您的开发证书.

You are probably using your development certificate with the production build.

这篇关于Apple 推送通知不适用于临时构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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