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
319 stars 117 forks source link

NFC requiresAuthentication property #131

Closed andrey-davydenko closed 2 years ago

andrey-davydenko commented 3 years ago

How can I set requiresAuthentication property for passes with NFC? Does the library support it at all?

https://developer.apple.com/documentation/walletpasses/pass/nfc

requiresAuthentication boolean

A Boolean value that indicates whether the NFC pass requires authentication. The default value is false. A value of true requires > the user to authenticate for each use of the NFC pass.

This key is valid in iOS 13.1 and later. Set sharingProhibited to true to prevent users from sharing passes with older iOS versions and bypassing the authentication requirement.

Thanks.

tomasmcguinness commented 3 years ago

Hi,

Due to the requirement from Apple to have a special entitlement for NFC, I've never added any of the NFC features to my library.

I have had several users ask for more details, but all the NFC specifications related to Passkit are under NDA.

I'd be happy to add some of the NFC flags if you're in a position to test them?

Regards, Tom

andrey-davydenko commented 3 years ago

Thanks for the quick answer.

Sorry just to avoid misunderstanding. As I can see you support now Nfc class with two properties Nfc.Message and Nfc.EncryptionPublicKey. And if I understand correctly now Apple supports a third bool property "requiresAuthentication"?

So if you add it I think I will be able to test it when we launch our project. Of course, I can add it myself just by downloading source code and use compiled dll (not from nuget). But I believe it'd be better to have it in a nuget library.

tomasmcguinness commented 2 years ago

Hi,

Did you have any success making the changes yourself? If you know what needs to be added, I'd be happy to accept a pull request.

tomasmcguinness commented 2 years ago

Closing due to age.