Titanium JIRA Archive
Appcelerator Modules (MOD)

[MOD-2474] ti.nfc not reading tags correctly on iOS

GitHub Issuen/a
TypeBug
PriorityCritical
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labels2020-Q3, ios, ti.nfc, titanium
ReporterYahya Uddin
AssigneeUnknown
Created2018-08-27T03:23:56.000+0000
Updated2021-01-07T10:00:04.000+0000

Description

I am trying to scan a simple NFC tag that contains some text on it, using the module on a iPhone 7 Plus. I verified the tag works by scanning it with many other NFC tag readers available on the App Store. My code looks similar to the example provided: https://github.com/appcelerator-modules/ti.nfc/blob/master/ios/example/app.js
var nfc = require('ti.nfc');
var nfcAdapter = nfc.createNfcAdapter({
  onNdefDiscovered: handleDiscovery
});

function handleDiscovery(e) {
  Ti.API.info(JSON.stringify(e));
  alert(JSON.stringify(e));
}

$.win.addEventListener('open', function() {
  if (!nfcAdapter.isEnabled()) {
    alert('This device does not support NFC capabilities!');
  } else {
  	nfcAdapter.begin();
  }
});

$.win.open();
The scan native dialog appears fine, and the tag does get scanned. However the data returned back is just: [messages:[null]}; Please help!

Comments

  1. Yahya Uddin 2018-08-29

    Is this issue being looked into. It's quite a critical bug, which would also affect any one else implementing NFC in their app on iOS. A quick fix would be much appreciated as we want to release our next version for the app as soon as we can. Many Thanks!
  2. Sharif AbuDarda 2018-08-29

    Hello [~yahya12], Is this issue is only on iPhone 7 plus device? or this is also happening for other devices?
  3. Yahya Uddin 2018-08-29

    The only NFC enabled iPhone I have is a iPhone 7 plus, but I doubt this is a phone issue as other apps scans the NFC tag fine.

JSON Source