Hacker News new | past | comments | ask | show | jobs | submit login
Apple joins the NFC party, providing iOS developers the ability to read NFC tags (ibm.com)
198 points by ronwen on June 6, 2017 | hide | past | favorite | 115 comments



If anyone's wondering, the API is significantly more limited than the Android NFC API (which having used it extensively over the last 2 years I can say is very pleasant).

Still, it's better than nothing and it represents a huge opportunity for NFC tag providers (where I work). We've been waiting for this for about 4 years.


I've been waiting for Apple to open up their NFC hardware too. I'm working on a closed loop payment app (https://www.loopz.io) that uses NFC and Apple's lockdown has been frustrating since the first question I get when showing the app is; does it work on iOS? This is the first step in them allowing access to the NFC chip hopefully. The chip in iPhone 6 and 7 supports writing to tags (which I need for my app) but it's not exposed through the API's at the moment. Android has allowed this since Gingerbread.


looking at the documentation, I'm not able to see if the API allows for even read/write of direct links. Is that the case?


There is no support for writing direct links as you say, but if the data is a standard NDEF URI then I believe the NFCReaderSession will return the NDEFMessage objects (code example https://stackoverflow.com/questions/44415442/nfc-tags-not-de...)


Neat, but I've yet to see a single NFC use case that gets me anywhere near as excited as this author. Amiibo is a cool concept but obviously limited. I've used some writable tags for android settings changes and such years ago, but it just doesn't seem useful to me. Anyone know a killer use case I'm missing here?


It reminds me of the ridiculous excitement over iBeacons when Apple announced their proprietary NFC-like tech a few years ago. Virtually every iOS dev I know bought some cheap iBeacons thinking "wow this is so cool" and never ended up building anything useful. I wasn't immune either, as the abandoned iBeacon in my desk drawer attests to.

There's undoubtedly great use cases for NFC on phones (payments, travel passes, hotel room keys etc), but it's also a technology that often seems to attract developers solely because it seems 'cool', not because they have a problem that can be solved better with NFC than without it.


A lot of the coolness requires a critical mass. The idea is usually being a standard, being Apple supported, or being included in Android provides that...in practice, that hasn't been true.

I look enviously at other countries that have been using feature phones for banking and p2p banking. The video of a guy in China assembling his own iPhone shows QR codes at each booth used for payment. There's no reason Smart Phones or NFC could do those things better, but we still don't have it and it won't be happening in the U.S. in near future.


Actually, interestingly, QR codes can be better for some payment scenarios than NFC. I live in China and I can go to my local corner shop, pick up a bottle from the fridge, and even if there's a queue at the register I can scan the code from a distance, pay and leave with a nod from the shop keeper.

QR codes are also used for exchanging contact information... when I give a talk in China, I put my Wechat QR code at the end so any member of the audience can scan it from the slide for follow-up conversations.


Perhaps not coincidentally then, Apple is providing native support for QR codes in the Camera app in IOS 11.


They specifically mentioned it on the slide of things that they were adding for China as well.


> I put my Wechat QR code at the end so any member of the audience can scan it from the slide

I've always been surprised by this (and even more by QR codes in magazine ads and billboards). I'd think that these days, for 90% of applications a regular URL should work. Just as your photo app thee days marks (and often labels) the faces, it could simply highlight all the URLs, email addresses etc in the image and let you click on them.

Yes, QR codes are more robust (at the cost of a small payload for a large image) but I suspect in most cases it's unnecessary.


QR Codes do work rather well actually in different contexts, they are very robust. Upside down, from across the room, weird lighting... Also, in the Chinese context, everybody knows what to do with it and what to expect to happen if they scan it.

The farmer coming into the city on a trike selling fruit even accepts payment by QR code :)


I completely agree, especially on roadside billboards. URLs have the excellent advantage of supporting 'human storage' - i can remember a URL and try it later. QR codes, not so much.


QR codes are cheaper, but NFC tags are more convenient. QR code are typically also all the same on a given label, where NFC can be programmed to have a unique id for each relatively simple.


QR codes support multiple devices at the same time, and have much larger range for reading (limited by the physical display size). Unique ID's can be built into the app reading the QR code for things like payment transactions. If I control the app reading the QR code (like WeChat), I can easily add state and add some "ping-back" behaviour to ID who/what/where the scan happened.


I think you misunderstood. I never talked about ping back or anything like it. For that, both are exactly the same. I was purely talking about how it scales when you need to identify each item individually, for instance library books. But it wasn't exactly clearly communicated, my bad.

For inventory management, it's preferable that each item has its own unique code. So either you need to print a different QR code for every item, or you put on an NFC chip.

It is true that QR codes are supported on more devices, but that is because cameras and screens are ubiquitous with smart phones. An NFC reader is cheaper.


I'm not convinced that it'd be any harder or more expensive to print a series of unique QR codes onto objects than to use NFC chips.

The heavy use of (granted, not strictly QR) 2D barcodes in physical mail/shipping suggests it's both useful and cost effective.


Indeed, but they are already printing a label for every parcel, and they used barcodes long before NFC tags was a thing. They already have hardware and tooling in place for it, so unless NFC will save them a significant amount of money it makes no sense to switch.

Think of a stockroom. When you get new inventory, you put on an NFC tag on every item, and then you have to register each which is just one sweep. With QR/barcodes you either have to register and then print and put on the items, or you have to scan each individually after.

Both NFC and QR have strengths and weaknesses. I'm certain that we will see both utilized more and more.


Beacons a) aren't Apple exclusive b) are really cool.

The trouble is that the category of features they solve can often also be solved by GPS, Network, or other similar technologies.

There are a myriad of cool things that Bluetooth Beacons can do but none of them are particularly consumer must-haves.


Might be off-topic, but anyone know what other techs provide indoor distance tacking/localization other than BLE beacons? WIFI's accuracy is too low.


There are very promising "ultrawideband" solutions (allowing distance to be determined from time of flight of a message rather than signal strength) but the use cases are limited as there is no existing infrastructure. The best that can be done on phones is "sensor fusion" from all available sensors (including wifi and BLE, also integration of motion data) but it requires very extensive mapping of the location in advance. iOS suppports this since a few releases ago but only for locations that have been mapped by Apple so the use cases are rather limited, presumably the mall/airport feature just shown used it.


I worked at a consulting company about a decade ago that designed an indoor tracking system. It could track a device to within a meter, and that was no trivial undertaking. I always have a laugh when I see some startup making a child tracker/pet tracker using iBeacon. You need a large array of radios to track the beacons, you have to model the physics of the building's construction (absorption, Rayleigh scattering, etc), account for multiple floors, and come up with a working algorithm that combines all the RSSI readings to produce a precise location.


It's not all that hard with RFID and the right antenna. It's done extensively in facilities with expensive equipment like refineries.


If you helped implement that system, I'd like to know more.


iBeacon protocol is not proprietory. BLE covers larger area that NFC does not.

I agree there aren't much real uses tho. But we might not know yet.

For example LoRaWAN networks are deployed worldwide fairly quietly.


I am using iBeacons so that my automation knows what room I am in my apartment. I plan on doing 3d positioning with them eventually.


I built an app for the world-leading led-manufacturer. They have underwater-lightbulbs and tag them with NFC for servicing and tracking. They seal the tag in with the led inside the casing.


One nice thing is bluetooth pairing.

I bought a pair of Bose QC35 headphones recently. There is an NFC tag embedded in the headphones. I just had to tap my phone to the headphones and hit an "accept" button on my phone, and they were paired.

Similarly a friend has a box plugged into their stereo that's essentially just an A2DP receiver with RCA outputs, and has NFC on it for pairing. I wanted to play some music on his stereo at a party, and all I had to do was tap my phone to the receiver and start up Spotify.


Apple sort of does something like this using BTLE on the 4th gen Apple TV as part of setup. It's kind of nice.

But the idea of having it in headphone and routers and printers and other things? I can get behind that. Easy pairing is a use case that makes a ton of sense.


Do you just tap, or do you have to launch an app first? I only ask because the bluetooth pairing process is already pretty painless (I have QC35 and an iPhone).


I have an iPhone 6S, QC35 and a MBP 13 mid-2012. The Mac won't stay paired after booting and sleeping once. Only fixed by rebooting (kext reloading, process killing, bluetooth debug menu don't work). Also, it's annoying that it won't charge and stay powered-on simultaneously. Finally, there's ground loop noise originating from the iPhone if charging the iPhone & QC35 from the same source with using the audio cable together.

ProTip: Apparently, the QC25 remote cable with buttons works on the QC35 too.


You just tap if you have an Android phone with NFC. I purposely got a Bluetooth speaker with NFC to make pairing easy. Whether my girlfriend or I use it or most of our friends of we go to the park or bring it to a BBQ, it's much easier than the usual manual process required on iPhone.


I have Galaxy S7 and Sony SBH20. It's just a tap and they're paired.


The Yubikey NEO is the only NFC device that ever got me excited. It'd be nice to be able to store all my TOTP tokens on the device instead of the phone. Also, signing/encrypting text with PGP from the yubikey.


Absolutely this. SMS 2FA has security flaws that are becoming ever more evident - U2F via NFC is a great way to authenticate on Android, and I'm looking forward to having it on iOS as well.

Edit: Welp. Looking at the U2F NFC spec it looks like some exchange with the key needs to occur, so without transmit access we're boned.


> U2F via NFC is a great way to authenticate on Android

Unfortunately as far as I know only Yubikey NEO and Fidesmo card support it with Fidesmo being practically not usable. From https://www.fidesmo.com/nfc-u2f-android/ :

> Google’s own account security website, that on desktop allows you to register U2F devices, says that the feature is not compatible with the Chrome browser on Android. The account security site on GitHub seems to support the feature is a bit better. When pressing the button to add a token to the account it properly launches Google Authenticator to register the U2F device. When tapping the card and returning to the GitHub site however it doesn’t seem to have registered that anything has happened.


