Closed theobouwman closed 1 year ago
I see you have converted the WWDC certificate to PEM format. The code only supports reading the certificate in CER format, which is the one the it's originally in.
Could you try again using the certificate without converting it?
@alvinbaena yes it fixed the issue thanks!
But the generated .pkpass is invalid:
c := passkit.NewBoardingPass(passkit.TransitTypeAir)
field := passkit.Field{
Key: "name",
Label: "Name",
Value: passInfo.name,
}
c.AddHeaderField(field)
c.AddPrimaryFields(field)
c.AddSecondaryFields(field)
c.AddAuxiliaryFields(field)
c.AddBackFields(field)
pass := passkit.Pass{
FormatVersion: 1,
TeamIdentifier: "xxxxxx",
PassTypeIdentifier: "xxxxxx",
OrganizationName: "xxxxxx",
SerialNumber: "1234",
Description: "Card",
BoardingPass: c,
Barcodes: []passkit.Barcode{
{
Format: passkit.BarcodeFormatQR,
Message: "https://example.com/1234",
MessageEncoding: "utf-8",
},
},
}
I will close this issue, and continue on the other one you have opened (#11) .
With an exported WWDR certificate (https://www.apple.com/certificateauthority/AppleWWDRCAG4.cer):