NFC Tag Writer sample or tutorial for ios?
Asked Answered
C

5

8

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!

Cyme answered 3/11, 2017 at 11:7 Comment(6)
You cannot write to an NFC tag from iOS, only readAzine
Core NFC allows you to read NDEF data from an nfc tag. There is no support for writing NFC tag data using the hardware in the phone in iOS.Montane
The new iOS 13 Beta changed a lot, you're now able to directly read and write tagsThyrsus
@wiomoc, any idea how to transfer photo/file iphone to iphone which support nfc read/write ? And what about NFC image/file sharing iPhone to Android or vice-versa ?Uncouple
Note: i want to write(if writing is require to send file) on external iphone chip/tag , not in external chip/NFC tag.Uncouple
@JamshedAlam NFC can be for the transfer initialization but not for the file transfer as the transfer speed is too low. Maybe upload the file to a server an then share the url over nfc.Thyrsus
A
12

Using iOS 13 (2019) and Newer

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

Using iOS 12 (2018) and Older:

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.

Azine answered 3/11, 2017 at 11:22 Comment(4)
Is there any external bluetooth NFC writer for iOS?Cyme
I don’t have any experience with it, but have a look at serialio.com/product/rfid-nfc-hardware/…Azine
This answer is out of date, as NFC tags can now be written. It would be nice if the answer were updated, or if OP accepted an up-to-date answer instead.Diaspora
@coneslayer, any idea how to transfer photo/file iphone to iphone which support nfc read/write ? And what about NFC image/file sharing iPhone to Android or vice-versa ? I meant, i want to communicate with other phone(contains NFC) only, no external NFC tag/reader.Uncouple
M
14

Update 2019 - NDEF Write available in iOS 13

Apple just announced at WWDC that they are adding NFC witing of NDEF formatted data.

Munificent answered 4/6, 2019 at 7:38 Comment(0)
A
12

Using iOS 13 (2019) and Newer

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

Using iOS 12 (2018) and Older:

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.

Azine answered 3/11, 2017 at 11:22 Comment(4)
Is there any external bluetooth NFC writer for iOS?Cyme
I don’t have any experience with it, but have a look at serialio.com/product/rfid-nfc-hardware/…Azine
This answer is out of date, as NFC tags can now be written. It would be nice if the answer were updated, or if OP accepted an up-to-date answer instead.Diaspora
@coneslayer, any idea how to transfer photo/file iphone to iphone which support nfc read/write ? And what about NFC image/file sharing iPhone to Android or vice-versa ? I meant, i want to communicate with other phone(contains NFC) only, no external NFC tag/reader.Uncouple
R
1

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.

Rebane answered 3/11, 2017 at 11:27 Comment(2)
yes. I saw that too.. Thanks .. How android can do but iOS doesn't ?Cyme
I don't really know, but concerning ios i guess it is simply a matter of apple allowing it or not. It seems that jailbroken systems do offer write functionality idownloadblog.com/2017/06/30/nfcwriter - note however i haven't tried tinkering with this...Rebane
L
1

It happens now! Writing NFC tags on iOS https://developer.apple.com/documentation/corenfc/creating_nfc_tags_from_your_iphone

Laceylach answered 19/6, 2019 at 8:17 Comment(1)
And you can do that? Because i have some error - #56806911Panfish
E
0

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.

Episodic answered 8/11, 2017 at 8:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.