Passbook优惠券无法在safari中打开

时间:2015-10-09 06:29:49

标签: ios node.js debugging safari passbook

我在node-passbook模块的帮助下生成和签署优惠券。 我有一个苹果开发者证书和其他所需的东西来签署创建的优惠券。在Android上一切都运作良好,但创建优惠券不能打开' (下载)在safari中。如何在Windows上生成最终证书还有很长的路要走。此外,我没有自己的MacBook,我也不知道如何调试此错误(我已经连接到safari的控制台,只有1个非信息错误)。谁能帮我这个? 这是优惠券https://s3-us-west-2.amazonaws.com/tap2win/1502317633138692.pkpass 感谢

2 个答案:

答案 0 :(得分:1)

您的webServiceURL架构为http,而非https。更改为https(并将其指向有效的Web服务器!!),或者在测试设备的开发人员设置中切换PassKit“允许HTTP服务”切换,您应该没问题。

要进行调试,只需在连接设备的情况下转到Xcode中的设备窗口,您将在窗口的底部窗格中看到控制台日志。不确定您是否说有MacBook,或者您没有MacBook。没有使用Xcode就无法进行调试。

Oct  9 15:12:36 iPhone MobileSafari[5311] <Warning>: scheme of webServiceURL 'http://0.0.0.0:1212' needs to be an https rather than http.
Oct  9 15:12:36 iPhone MobileSafari[5311] <Error>: scheme of webServiceURL 'http://0.0.0.0:1212' needs to be an https rather than http.
Oct  9 15:12:36 iPhone MobileSafari[5311] <Warning>: Invalid data error reading pass pass.com.example.passbook/E5982H-I2. scheme of webServiceURL 'http://0.0.0.0:1212' needs to be an https rather than http.
Oct  9 15:12:36 iPhone MobileSafari[5311] <Error>: Invalid data error reading pass pass.com.example.passbook/E5982H-I2. scheme of webServiceURL 'http://0.0.0.0:1212' needs to be an https rather than http.
Oct  9 15:12:36 iPhone MobileSafari[5311] <Warning>: PassBook Pass download failed: The pass cannot be read because it isn’t valid.

答案 1 :(得分:0)

您可能会看到此问题,因为您正在使用Apple的官方测试服务器。默认情况下,不会安装测试通行证,因为webServiceURL基于http而不是https

要启用http服务器,请在您的设备上转到Settings -> Developer -> Allow HTTP Services

重要提示:永远不要在生产环境中使用HTTP Web服务器。