chariotsolutions / phonegap-nfc

PhoneGap NFC Plugin
MIT License
712 stars 568 forks source link

iPhone >=7 && iOS >=11 #354

Closed professor-rage closed 5 years ago

professor-rage commented 5 years ago

I'm using Ionic 3.x with the native plugin which installs v0.7.3. nfc.enabled(onSuccess, onFailure); when deploying on a physical iPhone 7 via USB/Xcode always returns "null" in success callback. Any ideas? NFC permissions are enabled, and build succeeds without any NFC errors/warnings.

Also, when reading an NFC tag, should beginSession be called before or after nfc.addNdefListener(callback, [onSuccess], [onFailure]);

TIA

professor-rage commented 5 years ago

To help others who run into this:

  1. if enabled returns null, as long as in success callback, treat as valid.
  2. beginSession should be used solely (without addNdefListener)