-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkpasses support #19
Comments
my .pkpass is generating but here are 2 problem
PassGenerator generator = new PassGenerator();
PassGeneratorRequest request = new PassGeneratorRequest();
request.PassTypeIdentifier = "xxxxxxxxxxxxxxxxxxxx";
request.TeamIdentifier = "xxxxxxxxxxx";
request.SerialNumber = Guid.NewGuid().ToString("N"); ;
request.Description = "test desc";
request.OrganizationName = "test org";
request.LogoText = "logo text";
request.BackgroundColor = "#19342f";
request.LabelColor = "#19342f";
request.ForegroundColor = "#FFFFFF";
request.AppleWWDRCACertificate = new X509Certificate2(Server.MapPath("~/Certificate/fffff.cer"));
request.PassbookCertificate = new X509Certificate2(Server.MapPath("~/Certificate/fffff.pfx"), "ffffff");
request.Images.Add(PassbookImage.Icon, System.IO.File.ReadAllBytes(Server.MapPath("~/Icons/icon.png")));
request.Images.Add(PassbookImage.Icon2X, System.IO.File.ReadAllBytes(Server.MapPath("~/Icons/[email protected]")));
request.Images.Add(PassbookImage.Icon3X, System.IO.File.ReadAllBytes(Server.MapPath("~/Icons/[email protected]")));
request.Images.Add(PassbookImage.Logo, System.IO.File.ReadAllBytes(Server.MapPath("~/Icons/logo.png")));
request.Images.Add(PassbookImage.Logo2X, System.IO.File.ReadAllBytes(Server.MapPath("~/Icons/[email protected]")));
request.Images.Add(PassbookImage.Logo3X, System.IO.File.ReadAllBytes(Server.MapPath("~/Icons/[email protected]")));
request.Style = PassStyle.Generic;
request.AddPrimaryField(new StandardField("org name", "1991 Mountain Boulevard Oakland, Ca", "Walmart Pharmacy","TestAttr",DataDetectorTypes.PKDataDetectorTypeAddress));
request.AddSecondaryField(new StandardField("rfv", "ft", "234"));
request.AddSecondaryField(new StandardField("rfc", "fg", "rdd"));
request.AddSecondaryField(new StandardField("rfx", "fb", "wer54"));
request.LogoText = "Prescription Discount card";
byte[] generatedPass = generator.Generate(request);
return File(generatedPass, "application/vnd.apple.pkpass", request.SerialNumber+".pkpass");
``` |
Hi, If the pass won't open, it's most likely failing validation. Ensure your pass type identifier and team identifier match. Also ensure your certificates are valid. As for the column/row issue, I don't think it's possible. Tom |
@tomasmcguinness Please help me where & what is the issue so that I can go ahead. |
The text was updated successfully, but these errors were encountered: