NFC

From iPhone Development Wiki
Jump to: navigation, search

NFC, or Near Field Communication, is a technology that was recently added to the iPhone 6 and 6 Plus in order to implement Apple Pay. The NFC chip included on these devices is the PN548 by NXP Semiconductors. It is similar to the chip used in the Galaxy Nexus[1], and possibly other Android devices.

Apple's implementation of NFC is split into a number of binaries, found only on iPhone7,1 and iPhone7,2 devices:

  • /usr/lib/PN548.dylib
  • /usr/lib/PN548_API.dylib
  • /usr/lib/PN548_HAL.dylib
  • /usr/lib/libnfshared.dylib
  • /usr/libexec/nfcd
  • /System/Library/PrivateFrameworks/NearField.framework

Passbook uses NearField.framework to communicate with nfcd, and nfcd uses the NFC library provided NXP to communicate with the PN548 device. PN548.dylb is NXP's libnfc-nxp, which is open source[2] as a part of Android. PN548_API.dylib is written on top of PN548.dylib, abstracting away the full functionality of libnfc into a CoreFoundation style API named NFDriver for the express purpose of card emulation.

References

  1. http://www.nxp.com/news/press-releases/2011/11/nxp-nfc-solution-implemented-in-galaxy-nexus-from-google.html
  2. https://android.googlesource.com/platform/external/libnfc-nxp/