Reputation: 310
I want to write set of NSDictionary
data into NFC tag and get when they tap NFC Stickers.
How to write NFC tag data from my iOS app? After searching Google I can't find any reference to write data from my iOS app to NFC tag. Samples given by Google is only for reading NFC tag by iOS11 app. But some of the app in iTunes have option to both read and write NFC tag data. How they did it?
Thanks in advance!
Upvotes: 8
Views: 17232
Reputation: 6579
It is now possible to use the CoreNFC framework to write to NFC protocol specific tags such as ISO 7816, ISO 15693, FeliCa™, and MIFARE® tags.
See Apple's example: https://developer.apple.com/documentation/corenfc/creating_nfc_tags_from_your_iphone
You cannot write to an NFC tag from iOS, only read. In the Core NFC documentation from Apple it's stated you can only read NFC NDEF tags, and only on iPhone 7 and 7 plus devices (assuming 8 and X are also supported)
https://developer.apple.com/documentation/corenfc
On iOS 12 and older, NFC apps from the App Store require you to use an external Bluetooth NFC device.
Upvotes: 12
Reputation: 352
It happens now! Writing NFC tags on iOS https://developer.apple.com/documentation/corenfc/creating_nfc_tags_from_your_iphone
Upvotes: 1
Reputation: 9897
Apple just announced at WWDC that they are adding NFC witing of NDEF formatted data.
Upvotes: 14
Reputation: 661
Other options to consider are of course using other devices, such as an external PC/SC Reader connected to a Mac/PC or an Android Phone to write the tags.
Upvotes: 0
Reputation: 1234
Currently (Nov. 3rd 2017) it looks like as though Apple only supports reading NFC tags. This based on the following:
However -I think it should be doable via e.g. PhoneGap, which basically is a development framework that allows you to build apps for iOS, Android etc. by using HTML5 and Javascript. Thus you have some limitations.
There is a PhoneGap-NFC Library, which seems to support reading and writing even on iOS 11.
Take a look at the book "Beginning NFC" for further instructions on building an NFC app with PhoneGap.
Hope this points in the right direction.
EDIT: sorry, the PhoneGap approach also does not support writing NFC tags on iOS - see here. There seems to be no way around it, for now, Apple natively, does not support it.
Upvotes: 1