tomasmcguinness / dotnet-passbook

A .Net Library for generating Apple Passbook (Wallet) files for iOS. Please get involved by creating pull requests and opening issues!
MIT License
316 stars 116 forks source link

Pass Expiration Date #186

Closed Rigo09 closed 11 months ago

Rigo09 commented 11 months ago

Hi @tomasmcguinness I am having problems with the expiration date of the pass, it is expiring in 24 hours. I have tried not sending an expiration date to the "ExpirationDate" property and it always expires. I have tried doing it in the following way and it still expires after 24 hours:

`DateTime currentDate = DateTime.UtcNow; DateTime expDate = currentDate.AddYears(3);

var pass = new PassGeneratorRequest { PassTypeIdentifier = "my.pass.Identifier", SerialNumber = Guid.NewGuid().ToString("N"), TeamIdentifier = "myTeamIdentifier ", OrganizationName = "Membresía Club Hondureño Árabe", LabelColor = "#f0faf9", RelevantDate = DateTime.UtcNow, AppleWWDRCACertificate = appleWWDRCA, PassbookCertificate = certificate, Style = PassStyle.Generic, ExpirationDate = expDate // Fecha de expiracion }; ` Could you please help me by explaining the correct way to do this?

tomasmcguinness commented 11 months ago

Hi,

I found this issue on StackOverflow which might explain your problem:

https://stackoverflow.com/questions/74808387/apple-wallet-store-card-expired-before-expiry-date

Try removing the RelevantDate.

Rigo09 commented 11 months ago

Thank you very much @tomasmcguinness delete the property "RelevantDate" solved the problem

tomasmcguinness commented 11 months ago

Super!