Sadly there is no NFC token that supports 4096 bit RSA keys (I'm not even talking about EC keys). Fidesmo also has support for PGP/U2F over NFC.


That's okay. RSA-4096 is suitable for long term secrets, but we're talking about authentication: typically signing short challenges, or DH key shares, for immediate verification. The requirements for that application are much lighter.


How do you authenticate through NFC PGP on Android? Is that something specific to your company or is there a public app that you're using?


You can use something called Openkeychain on Android. It uses NFC Yubikeys for both PGP and SSH.

Regarding your 4096 bit requirements, normally when you have those security requirements you would keep that key offline and use shorter lived 2048 bit keys for actual authentication.

There is 4096 bit support with Yubikey 4 which unfortunately isn't offered with NFC.


> You can use something called Openkeychain on Android. It uses NFC Yubikeys for both PGP and SSH.

Okay, but open-keychain does not provide GUI to just sign or authenticate a user (you can sign as part of encryption process) so I was wondering if the parent was mentioning some application that interfaces with open Keychain (like k9mail or conversations.im) that gives just that: user authentication.


> There is 4096 bit support with Yubikey 4 which unfortunately isn't offered with NFC.

Yes, but OTG adapters work pretty well here or one can use Yubikey 4C if the phone has USB-C input.


I suspect that the general lack of exciting things involving NFC might have a little bit to do with the fact that ~half the mobile audience couldn't do anything with them. That appears to have changed, so this consequence probably will too.


I always figured that was a big part of why QR codes didn't take off in the US (irony: Apple just added support in iOS 11).

Even so, I'm kind of surprised that NFC hasn't come up with more interesting use cases than easy pairing and as a mode/location switch to mark you're at home/work.


You mean 10% of mobile users couldn't use NFC.


if you could go beyond reading NFC tags (and also allow apps to use the NFC chip fully), then you remove the need for things like physical loyalty cards (like the Starbucks card).

That's a really basic use case, but popular enough in Japan, where even old flip phones had NFC


I think the thing is that uses of NFC tags aren't and shouldn't really be expected to be individually mind blowing. It's just something that can, in aggregate, make your life more pleasant by small increments that add up.

Being able to read my balance on my clipper card with my android phone is something I miss since switching to ios. A promising thing I once used was wifi network ssid/password settings stored on an nfc tag on a wall (think restaurant).

But, really, if there's a killer app it's probably payment and it's rolling out. Pretending that it's somehow distinct from other NFC use cases is pretty silly. It's just one of the most obvious ways it can be useful.


I don't know about a "killer use case", but I use NFC on my Nexus 5X all the time with my Yubikey Neo or to check the balance on my transit pass.

I'm surprised iPhones were missing this, its not killer but its definitely useful.


The biggest use case is probably for public transport.

That's something where you are tapping on/off multiple times a day.


This already exists in Chicago at least - just using Android Pay though. I know they also have been working on an app as well, but I haven't paid attention to it once they got initial NFC payments working. I do know transfers do not work with android pay (I imagine due to rotating card numbers), but luckily I don't have to deal with that and Yet Another Silly App.

I will say it's quite great. The time is very near where you can leave your home with only your cell phone as the single item you need to remember. Also scary in that if you lose that single item, you are getting increasingly more screwed. That is now my transit pass, money, taxi ride, and front door key.


Reading NFC transit passes doesn't sound too exciting. I mean, if a phone has an NFC chip, why not use the phone (plus an app) instead of a transit pass, tapping with your phone where you're expected to tap with your pass? This is like your phone wouldn't come with a music player, but would come with a full-fledged oscillograph instead.


There is this Android app that allows you to read your transit pass to check the balance. It's pretty handy with a Clipper Card, for example.

http://codebutler.github.io/farebot/

That said Chicago seems to have the most convenient system along the lines of what you're talking about -- you can use plain old tap and pay at the terminal with Apple Pay or Android Pay.


Reading balance is not too exciting, as I said. There doesn't seem to be any Android apps to let your phone function as a transit pass.

I understand why it would be cool to let your phone replace your transit pass (as it's cool to let your phone replace your credit card), but I don't understand why it's cool to let your phone replace a transit pass reader.


Japan-model Android phones ship with an app called "Osaifu-Keitai" which you can load up with a transit pass https://en.wikipedia.org/wiki/Osaifu-Keitai


Because I often forget how much I have on my card, and tapping my card is easier than logging into the web portal.


Because I own a phone and not a transit pass reader?


That was what the original poster was saying: Using the phone as the pass instead, not reading the pass itself


where I live you can also recharge the cards using the phone, which while not as useful as using the phone, it's more than a simple reader.


Replace transit passes and employee/residence/parking garage badges.

Interesting story: I was in London and had an Oyster card but forgot I had the Clipper card for the SF Bay Area too. On seemingly reading the Clipper card, the Tube gate turned orange and basically shutdown.


Thanks for the reply. That does sound interesting and would certainly save a lot of disposable cards/tickets. Here's hoping more interesting uses come about with this increase in user base!


It's simpler to have the public transport accept contactless cards (and therefore Apple/Android pay) - see London


Most modern cameras have, for the last couple years, used NFC to quickly and easily transmit photos from the camera to the phone. From what I understand, on Android this works pretty effectively.

On iOS, however, weak NFC implementation means that one must use a kind of janky WiFi transfer system. It works, but it's kind of difficult to use and not very elegant.


Are you sure it's transmitting over NFC? I thought NFC is quite a limited bandwidth connection. Maybe it's creating the initial connection over NFC and doing the actual transfer over wifi?


Android has a protocol called Android Beam where NFC is used to negotiate transfer which is then moved to either Bluetooth or WiFi Direct. That's probably what cameras are using.

Between phones you tap them together while a picture / video is open (which is admittedly less elegant than AirDrop... although significantly more reliable in my experience).


Good point; you're probably right and I'm probably wrong, since I'm recalling seeing videos that demonstrate how NFC works w/ cameras on Android versus iOS. I do have an iPhone, so to get pictures from a camera I have to (usually) manually select the camera network, then go to the app, then start downloading.

The clunky software camera companies ship doesn't help, of course. If I were in charge of a camera company I'd publish an API and SDK and welcome the world's many hackers to make the camera better, but alas I'm not and no one asks my opinion.


NFC is used to transmit the login credentials, which is fairly nifty actually.


In Australia most over the counter payments are done with NFC cards. Some banks allow this to be done with a wave of your phone so you don't need to carry credit cards at all.


I just switched to this a week ago and loving it. I can go for walks and carry nothing but my phone, and still grab a coffee etc. My last week of spending has been done entirely via NFC payments.


Don't forget, it's not just about consumer applications. Anywhere you might use a QR code or traditional barcode, but you don't want to have to worry about the barcode becoming obscured or worn with use. I know we've thought about using them to track vehicles and some kinds of parts in the automotive retail company I work for, and there's probably plenty of other industrial applications for them.


I have an NFC tag on my keychain. When I'm out and want to remember my location--where exactly we parked, where I saw a neat building--I use Tasker to write my GPS location to my keychain.

I could just as easily save a note with my location, I guess, but I like that the NFC tag stores the data without power, without putting it on someone else's computer, and without making it casually discoverable.


I worked on some prototypes years ago on android that handled a payment from a contactless bank card on your phone.

So in the payments space:

- phone as a payment terminal

- peer to peer payments

I'm sure there's more than that but they're the low hanging fruit


Unfortunately it's read only so that stuff won't be coming to iOS.


I don't believe you need to write to the card in order to do payments. You send byte streams and it generates OTPs.


I was thinking of cases where you may need to update the balance on the card.

You're right, if you only used it as authorization I guess you wouldn't need write access.


I have yet to meet someone else that does this, but I use nfc tags to shut off my alarm in the mornings. It forces me to get out of bed to shut off my alarm.

Not very exciting but indispensable to me.


Reading your blood sugar levels - https://www.freestylelibre.co.uk/libre/


The only thing I use it for is checking the balance on my suica card (train pass) on Android, but iOS already has a suica app.


We were working on a travel card TOP up problem using mobile phone and it required NFC parity on iOS and android.


iPhone support for a NFC 2FA key would be powerful.


At first I was excited, but then I read the docs:

> Read only

> Only supports NDEF formatted tags

> Available only on iPhone 7 and newer

Basically, this is even more crippled than what WP 8.0 did five years ago (and back then I thought it was too crippled to be useful)


I wonder if there is any technical reason for requiring iPhone 7. I thought iPhone 6 and iPhone 6s also had some kind of NFC hardware present to support Apple Pay.


IIRC, because the payment terminals have their own power source, previous iPhone generations lacked the induction coils necessary to support passive NFC tags. Presumably they were added to the iPhone 7?


Yeah, makes sense


It could also be some kind of security thing where the 7 was designed to be able to have 3rd party access where the 6/6s would have required the secure enclave to do something risky.

Pure guess.


Well, the Secure Enclave is in every device with a TouchID, so that's the iPhone 5S and newer.


Right but I mean that perhaps in the iPhone 7 they somehow rejiggered the SE interface in anticipation of doing this. That way the 7 hardware has a very secure way to do this where as since it wasn't planned in the older phones it might not be secure if they tried to provide access from user software. Maybe the NFC reader is attached to a different chip in the 7 that makes this easier/secure than in the older phones.


This is potentially huge news - given that Apple just fought (and won) an antitrust/anti competition lawsuit in Australia in respect of not allowing Australian banks to use this NFC API!

http://registers.accc.gov.au/content/index.phtml/itemId/1197...

Edit: pulled the trigger on this comment too soon - it appears that the API will only support "reader mode" which is not what the main subject of the litigation was about - the banks wanted a 'total' (for want of a better word) public access API.


Wonderful. Now, how many more years before they get write access? The "C" is for "communication".


technically communication can be one way.


Started looking at the author's patents out of curiosity.

http://appft1.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=...

A computer receives user preferences. The computer receives a document, wherein the document includes an image. The computer determines that the image contains embedded text. The computer determines that the embedded text does not satisfy the received user preferences. The computer modifies the embedded text to satisfy user preferences.

Is this stuff actually enforceable? As in, could I, with adequate legal sources, actually get companies and individuals to pay me money for something as generic as "Text resizing within an embedded image", without actually implementing it (whether it be stand-alone code or within some sort of application)? Is Apple shelling out cash to IBM for the privilege of autoresizing labels?


I like this one: http://appft1.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=...

"[...] approaches for preventing an accidental termination of a phone call session.". The patent actually covers the event of when a user:

1) is in a call

2) taps dismiss

3) phone decide to dismiss or continue because [wildcard] reason.

So the functionality in my Samsung that "decide" whether to ignore or continue when I tap dismiss with my chin is patented, cool.


Welcome to Marshall, Texas!


Ugh. Is the author basically a professional patent troll?


Sorry about that. I wouldn't want anyone to think that. It was just my idea of a joke.


I can't tell from the docs.. Does it actually allow your app to wake up in response to scanning tags? Or does it merely allow your active app to fire up the NFC reader?



Oh nice. Need to test if it will support NFC-based Yubikeys.


Is this comparable to NFC support on Android or is it a more limited subset? Can it do equivalent ISO 14443?


Looks like its only read support.


This opens up quite a few interesting ideas in the real world gaming arena. I know it's been possible with Android, but cross platform real world treasure hunt games are something I've thought a lot about, and this could make it easier than having to do GPS bounding or use BLE.


users in the year 2011 will be so happy


Is there some kind of example app I can sideload onto my iPhone which will just detect and scan any/all NFC tags and display the data to me?


We had an instance where we needed to read NFC tags and had to use a third party sled. This would have helped a ton.


What took so long?


Some core group obviously cared enough Apple decided it was in their interest. I'd be interested in knowing who it was.

Option 2: they plan to start using it themselves in future products for pairing instead/with BTLE or maybe for some sort of in-store display.


Standards, plus thinking Low-Power BlueTooth might supplant it.


I'd almost completely forgotten Apple tried to push their iBeacon standard, arguably in competition to NFC in many ways. If I'm honest, my expectations for NFC lighting the world on fire with iOS support have been severely tempered by the huge number of articles/businesses/startups that proclaimed iBeacons where the next big thing. I've still never encountered them in the wild outside of Apple stores or friends who bought iBeacon hardware for hacking personal projects.

https://en.m.wikipedia.org/wiki/IBeacon


And probably paranoia that it would interfere with Apple Pay


Apple Pay uses NFC - how would it interfere?


I suspect spilk is referring to concerns Apple will probably have had internally about rival payment platforms using the iPhone NFC hardware to process payments instead of Apple Pay. I'd be extremely surprised if debates about this didn't come up when they were deciding how to build the public API for the feature, and is probably a huge factor in the API being read only and not supporting card emulation, for now.


This is awesome! But why am I hearing about it from IBM instead of Apple?


It did come up yesterday: https://news.ycombinator.com/item?id=14491686. One downside of the annual announcement-day extravaganzas the big tech cos all do is that there is only enough space on HN's front page for the 3 or 4 biggest announcements, at most. Even then a lot of users get irritated by how much Apple/Microsoft/Google/whatever is appearing on conference day.


Too much stuff to show yesterday I guess.


That's not the NFC party most people are attending. For me the most common use of NFC is to automatically pair/turn on my headphones and my portable speaker.


These guys have done some initial research on what exactly this entails:

https://gototags.com/blog/apple-ios-11-supports-reading-nfc-...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: