Mezk Erei
Mezk Erei

Reputation: 65

Passbook coupon can't be opened in safari

I'm generating and signing coupons with the help of node-passbook module. I have an apple developer certificate and other needed stuff to sign created coupons. On Android everything works well but created coupon 'can't be opened' (downloaded) in safari. There is a long way how to generate final certificates on windows. Also, I have no my own MacBook, and I don't know how to debug this error (I've connected to safari's console and there is just 1 noninformative error). Can anyone help me with this? Here is the coupon https://s3-us-west-2.amazonaws.com/tap2win/1502317633138692.pkpass Thanks

Upvotes: 1

Views: 429

Answers (2)

superarts.org
superarts.org

Reputation: 7238

You may be seeing this problem because you're using Apple's official test server. By default the test pass wouldn't be installed because the webServiceURL is based on http instead of https.

To enable http server, on your device go to Settings -> Developer -> Allow HTTP Services.

IMPORTANT: never use HTTP web server in production environment.

Upvotes: 0

PassKit
PassKit

Reputation: 12581

Your webServiceURL schema is http, and not https. Change to https (and a point it to a valid web server!!), or flip on the PassKit 'Allow HTTP Services' toggle in the developer settings of your testing device and you should be OK.

To debug, simply go to the devices window in Xcode with your device connected and you will see the console logs in the bottom pane of the window. Not sure if you are saying you have a MacBook, or you don't have a MacBook. There is no way to debug without using 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.

Upvotes: 1

Related Questions