Pass could not be opened
midoshawky opened this issue · comments
Running OS
Mac OS Ventura 13.3.1
Running Node Version
v19.9.0
Description
afte generating the pass it says could not be opened i opend the console and check out the issue it says
"Pass does not contain icon.png/icon@2x.png/icon@3x.png"
it was givi
and the console gives me "At least one icon file is missing in your bundle. Your pass won't be openable by any Apple Device."
i implemented the PKPass like that :
const pass = new PKPass({
model: './models/examplePass.pass',
icon: './models/examplePass.pass/icon.png',
icon3x: './models/examplePass.pass/icon@3x.png',
icon2x: './models/examplePass.pass/icon@2x.png',
logo: './models/examplePass.pass/logo.png'
},{
wwdr: cert.wwdr,
signerCert: cert.signCert,
signerKey: cert.signerKey,
signerKeyPassphrase: cert.password,
},{});
then the console message disaperead but it still gives me same pkpass not opened issue with the same reason
Expected behavior
Steps to reproduce
after creating the pass and its downloaded successfully it wont open
Were you able to verify it by using (and changing) the examples?
If yes, which changes did you apply?
Other details
- I'm available to open a Pull Request to resolve the problem (after the triage)
I see two issues here:
- The first one is that you forgot the
@
in the icons' filenames (the object you are passing as the first parameter); - The second is that the API Documentation states how should be the data format of the content. Files are not read when you use the "buffer-mode" (in fact, it is called like that because you are expected to give it buffers - which you are already expected to have in memory somewhere).
key | type | description |
---|---|---|
buffers | object | The initial files buffers to compose a pass. They must be in form path: Buffer. Set to empty object if none is available yet. |
If you want to use a model, you should use the "Folder model mode" (described in the main Readme).
Hope this helps!
P.s. you are completely misusing passkit-generator: model
key in that object is going to get ignored. I honestly suggest you to read the documentation again, because the available ways to use passkit-generator are very well described.
@alexandercerutti thanks for replying and your patience it resloved and im really on hurry thats why im just following the track not more thats why there is alot of missusing
thanks again it was resloved i made it like that
PKPass.from(
{
model: './models/examplePass.pass',
certificates:{
wwdr: cert.wwdr,
signerCert: cert.signCert,
signerKey: cert.signerKey,
signerKeyPassphrase: cert.password,
}
}
).then((pass)