1
votes

I am using .NET code to setup an ASP.NET Module for creation of Passes for iPhone Apps. I am able to generate the pass successfully, but when I tap on the Add button, the pass does not get added in the Passbook App, in fact it just vanishes.

I logged the Device console & found the error "Invalid data error reading card /. Manifest signature did not verify successfully"

I have all the certificates in place(with private key imported properly.)

Would appreciate any help...!!!

2
This happens when the Pass is invalidated by Passbook. - Sumanth
Use this github.com/Redth/PassKitSharp repo for sharp/.Net pkpass creation - Sumanth
I tried using .Net 4.0 for this, Am able to generate the pass, but adding it to Passbook is the only issue.. Where can the signing go wrong? I have my certificates stored in Windows Certificate Store - Yash Soni
private byte[] signit(string manifest) { byte[] manifestbytes = ASCIIEncoding.ASCII.GetBytes(manifest); ContentInfo contentinfo = new ContentInfo(manifestbytes); SignedCms signedcms = new SignedCms(contentinfo, true); X509Certificate2 objCertificate = getServerCert("pass.test.bms"); CmsSigner oursigner = new CmsSigner(objCertificate); signedcms.ComputeSignature(oursigner); return signedcms.Encode(); //return manifestbytes; } this is the code i m using - Yash Soni
@Sumanth this is not true - Passbook does not 'invalidate' passes. The pass signature gets checked after the user elects to add the pass to Passbook. If the signature fails validation either because the certificate is invalid, the signature does not match the manifest or the signature does not contain the WWDR certificate then the pass is not added to Passbook (and simply vanishes). - PassKit

2 Answers

0
votes

Try with the Apple passbook materials in developer site. use the signpass to sign the code I think this will resolve the issue

0
votes

A potential cause of this error is not including the Apple WWDR certificate in the signature. The requirement to include this in the signature was not introduced until iOS6 Beta 3 (and not enforced until Beta 4). Documentation here.

The .NET library you are using is over 3 months old so it may not be including this certificate within the signature.

You can download the WWDR certificate from Apple here.

It may also help if you can post a link to the .pkpass bundle that is not loading.