简体   繁体   English

pkpass 无法通过电子邮件附件在 iOS 上打开

[英]pkpass won't open on iOS from e-mail attachment

All websites mention that Passbook passes can be sent by e-mail.所有网站都提到 Passbook 通行证可以通过电子邮件发送。 But when the pass (generated by our server) is attached to an e-mail, the iOS e-mail client won't open it and write "(null)" instead.但是当通行证(由我们的服务器生成)附加到电子邮件时,iOS 电子邮件客户端不会打开它并改为写入“(空)”。 The same pass works fine on Android and also has no problems communicating with our web service.相同的传递在 Android 上运行良好,并且与我们的 Web 服务通信也没有问题。 Any ideas?有什么想法吗? Google searches didn't offer any solutions.谷歌搜索没有提供任何解决方案。

Screenshot:截图:

在此处输入图片说明

Solved: There were multiple problems:已解决:存在多个问题:

  • The authentication token has to be at least 16 characters long身份验证令牌的长度必须至少为 16 个字符
  • I used the "Apple Inc. Root Certificate" (wrong one) instead of the "AppleWWDRCA" (correct one)我使用了“Apple Inc. Root Certificate”(错误的)而不是“AppleWWDRCA”(正确的)
  • For production the web service needs to use https对于生产,Web 服务需要使用 https

You get that when the pass in invalid, most likely due to it being incorrectly signed and/or the pass certificate has expired.当通行证无效时,您会得到该信息,很可能是由于它未正确签名和/或通行证已过期。

Drag your pass into iPhone Simulator and check the Console app to look for error in the logs.将您的通行证拖入 iPhone Simulator 并检查控制台应用程序以查找日志中的错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM