Core NFC

RSS for tag

Detect NFC tags, read messages that contain NDEF data, and save data to writable tags using Core NFC.

Core NFC Documentation

Posts under Core NFC tag

58 Posts
Sort by:
Post not yet marked as solved
0 Replies
548 Views
We are using an NFC tag that complies with ISO14443A and B standards (ISO-DEP) and supports ISO/IEC 7816 security. We are attempting to write some data using CoreNFC's NFCNDEFReaderSessionDelegate. We can detect the tag, but when we try to connect to it, it displays NFC Error (Tag Connection Lost). We also attempted NFCTagReaderSessionDelegate, but we were unable to detect the tag at that moment. Note that we have included the Privacy - NFC Reader Usage Description and ISO7816 application IDs for NFC Tag Reader Session to info.plist. Tag Reader Session Formats for Near Field Communication in entitlements.plist Can you advise on whether the problem is caused by the tag we're using? Or the CoreNFC library does not support writing? Thank you for your valuable time and assistance
Posted
by
Post not yet marked as solved
0 Replies
617 Views
Hello! Thank you very much for your WWDC NFC sessions! I really like the format and the information you provided in those session :) I have a question regarding my app that I am planning to develop using an NFC technology. I tried to find a necessary information in WWDC sessions and documentations but I couldn't find anything that might be helpful for me. The idea is simple. I want to use my app as the proxy between user's payments cards (debit or credit) and the payment terminal. The logic is something like this: User taps an iPhone to a payment terminal (just like in the Wallet) and my app reads the data from the payment terminal through NFC (merchant name, merchant category, amount to be paid, etc.) My app receives this information, does some formatting and other operations My app sends the user's card information to the NFC (a card information is received and stored in my app through some 3rd party service, like Plaid) Payment terminal receives this information and shows either the payment succeed or failed. I am wondering is it possible to achieve this using the current API of NFC framework? While I am aware that the NFC framework supports the ISO-7816 standard, based on my research so far, it seems there is no way to achieve this functionality. Correct me if I am wrong. Thanks!
Posted
by
Post not yet marked as solved
0 Replies
505 Views
Hey, I don't know why i can not make scan function work. I have written in the entitlement file: <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.developer.nfc.readersession.formats</key> <array> <string>NDEF</string> <string>TAG</string> </array> </dict> </plist> also in the info.plist: <key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key> <array> <string>A0000002471001</string> <string>D2760000850101</string> <!-- Add more AIDs as needed --> </array> still get the error Error Domain=NFCError Code=2 "Missing required entitlement" of course when i remove the iso18092 enum everything is working. Help? thanks
Posted
by
Post not yet marked as solved
0 Replies
588 Views
IPhone 14 Pro - ios 17 Beta NFC tag reader no longer functioning as of ios15 update. I have updated to Beta 17 and still not working. Airfrop off, cellular data off and have completed several restarts. Any help with repairing is appreciated. Thank you.
Posted
by
Post not yet marked as solved
1 Replies
394 Views
my app store application have met this problem most at OS version 16.6 and other OS version when i use [NFCReaderSession featureAvailable:],and Near Field Communication capability is equiped。I have no idea why this would happen。
Posted
by
Post not yet marked as solved
0 Replies
356 Views
We have to create CCC based digital keys so we are going to use UWB, NFC technologies. So Is there any CCC based UWB,NFC api available for development? We are members of the CCC organization. Could you please support us for this I have gone through UWB NFC document from official apple website.But I want to get idea on CCC based NFC and UWBs.
Posted
by
Post not yet marked as solved
0 Replies
315 Views
I am aware of NFC and UWB api which I have already gone through the official document page. We have to create CCC based digital keys so we are going to use UWB, NFC technologies. So Is there any CCC based UWB,NFC api available for development? We are members of the CCC organization. Could you please support us for this.
Posted
by
Post not yet marked as solved
0 Replies
424 Views
we are using the STMicroelectronics/STNFCSensor tag, the tag configuration is Block Size: 4 Memory size in blocks: 2048 memory size in bytes: 8192 tag type: iso15693 Below i added my code func readSingleBlock(to tag: NFCTag, blockNumber: Int, completion: @escaping (Data) -> Void) { bfprint("NFC_Tag enter extendedReadSingleBlock blockNumber: \(blockNumber)") if case let .iso15693(tagIso15693) = tag { tagIso15693.extendedReadSingleBlock(requestFlags: [.highDataRate], blockNumber: blockNumber) { result in bfprint("NFC_Tag extendedReadSingleBlock \(result)") switch result { case .success(let data): self.retryAttempt = 0 bfprint("NFC_Tag Success tag response:", "\(data), ") completion(data) case .failure(let error): if self.retryAttempt > 5 { bfprint("NFC_Tag failure: \(error) \(error.localizedDescription) ") self.session?.invalidate(errorMessage: error.localizedDescription) } else { self.retryAttempt += 1 bfprint("NFC_Tag failure retryAttempt: \(self.retryAttempt) ") self.retryConnection() } } } } } func retryConnection() { guard let session, let tag = self.tag else { return } session.connect(to: tag) { [weak self] (error) in if let error = error { print("Retry connection error: \(error.localizedDescription)") self?.session?.invalidate(errorMessage: "Retry connection error: \(error.localizedDescription)") return } self?.readNfcTag(tag: tag) } } extendedReadSingleBlock function giving error "NFCError Code=100 “Tag connection lost”
Posted
by
Post not yet marked as solved
1 Replies
1.3k Views
Hi, I was using NFCNDEFReaderSessionDelegate at first to read and write the cards, but didDetect tags method did not detect any tag because my nfc tag is not pre-formatted, it was calling other delegate methods so I have my NFCNDEFReaderSessionDelegate setup correctly. Hence, I used NFCTagReaderSessionDelegate, didDetect tags method of NFCTagReaderSessionDelegate detected tag and the tag was not pre-formatted. The issue I have been facing is I am not able to write for the first time and getting an error Error Domain=NFCError Code=102 "Tag Not NDEF formatted" UserInfo={NSLocalizedDescription=Tag Not NDEF formatted}. When I used another app from apple store to write data on the same tag which is not pre-formatted. Using that app, I am able to write the data on that tag. That app was using CoreNFC framework I believe, as it has NFC session alert which seems it was from apple library CoreNFC, so I assume that there must be a way to write the data on unformatted nfc tags. Do I have to use any low level of commands? I am not sure how can I fix this issue. Please provide some sample code, suggestions, right path to make the tag ready to have NDEF format and able to write the data on it. Here is my NFC tag details:
Posted
by
Post not yet marked as solved
0 Replies
381 Views
I bought RFID card: NFC 13.56MHz ISO14443A but Iphone can`t read it. What types of RFID card Iphone can read. Is there any specifictaion what cards Iphone can read?
Posted
by
Post not yet marked as solved
2 Replies
1.8k Views
I am trying to transfer data from one device to another using NFC. I'm trying to figure out if this is possible, I downloaded apple's sample project about CoreNFC, I was able to read NFC Tags (it wasn't a real NFC Tag, rather it was an NFC Tag emulated with an android device). Can I use my iPhone to emulate an NFC Tag to transfer data to another iPhone or Android device?
Posted
by
Post not yet marked as solved
1 Replies
434 Views
Hello, I have ICode Slix and Slix 2 NFC tags. I'm working on an iOS app for reading and writing data to these tags. I've tried various approaches, but I'm having trouble with the writing part. Could you please assist me in understanding how to write encode URL in that tags Here's my current code Because these tag is not bydefault NDEF format and I want to right url in that tag and make it NDEF formattable. I tried to write data with NFC Tool application it can write data easily in that but my code doesn't work. how to right data in NFC forum type 5 tags? func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) { print("Connecting To Tag") if tags.count > 1 { session.alertMessage = "More Than One Tag Detected, Please try again" session.invalidate() return } let tag = tags.first! session.connect(to: tag) { error in if let error = error { session.invalidate(errorMessage: "Connection Failed: \(error.localizedDescription)") return } if case let .iso15693(sTag) = tag { let textToWrite = "hello" if let textData = textToWrite.data(using: .utf8) { sTag.writeSingleBlock(requestFlags: [.highDataRate], blockNumber: 0x05, dataBlock: textData) { error in if let error = error { print("Error writing to NFC tag: \(error.localizedDescription)") } else { print("Data successfully written to NFC tag.") } session.invalidate() } } else { print("Error encoding text to data") session.invalidate() } } } }
Posted
by
Post not yet marked as solved
0 Replies
448 Views
It's my first time posting here so I don't really know what to do. I'm fairly new to iOS development and I have project that I need to make that uses NFC (CoreNFC). As I encountered errors in my code, I realized I needed to add the NFC capability however it's not showing in the capabilities list. After a bit of research, I found someone saying I needed to have an Apple Developer account (for 99$) to unlock this feature. Is this true? If not, what can I do to add the Near Field Communication Tag Reading capability to my project?
Posted
by
Post not yet marked as solved
0 Replies
378 Views
I'm trying to implement CoreNFC in my iOS project, so I need to add the Near Field Communication Tag Reading to my capabilities, however, I can't find it anywhere. After a bit of research, someone said that they had to enroll in Apple's developer program, is that necessary to unlock this capability? If not, how can I fix it?
Posted
by
Post not yet marked as solved
0 Replies
368 Views
Did anybody encounter issues while doing an NFC tag reading, particularly on the "Pro" devices? Based on our statistics, almost half of the readings with iPhone 12 Pro failed, due to NFC tag connection issues. Please see below the failure rate: Top 3 devices: iPhone 12 Pro with 41,5% failure rate iPhone 11 Pro Max with 33,3% failure rate iPhone SE 2nd Gen with 25% failure rate If we take into consideration the deviation from expected value, see below: The following types had a higher error value than statistically expected when used significantly: iPhone 14 Pro iPhone 12 Pro iPhone 15 Pro   The following types, on the other hand, had few to no reading errors with statistically relevant use: iPhone 14  iPhone 13 iPhone 13 Pro Max The essential questions are:  What are the differences between the iPhone 14 and iPhone 14 Pro in terms of NFC reading functionality?  What are the differences between the iPhone 11 Pro and iPhone 12 Pro in terms of NFC reading functionality? See list of device codes: here.
Posted
by
Post not yet marked as solved
1 Replies
552 Views
I have an NFC door, but I always have to enter a pin, and I have thought, "Can I unlock this using an NFC on my Apple Watch, Apple AirTag, or iPhone, since they all use NFC?" It seems it would save so much time, yet I do not know if there is an app/program that I could use, much less how to program it to trigger. Please reply if you have a response.
Posted
by
Post not yet marked as solved
0 Replies
510 Views
Hello Sir/Madam, In Apple Car Keys Specification R1 - Developer Preview 3 page 24, table 2-9, is mentioned the "NFC Protocol Start " parameter with the value of 5ms. Looks like this time was defined to include all the NFC procedures regarding protocol discovery and anti-collision, until the Select AID for the CCC applet command is issued. Quote: "NFC protocol start includes all ISO 14443-3 commands required to setup the NFC communication (REQA, ATQA, AC, etc.).". This requirement seems highly unfeasible on our side. The typical time on some of our products is between 30-50ms for the NFC protocol link set up. This includes the unmodulated carrier time, the VASUP command, REQA/ATQA sequence, HLTA/WUPA/ATQA sequence, ANTICOLLISION sequence, SELECT device ID/SAK/RATS/ATS sequence, all of which impossible to fit in 5ms even if we reduce everything to back to back communication and no delays between commands. Can you further define what the "NFC Protocol Start " 5ms typical time means and how to interpret this time, for example: Can you enlist the starting point and ending point of measuring this 5ms time? Is this a strict requirement? What is the accepted time range if otherwise? (the document only mentions this is a "typical" time). Does this time also include the RF unmodulated field before the first NFC data transmission? (only this time can take up to 5ms according to ISSO-14443-3). Thanks for your support! Peter.
Posted
by