Core NFC

RSS for tag

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

Posts under Core NFC tag

80 Posts

Post

Replies

Boosts

Views

Activity

whitelisting of the NFC Tag Reading and Writing (NDEF) entitlement
We have been struggling to get support and answeres regarding this roadblock : Request in whitelisting of the NFC Tag Reading and Writing (NDEF) entitlement for our iOS application Our application utilizes Core NFC to enable reading and writing of NFC tags, simplifying user interactions with NFC-enabled devices and services. The NDEF entitlement is essential for our app to deliver its core functionality effectively. Build Environment: Our app is developed and built using Xcode 16.4 on Codemagic’s cloud-based CI/CD platform, which utilizes a compatible macOS version (e.g., macOS Sonoma 14.4 or later). The app targets iOS 18 and uses Core NFC APIs for NDEF tag reading and writing. so far we cant get it to read or write as ios is restricking us
1
0
112
Jul ’25
NFC Error
During EEPROM reading or writing on some appliance devices, the app encounters an error after 6 steps. This issue occurs only on iPhone 14 Pro Max, 15 Pro Max, and 16 Pro models, while all other iPhone models function correctly. Any one with this problem?
1
0
84
Jul ’25
Root issue is missing entitlement in NFC App
The root issues is a missing entitlement error. I've jumped through countless hoops of checking/rechecking .entitlement file/plist file, creating new credentials, creating new projects, creating new provisioning profiles with no luck, manual signing, automatic signing. Any suggestions appreciated. Looking at the Provisioning Profile Info shows NFC Tag capabilities is included and NFC Entitlements are included. I'm at a loss... I am including the following: Pertinent output from console Current Info.Plist Current .entitlement file Here are the pertinent sectsis the Console Log for reference: ... NFCConnectionManager[0x074d6e40].tagReaderSessionDidBecomeActive(:): NFCTagReaderSessionDelegate: Session did become active NFCConnectionManager[0x074d6e40].tagReaderSession(:didDetect:): NFCTagReaderSessionDelegate: Session didDetectTags – 1 tags NFCConnectionManager[0x074d6e40].connected(session:tag:): Manager.connected(session:tag:) - tag: 7 bytes NFCConnection.Type.connection(): NFCConnection.connection() – connection established DEBUG: Successfully established YubiKit NFCConnection. DEBUG: UI updated: 'YubiKey connected... Performing challenge-response...' DEBUG: Sending APDU to select OATH applet: 00a4040008a000000527210101 NFCConnection[0x04575e00].send(data:): NFCConnection.send(data:) – 13 bytes NFCConnectionManager[0x074d6e40].transmit(request:for:): Manager.transmit – 13 bytes to tag ISO7816Identifier(data: 7 bytes) Here is the dreaded error: -[NFCTagReaderSession transceive:tagUpdate:error:]:897 Error Domain=NFCError Code=2 "Missing required entitlement" UserInfo={NSLocalizedDescription=Missing required entitlement} ERROR: Operation failed: Missing required entitlement DEBUG: Unexpected error: Missing required entitlement Here is the info.plist Here is the entitlements file:
3
0
208
Jul ’25
Is "NFC & SE Platform" required for raw ISO7816 APDU send via NFC?
I stumbled across the "Apple NFC & SE Platform" while searching for the cause to a persistent missing entitlement error. I am curious if not having this entitlement could be the root cause to my issues? Specifically, I am trying to perform an HMAC-SHA1 challenge-response via NFC on a YubiKey. Part of this entails low level APDU Send commands via NFC. The missing entitlement occurs right after the APDU Send. Per my separate post, I believe I have exhausted all other possible causes to no avail. For reference and details, this is the other post: [https://developer.apple.com/forums/thread/791995)
2
0
193
Jul ’25
Unable to Invoke NFC In IOS App
I am trying to launch Nfc session but its failing with the below error ** CoreNFC CRASHING_DUE_TO_PRIVACY_VIOLATION NSLocalizedFailureReason = This app cannot be installed because its integrity could not be verified. Failed to verify code signature ... (A valid provisioning profile for this executable was not found.)** But We have declared NFC in capabilities both in code base and provisioning profile. Tools Used VS Code , MAUI IOS Development Please let me know how to resolve this issue
2
0
111
Jun ’25
Enable NFC Access for Argentina’s SUBE Transit App on iPhone
Hello Apple Developer Community and Apple Team, I want to raise awareness and gather support for an important feature request regarding NFC support on iPhone devices in Argentina. Millions of Argentinians use the official public transit card, SUBE, daily to pay for buses, subways, and trains. On Android devices, the SUBE app allows users to: • Check balance via NFC • Reload credit instantly • Confirm top-ups by holding the card near the phone • Use a digital version of the card (in some cases) However, iPhone users cannot use these NFC features because iOS currently does not allow third-party apps like SUBE to access the NFC chip fully. This limitation negatively impacts iPhone users, many of whom rely heavily on SUBE. I have submitted detailed feedback to Apple requesting the enablement of controlled NFC access for third-party transit apps in Argentina, starting with SUBE. I encourage fellow developers, users, and community members to support this request. Enabling this would greatly improve the user experience for millions of iPhone users, align Apple with local needs, and potentially attract new customers from Android. If anyone has insights or updates on this topic, please share. Thank you.
1
0
166
Jun ’25
NFC scanning session not detecting tags
Some background: We are developing an app that needs to scan NFC tags We are following this documentation for our app We (assume) we've gotten all the correct entitlements for our app Our app correctly shows the NFC scanning prompt We are using up-to-date iPhones to test We tested scanning using a different NFC app on the app store and were able to successfully scan the tag We're using NFC NDEF tags to test The problem: Nothing is being detected in the scan Nothing in the example application when we downloaded it down and loaded it onto a test device (reminder that the app from the app store was able to read our tag) When connected to the debugger, our delegate function is not firing (tested with breakpoints and print statements). The following is the signature of our delegate function: func readerSession(_ session: NFCNDEFReaderSession, didDetectNDEFs messages: [NFCNDEFMessage]) Is there something that we're missing to get the NFC scanning to work? Perhaps some kind of entitlement? If anyone has any ideas or paths to follow that'd be greatly appreciated. Thanks!
2
0
92
Jun ’25
customCommand() fails with "Tag connection lost" on ISO15693 tag with ICRef = 0x01
Hi everyone, I'm working on a library application that uses ISO15693 NFC tags embedded in books to track checkout status. These tags are password-protected and require secure access in order to write the AFI (Application Family Identifier) field, which we use to mark books as checked out. According to the tag spec (ST SL2S2602), the flow for writing to a protected AFI requires: Sending Get Random Number (custom command 0xB2) Sending Present Password (custom command 0xB3) Writing AFI using Write AFI (0x27) We’re using Core NFC's customCommand(requestFlags:customCommandCode:customRequestParameters:) on NFCISO15693Tag. While basic tag operations like getSystemInfo() and readSingleBlock() work fine, any customCommand immediately fails with this error: Error Domain=NFCError Code=100 "Tag connection lost" This only happens on tags that return ICRef = 0x01 in the system info response. The exact same tags and command sequence work fine on Android (transceive) and in desktop NFC tools. It looks like iOS is silently rejecting custom commands on these older tags. Has anyone found a workaround for this? Or is this a known Core NFC limitation? Would love to hear: If customCommand works for you with tags reporting ICRef = 0x01 If Apple has documented ICRef restrictions for customCommand If there’s a list of supported tag ICRefs or recommended replacements (e.g., ICRef ≥ 0x11?) We’re happy to switch to a supported tag type if necessary — but we’d prefer an official answer or guidance before reconfiguring our whole tag supply chain. Thanks in advance for any help!
1
0
86
Jun ’25
ISO 14443-4 Reading issue
I am working with a Texas Instruments RF430 NFC tag, which is compliant with: ISO/IEC 14443-4 (ISO-DEP) NFC Forum Type 4 Tag NFC-B protocol NDEF-formatted storage I’m using an iPhone 12 running iOS 18, and my app uses the Core NFC framework. Using NFCNDEFReaderSessionDelegate, I am able to successfully read the first NDEF message from the tag. However, the tag stores multiple NDEF messages, and I would like to access the others. Based on the tag’s specification, these messages are accessible via an NDEF file located at file ID 0xE104. To try and access this additional NDEF file, I attempted to use NFCTagReaderSession with the NFCTagReaderSessionDelegate, intending to issue APDU commands. However, the tagReaderSession(_:didDetect:) delegate method is never called, even though the tag is present and detected using NFCNDEFReaderSession. My questions: Does Core NFC on iOS 18 support issuing custom APDU commands to ISO 14443-4 (NFC-B) tags like the TI RF430? Is the use of NFCTagReaderSession with NFC-B fully supported for tags that implement ISO-DEP (even if they are NDEF-formatted)? Is there any known limitation or configuration required to ensure tagReaderSession(_:didDetect:) is triggered for NFC-B/ISO-DEP tags?
1
0
177
Jun ’25
NFC HCE CardSession.isSupported crash
I am getting report of a crash occurring, while doing a NFC HCE CardSession. The swift code is mostly the same as the example from the CardSession docs: @objc func deviceSupportsNFC (_ call: CAPPluginCall) { call.keepAlive = true let supportsNFCCallbackId = call.callbackId! Task() { guard NFCReaderSession.readingAvailable, CardSession.isSupported, // <-- line 86 await CardSession.isEligible else { print(TAG + " HCE not allowed/available") var support = JSObject() support["supported"] = false; let callback = bridge?.savedCall(withID: supportsNFCCallbackId) call.resolve(); callback?.resolve(support); return; } print(TAG + " HCE allowed") var support = JSObject() support["supported"] = true; let callback = bridge?.savedCall(withID: supportsNFCCallbackId) call.resolve(); callback?.resolve(support); } } Calling it from my plugin, to verify if (HCE) NFC is supported: if(await deviceInfoService.isIos()) { if(iosSupportEnabled === false) { console.log("NfcHceService:iOS but disabled"); return; } this.requiresManualTrigger = true; DfsNfcHce.deviceSupportsNFC((supportObj) => { const support = supportObj?.supported ?? false; this.hceSupported = support; }); } else { this.hceSupported = true; } The crash report i get via Crashlytics is below. It's specifying the error occurs at line 86 (marked it in my code above) The error seems to be in the CoreNFC (NFCHardwareManager areFeaturesSupported). # Crashlytics - Stack trace # Application: com.wodanbrothers.dyflexis # Platform: apple # Version: 2025.04.101356 (1744977392) # Issue: c3a293fbfa73c64f59f92c4b4cdfeb83 # Session: 5c64465c452c41e3abb1ba9f970b54c0_DNE_0_v2 # Date: Wed May 07 2025 07:56:11 GMT+0200 (Central European Summer Time) Fatal Exception: NSInvalidArgumentException 0 CoreFoundation 0x11a2ec __exceptionPreprocess 1 libobjc.A.dylib 0x31a7c objc_exception_throw 2 CoreFoundation 0x18467c +[NSObject(NSObject) _copyDescription] 3 CoreFoundation 0x31b84 ___forwarding___ 4 CoreFoundation 0x314f0 _CF_forwarding_prep_0 5 CoreNFC 0x2ac40 -[NFCHardwareManager areFeaturesSupported:outError:] 6 CoreNFC 0x2b184 -[NFCHardwareManager areFeaturesSupported:expiry:completion:] 7 CoreNFC 0x2f9d8 block_destroy_helper.5 8 Dyflexis 0x5c08 closure #1 in DfsNfcHcePlugin.deviceSupportsNFC(_:) + 86 (DfsNfcHcePlugin.swift:86) 9 Dyflexis 0x7f8d <deduplicated_symbol> 10 Dyflexis 0x7725 specialized thunk for @escaping @isolated(any) @callee_guaranteed @async () -> (@out A) (<compiler-generated>) 11 Dyflexis 0x77fd <deduplicated_symbol> 12 libswift_Concurrency.dylib 0x65241 completeTaskWithClosure(swift::AsyncContext*, swift::SwiftError ... Crashed: com.google.firebase.crashlytics.ios.exception 0 FirebaseCrashlytics 0x1b658 FIRCLSProcessRecordAllThreads + 172 1 FirebaseCrashlytics 0x1ba64 FIRCLSProcessRecordAllThreads + 1208 2 FirebaseCrashlytics 0x13adc FIRCLSHandler + 48 3 FirebaseCrashlytics 0xe9d4 __FIRCLSExceptionRecord_block_invoke + 92 4 libdispatch.dylib 0x1b584 _dispatch_client_callout + 16 5 libdispatch.dylib 0x11728 _dispatch_lane_barrier_sync_invoke_and_complete + 56 6 FirebaseCrashlytics 0xe260 FIRCLSExceptionRecord + 204 7 FirebaseCrashlytics 0xe4f8 FIRCLSExceptionRecordNSException + 452 8 FirebaseCrashlytics 0xdeb8 FIRCLSTerminateHandler() + 396 9 libc++abi.dylib 0x158b4 std::__terminate(void (*)()) + 16 10 libc++abi.dylib 0x18e1c __cxa_get_exception_ptr + 86 11 libc++abi.dylib 0x18dc4 __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 90 12 libobjc.A.dylib 0x31be4 objc_exception_throw + 448 13 CoreFoundation 0x18467c +[NSObject(NSObject) _copyDescription] + 362 14 CoreFoundation 0x31b84 ___forwarding___ + 1492 15 CoreFoundation 0x314f0 _CF_forwarding_prep_0 + 96 16 CoreNFC 0x2ac40 -[NFCHardwareManager areFeaturesSupported:outError:] + 364 17 CoreNFC 0x2b184 -[NFCHardwareManager areFeaturesSupported:expiry:completion:] + 96 18 CoreNFC 0x2f9d8 block_destroy_helper.5 + 8028 19 Dyflexis 0x5c08 closure #1 in DfsNfcHcePlugin.deviceSupportsNFC(_:) + 86 (DfsNfcHcePlugin.swift:86) 20 libswift_Concurrency.dylib 0x5c134 swift::runJobInEstablishedExecutorContext(swift::Job*) + 292 21 libswift_Concurrency.dylib 0x5d5c8 swift_job_runImpl(swift::Job*, swift::SerialExecutorRef) + 156 22 libdispatch.dylib 0x13db0 _dispatch_root_queue_drain + 364 23 libdispatch.dylib 0x1454c _dispatch_worker_thread2 + 156 24 libsystem_pthread.dylib 0x4624 _pthread_wqthread + 232 25 libsystem_pthread.dylib 0x19f8 start_wqthread + 8 ...
1
0
126
May ’25
NFC class "NFFieldNotification" not loaded or does not exist
I am using NFC when the phone is near the NFC reader times below the error: 2024-07-15 15:43:03.608427+0800 TestNFC[16022:1038141] [xpc.exceptions] <NSXPCConnection: 0x282ba90e0> connection to service with pid 58 named com.apple.nfcd.service.corenfc: Exception caught during decoding of received selector didDetectExternalReaderWithNotification:, dropping incoming message. Exception: Exception while decoding argument 0 (#2 of invocation): Exception: decodeObjectForKey: class "NFFieldNotification" not loaded or does not exist my code: #import <CoreNFC/CoreNFC.h> @interface ViewController ()<NFCTagReaderSessionDelegate> @property (strong, nonatomic) NFCTagReaderSession *session; @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. self.view.backgroundColor = [UIColor whiteColor]; if (@available(iOS 13.0, *)) { // 初始化 NFC 设置代理 NFCTagReaderSessionDelegate if (NFCNDEFReaderSession.readingAvailable) { self.session = [[NFCTagReaderSession alloc] initWithPollingOption:NFCPollingISO14443 delegate:self queue:nil]; // NFC 显示提示信息 self.session.alertMessage = @"准备扫描,请将卡片贴近手机"; // 开启 NFC [self.session beginSession]; } } else { } } #pragma mark - NFCNDEFReaderSessionDelegate //读取失败回调-读取成功后还是会回调这个方法 - (void)tagReaderSessionDidBecomeActive:(NFCTagReaderSession *)session API_AVAILABLE(ios(13.0)){ NSLog(@"tagReaderSessionDidBecomeActive"); } - (void)tagReaderSession:(NFCTagReaderSession *)session didInvalidateWithError:(NSError *)error API_AVAILABLE(ios(13.0)){ NSLog(@"readerSession:didInvalidateWithError: (%@)", [error localizedDescription]); } - (void)tagReaderSession:(NFCTagReaderSession *)session didDetectTags:(NSArray<__kindof id<NFCTag>> *)tags API_AVAILABLE(ios(13.0)){ }
1
0
535
Apr ’25
CardSession.Error doubts
Hi, I am dealing with CardSession.Error (https://developer.apple.com/documentation/corenfc/cardsession/error) and I have some doubts to force some of them. radiodisabled --> I do not know how reproduce this error. I thought it happen on flight mode but it is does not. Until I know you cannot disable de NFC on iPhone. How can I reproduce? transmissionerror --> I guess it happens when somethings is wrong during the apdu respond. But I have never got, how can it force? emulationStopped --> I try to force by code with stopemulation(status:) but I have not got this error. How I can get it? Which is the difference between accessnotaccepted and systemeligibilityfailed? I think both of them are happening when the user decline the permissions, right? I hope you can help me to solve these doubts. Thank you in advance. Best regards.
1
0
60
Apr ’25
NFCTagReaderSession - Missing required entitlement
Hi there, I am using Core NFC and I established the connection with the card, but after sending the command 'tag.sendCommand()' I receive this message: -[NFCTagReaderSession _connectTag:error:]:748 Error Domain=NFCError Code=2 "Missing required entitlement" UserInfo={NSLocalizedDescription=Missing required entitlement}. The version of XCode I am using is 16.3, and the iPhone version is iOS 18.4 Here is my entitlements file: com.apple.developer.nfc.readersession.formats NDEF TAG And my info.plist: NFCReaderUsageDescription NFC com.apple.developer.nfc.readersession.iso7816.select-identifiers A000112233445566 Signing &amp; Capabilities‌ has added Near Field Communication Tag Reading‌.
0
2
269
Apr ’25
App Clip Not Launching – Correct Bundle ID and AASA, Still Not Working
Hi everyone, I’m trying to launch an App Clip for my app, and I’ve been stuck trying to debug why the App Clip won’t launch in production, despite everything seemingly being set up correctly. My setup: Main app bundle ID: com.release.cosa App Clip bundle ID in Xcode: com.release.cosa.appclip In App Store Connect, the App Clip is listed as: com.release.cosa.appclip My AASA file (served with correct headers from my domain): { "appclips": { "apps": ["com.release.cosa.appclip"] } } App Clip target and entitlements are properly set in Xcode What works: App Clip launches via local testing in Xcode (Simulator and physical device) App Clip works when triggered manually from Safari (while debugging) What doesn’t work: NFC tag or Universal Link from the real world does not trigger the App Clip On device, nothing happens – not even a fallback to Safari No errors shown to user
1
0
117
Apr ’25
how to handle setup for NFC without NDEF & PACE and still support iOS 15.0
We have NFC capabilties enabled for our app ID - com.uob.mightyvn but our minimum deployment target is 15.0. We do not have an option deselect PACE from provisioning profile. Hence, the validation is failed for IPA. Invalid entitlement for core nfc framework. The sdk version '18.2' and min OS version '15.0' are not compatible for the entitlement 'com.apple.developer.nfc.readersession.formats' because 'NDEF is disallowed'
1
0
242
Apr ’25