Reputation: 151
I am following Apple's pdf to create pkpass manually, I have created a folder put icon.png, [email protected], logo.png etc. I put pass.json file and also manifest.json. I double check that SHA1 is right for each file. I signed it as per doc. but it gives me "The pass cannot be read because it isn't valid." When I try to present via view controller. here it is
PKPass *pass = [[PKPass alloc] initWithData:[NSData dataWithContentsOfFile:passPath] error:&err];
PKAddPassesViewController *vc = [[PKAddPassesViewController alloc] initWithPass:pass];
[self presentViewController:vc animated:YES completion:nil];**
Upvotes: 1
Views: 2827
Reputation: 151
Ok Seems I got the resolution, not sure why it is not working even if it is from Apple doc. the problem line is
zip -r example.pass path/to/pass_package/* -x '*.DS_Store'
What I did instead, is following
cd pass_package
zip -r ../example.pass .
And it worked, now example.pass works well.
Upvotes: 1