Hello, I have to create an app in Swift that it scan NFC Identity card. It extract data and convert it to human readable data. I do it with below code import CoreNFC class NFCIdentityCardReader: NSObject , NFCTagReaderSessionDelegate { func tagReaderSessionDidBecomeActive(_ session: NFCTagReaderSession) { print((session.description)) } func tagReaderSession(_ session: NFCTagReaderSession, didInvalidateWithError error: any Error) { print(NFC Error: (error.localizedDescription)) } var session: NFCTagReaderSession? func beginScanning() { guard NFCTagReaderSession.readingAvailable else { print(NFC is not supported on this device) return } session = NFCTagReaderSession(pollingOption: .iso14443, delegate: self, queue: nil) session?.alertMessage = Hold your NFC identity card near the device. session?.begin() } func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) { guard let tag = tags.first else { session.invalidate(errorMessage: No tag detected) return
Search results for
nfc
1,143 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I am extracting a JPEG2000 (JP2) facial image from an NFC passport chip (ISO/IEC 19794-5) and attempting to create a UIImage from it. On iOS 16, the following code works fine: import ImageIO import UIKit func getUIImage(from imageData: [UInt8]) -> UIImage? { let data = Data(imageData) guard let imageSource = CGImageSourceCreateWithData(data as CFData, nil), let cgImage = CGImageSourceCreateImageAtIndex(imageSource, 0, nil) else { print(Failed to decode JP2 image!) return nil } return UIImage(cgImage: cgImage) } However, on iOS 18, this fails with errors like: initialize:1415: *** invalid JPEG2000 file *** makeImagePlus:3752: *** ERROR: 'JP2 ' - failed to create image [-50] CGImageSourceCreateImageAtIndex: *** ERROR: failed to create image [-59] Questions: Did Apple remove or modify JPEG2000 support in iOS 18? Is there an official workaround for decoding JPEG2000 on iOS 18? Should I use Vision/Metal/Core Image instead? Is there a recommended way to convert JPEG2000 to JPEG/PNG before creating a UII
At this time there isn't a facility to launch specific apps for specific AIDs. It's an all or none situation. But I am sure the NFC team would love to hear your thoughts in detail about this for a possible future enhancement. The typical way to make such enhancement requests would be via the Feedback Assistant.
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Thank you for your swift answer. FYI: Our app is for attendance registration, not payment. I do expect our app to be launched automatically when the phone emulating a card (HCE) has received an AID that is registered to that app. (I need to register it when compiling the app in xcode) I understand that the choice of the default contactless app is the users. But that directs all nfc transactions to this default app, right? So how can multiple apps (or wallets) for different purposes be installed on a iPhone, and still work together? If I ask the user to make our app the default one, how can the others still work? It means that doing attendance registration with our app, would make the phone not unusable for other functions, like payments. Is there a way to coexist?
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Are you expecting your app to be launched automatically when near a reader? Then your app will need to become the default payment app. There is no API to set the default payment app. This can only done by the user through the Settings app. Once you have successfully built and installed your app, properly configured with the necessary entitlements, the users should be seeing the option to make that app the default app in Settings->General->Contactless & NFC For this setting option to show up (or for any any of the EEA based features to work) Your app must be correctly configured and built with the correct entitlements and the necessary APIs Your testing device must physically be located in the EEA and is a supported type (iPhone only). The signed-in Apple ID on the device must be registered in an EEA country or region. You will need to contact the entitlements team and ask for the HCE Default App entitlement. Keep in mind that this functionality can only be tested within the EEA. As for the
Topic:
App & System Services
SubTopic:
Core OS
Tags:
I am unable to get an iPhone Xr (iOS 18) or iPhone 15 to interact with Texas Instruments RF430CL330H NFC tag. This is an ISO 14443B-compliant tag supporting NDEF. It is NFC Tag Type 4. A Samsung S23 with Android 14 and NFC Tools v8.11 reads and writes NDEF data with this tag as expected. The iPhones with NFC Tools v2.31 do not. For the following comparison the NDEF memory is written with a pre-loaded text data record. NFC Tools on Android reports the following: Tag Type: ISO 14443-4 Technologies Available: IsoDep, NfcB, Ndef Serial Number: Format: NFC Forum Type 4 Text Record 1: UTF-8 (en) Hello World! NFC Tools on iOS (iPhones) reports the following: Tag Type: ISO 7816 Technologies Available: Unknown Serial Number: Format: Text Record 1: Error response: This nfc tag is not supported Attempting to write a text message with NFC Tools on the iPhones returns An error occurred during writing process Other NDEF records (URL and Sear
Adding +1 that our App Clip has seen CPSErrorDomain error 2 reported by customers on and off during the last week when invoked by an NFC tag scan. (We haven't released an app update in months.) I haven't been able to reproduce this locally on one of our test phones, so no sysdiagnose to submit, but I will keep trying. For most customers, the App Clip is working. But we're inconsistently seeing these other two behaviors: The customer is taken to our website in Safari instead of displaying the App Clip. The App Clip appears, broken, as seen in the attached photo with CPSErrorDomain error 2.
Topic:
UI Frameworks
SubTopic:
General
Tags:
A few days ago scanning NFC tags or QR codes for AppClips with advanced experiences started showing the error The operation couldn't be completed. (CPSErrorDomain error 2.) in the AppClip sheet as seen here: We are providing AppClips to our customers and they trust AppClips to always work, since it is a big part of their business. Since this is happening at our customers phones and on the phones of their customers, I don't have a sysdiagnose. I already created a feedback entry about this FB16601674. We checked everything, our AASA file, the Appstore Experiences.
As you are observing different behaviors on different iPhone models, this is best looked at by our NFC team. Filing a Feedback report with some logging will be the best way for us to investigate the issue further. First, please go to https://developer.apple.com/bug-reporting/profiles-and-logs/ and follow the instructions for Wallet for iOS to install a logging profile on your device. Once that is installed, then reproduce the issue. Once reproduced, then follow the instructions at the above link to create a sysdiagnose Then use the Feedback Assistant. to create a report and include a detailed description of the issue, details of the tags/devices you are using, and the sysdiagnose from the above step. Also include the following info: What is the setup on the device. Including apple wallet settings Please provide sample app if you have one, or can create one Video capture of the failure scenario so we can confirm the positioning of the NFC antenna the Bundle ID of the app you have tested this
Topic:
App & System Services
SubTopic:
Drivers
Tags:
We are developing an iOS app that communicates with a device using an NXP NTAG 5 chip in ISO15693 pass-through mode. While the app works flawlessly on older iPhone models (iPhone 8, SE, X) and most Android devices, we are experiencing severe reliability issues on iPhone 12, 13, 14, and 15. Issue Summary On newer iPhones (12–15), 90% of communication attempts fail. Retry strategies do not work, as the NFC session is unexpectedly canceled while handling CoreNFC custom commands. The issue is not consistent—sometimes all requests fail immediately, while other times, a batch of reads might succeed unexpectedly before failing again. Technical Details The failure occurs while executing the following request, which should return 256 bytes: tag.customCommand(requestFlags: .highDataRate, customCommandCode: commandCode, customRequestParameters: Data(byteArray)) { (responseData, error) in } The returned error is: -[NFCTagReaderSession transceive:tagUpdate:error:]:897 Error Domain=NFCError Code=100 Tag connection
Developers can prompt users to set up their default app and redirect users to the default NFC settings page. There is no requirement in the Commitments for an API that enables developers to check default settings on a user’s device. If you wish to seek effective interoperability with a particular feature built into iOS or iPadOS, we encourage you to submit a request through our interoperability support page, available at: https://developer.apple.com/support/ios-interoperability/ Argun Tekant / DTS Engineer / Core Technologies
Topic:
App & System Services
SubTopic:
Wallet
Tags:
If a (NFC) terminal, such as a transit terminal, is specifically requesting an express mode credential and there is a matching express mode capable credential on the device and the user has enabled express mode for that matching credential, then the device will present that credential to the terminal. Otherwise, if a transit terminal is not explicitly requesting an express mode credential, or express mode is not supported on the terminal or the user has not enabled express mode for that matching credential, then the default contactless app/preferred wallet will be invoked. However, if a default contactless app/preferred wallet (e.g. your app) is in the foreground and the foregrounded app has requested Presentment Intent Assertion, then express mode will be suppressed and the express mode enabled credential will not be presented to the terminal. The foregrounded app will have the opportunity to present its credential to the terminal using HCE. Apple Pay or Apple Wallet will not intercept any payment t
Topic:
App & System Services
SubTopic:
Wallet
Tags:
My app helps users connect to Wi-Fi networks, and I have requested the Access Wi-Fi information entitlement. This allows the app to retrieve the current Wi-Fi information to ensure the user’s connection is successful. Now, we are trying to implement an App Clip that enables users to connect to a specific Wi-Fi network through a QR code scan or NFC in certain scenarios. In the App Clip, I’ve requested the Hotspot entitlement, which allows the app to use the hotspot manager to configure Wi-Fi networks. However, since I cannot access the current Wi-Fi information in the App Clip, I’m unable to confirm whether the connection was successful.
Hello, I'm trying to use the CardSession sample code in an iPhone app I have received the HCE entitlement, the select identifier array contains only one AID of 8 bytes: FAEBDA5003020000, that is a custom AID that we use on ou custom access control system. We have the complete control of the NFC reader, when we detect a MiFare card, the reader application send the SELECT AID command and the card number is return and checked We want to do the same with an iPhone instead of the MiFare card, so we use the CardSesion sample in our app, here is the log of the reader application when we present the iPhone on it: TX: 0x04 0xfc 0xd4 0x4a 0x01 0x00 0xe1 0x00 RX: 0x00 0x00 0xff 0x00 0xff 0x00 ACK RX: 0x00 0x00 0xff 0x11 0xef 0xd5 0x4b 0x01 0x01 0x00 0x04 0x20 0x04 0x08 0x10 0x53 0x17 0x05 0x78 0x80 0x71 0x00 0xc6 0x00 // SMARTPHONE NFC type 1 pn532InSelect TX: 0x03 0xfd 0xd4 0x54 0x01 0xd7 0x00 RX: 0x00 0x00 0xff 0x00 0xff 0x00 ACK RX: 0x00 0x00 0xff 0x03 0xfd 0xd5 0x55 0x00 0xd6 0x00 pn532InDataExchan
on a span of 4 months we sent 2 for nfc entitlement requests and refused , no reason nothing . i mean all we want is the ability to use nfc on passes nothing else , no idea why this is so complex . with google you don’t even need a developer account and it’s for free , here we pay and we can’t even get the full functionality the passes offer , we got the hardware and the solution but we find out we need an nfc entitlement to allow passes to have nfc ? i mean our use case is very simple instead of having barcode on the passes we want them to be via nfc and we already got the nfc hardware but we find out we need nfc entitlement which we tried requesting but getting refused with no reason at all. at least tell u what is the problem what how to fix it not outright refuse without any reason at all. if anyone got any solution please provide.