4

I am trying to use the new NFCVASReaderSession API on iOS 13 beta using an iPhone XR.

NFCVASReaderSession.readingAvailable is returning false, but when I call session.begin() it launches the scan UI.

A couple of questions: Is there additional entitlements needed for this to work?? Or should these work?.

I have NFC enabled Apple Wallet VAS passes and have configured the NFCVASReaderSession to target the correct passTypeIdentifier but to no avail. Is this supposed to work with NFC enabled Apple Wallet passes or does anybody have any theories about what it is for?

let config = NFCVASCommandConfiguration(vasMode: .normal, passTypeIdentifier: passTypeIdentifier, url: nil)
session = NFCVASReaderSession(vasCommandConfigurations: [config], delegate: self, queue: nil)
session?.alertMessage = "Hold your iPhone near the VAS pass."
session?.begin()
Scott Condron
  • 1,195
  • 9
  • 17
  • I also get false for `readingAvailable` on an iPhone XS, but I haven't been able to get the scan UI to come up. – Dan Jul 06 '19 at 13:47
  • My current theory is it’s only for VAS enabled stickers for Apple Pay. Not sure it’s supposed to used with nfc enabled Apple wallet passes. – Scott Condron Jul 06 '19 at 19:47
  • Any further thoughts or experience on this Scott, now that a year has passed? Does your theory hold? It would sure be nice to have a way to behave like a VAS terminal from an iOS app... – Del Brown Oct 15 '20 at 15:55
  • Hi @DelBrown, the last I remember I was able to read _encrypted_ VAS data using an iPhone with raw `iso7816` commands but I don't think I ever got it working with NFCVASReaderSession to return `decrypted` payloads. Worth trying yourself because I was using an early beta of iOS 13 so it could have changed. You could use a service like PassNinja to decrypt it after reading if that fails. I left this project pretty half-baked because I moved onto other things :) Good luck – Scott Condron Oct 15 '20 at 16:34
  • Thanks @ScottCondron. I actually talked to someone later this morning who has built demos using this. He says it is used for adding passes to the Apple Wallet, after the iPhone user scans a VAS enabled sticker/tag. So your theory holds! – Del Brown Oct 15 '20 at 17:09
  • @ScottCondron were you able to get the NFCVASResponse back? I am seeing the scan UI as well, but I wasn't able to get the response when tapping the nfc pass. – ordinaryman09 Nov 06 '20 at 17:14
  • Did you end up using NFCTagReaderSession or NFCVASReaderSession ? – ordinaryman09 Nov 06 '20 at 19:07
  • NFCTagReaderSession using .iso7816 config and updating the info.plist with the correct AID from the tag. As I said, I would try again with NFCVasReaderSession too because I left the project early during ios 13 beta. – Scott Condron Nov 09 '20 at 11:26
  • @ScottCondron got it, I tried with NFCVasReaderSession, but its not detecting it. How are you getting the correct AID? – ordinaryman09 Nov 09 '20 at 14:58
  • Good question. It's the AID for wallet passes. IIRC it's also the same for Google Pay passes. 4F53452E5641532E3031 (OSE.VAS.01 ascii to hex) – Scott Condron Nov 09 '20 at 16:34
  • @ScottCondron thank you! I can see it's picking up the tag now, but how do you see the encrypted payload? do you send apdu command? – ordinaryman09 Nov 11 '20 at 21:04
  • sorry I don't have access to the work I did as I've moved on from Flomio & PassNinja, as far as I remember you need to send an APDU command but I _think_ the specific APDU is under NDA from Apple – Scott Condron Nov 13 '20 at 11:10
  • got it. was it specific per application or the same for all? – ordinaryman09 Nov 13 '20 at 18:25
  • I think it was specific to the identifier used to sign the pass but I don’t remember, sorry – Scott Condron Nov 14 '20 at 19:06

0 Answers0