Hi everyone,
I'm working on an NFC-related app using CoreNFC with APDU commands to read and write tags. I’ve encountered an issue when trying to handle the scenario where the user cancels the NFC session.
Here’s what’s happening:
When a user cancels the NFC session manually (e.g., by tapping "Cancel"), I see an error log indicating tagReaderSession|userCancelled.
However, when I explicitly call session.invalidate(errorMessage: "No NFC tag found") in my code to handle a scenario where no tag is detected, the session still shows the error as userCancelled instead of my custom error message.
This behavior is confusing both in terms of debugging and for providing feedback to users, as I expect my custom message to appear instead of the generic "user cancelled" message.
func tagReaderSessionDidBecomeActive(_ session: NFCTagReaderSession) {
// Session becomes active
}
func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) {
// Handle tag detection logic
}
func tagReaderSession(_ session: NFCTagReaderSession, didInvalidateWithError error: Error) {
print("Session invalidated with error: \(error.localizedDescription)")
}
func handleNoTagDetected(session: NFCTagReaderSession) {
session.invalidate(errorMessage: "No NFC tag found")
}
I call handleNoTagDetected(session:) explicitly when no tag is detected, expecting the custom error message to show. However, the system still shows the cancellation error.
Has anyone else experienced this behavior? Is this the intended behavior for CoreNFC, or am I missing something in my implementation?
Any guidance would be appreciated.
Thanks in advance!
General
RSS for tagDive into the vast array of tools and services available to developers.
Post
Replies
Boosts
Views
Activity
Hi everyone,
I’m encountering a crash in my app and need help understanding what’s causing it and how to resolve it.
As stated in the crash report, the issue is caused by exceeding the system-wide per-process port limit. Can you tell me how to locate and identify why this is happening?
Below are the full report of the crash log:
crash.log
Summary of Crash:
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Incident Identifier: B509FF2B-C8D8-4E9F-B664-E24464CFD5F8
CrashReporter Key: b390cfe931a83efde49bd8b523023a275b55ef64
Hardware Model: iPhone14,2
Process: MyApp [22515]
Path: /private/var/containers/Bundle/Application/F73212A7-4CB9-485A-A8B7-8114F4E9A9AB/MyApp.app/MyApp
Identifier: com.beeasy.app.id.enterprise
Version: 3.41.38-ID-MySDKMemory-12261114 (3.41.38-ID-MySDKMemory-12261114)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.beeasy.app.id.enterprise [515]
Date/Time: 2024-12-29 01:29:48.3023 +0800
Launch Time: 2024-12-26 16:38:36.7895 +0800
OS Version: iPhone OS 16.6.1 (20G81)
Release Type: User
Baseband Version: 2.80.01
Report Version: 104
Exception Type: EXC_RESOURCE (SIGKILL)
Exception Codes: 0x000000000001c1d6, 0x0000000000000000
Termination Reason: PORT_SPACE 14123288431433990614 (Limit 115158 ports) Exceeded system-wide per-process Port Limit
Triggered by Thread: 64
Thread 64 name: AURemoteIO::IOThread
Thread 64 Crashed:
0 libsystem_kernel.dylib 0x20ce5eca4 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x20ce71b74 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0x20ce71e4c mach_msg_overwrite + 540
3 libsystem_kernel.dylib 0x20ce5f1e8 mach_msg + 24
4 libEmbeddedSystemAUs.dylib 0x238bb2148 void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, AURemoteIO::IOThread::IOThread(AURemoteIO&, caulk::thread::attributes const&, caulk::mach::os_workgroup_managed const&)::'lambda'(), std::__1::tuple<>>>(void*) + 556
5 libsystem_pthread.dylib 0x22dcda6b8 _pthread_start + 148
6 libsystem_pthread.dylib 0x22dcd9b88 thread_start + 8
Inside our app, after login (user side), getting grey screen on homepage.
I have no sound on any app after beta 18.3 no keyboard click nothing
Why as an IDE, many developers want to use the functions are not available, such as code formatting, if the function is not available, why not even a plug-in center, I have been using IDEA for code development, with Xcode development, feel very inconvenient to use
Was working ok, then after my latest attempt at submitting a .PKG it crashes right after displaying the list of previous submitted things.
This make it impossible to make progress with my project, unless there's another way of getting it to TestFlight (not using Xcode).
Transporter 1.3.2 on Intel Mac Sequoia 15.0
Hi,
I'm not sure why but when my fileURL is .jpg file and I drop the file from my app to Finder folders it make the dropped file as .jpeg
Is there a way to fix it?
[.onDrag {
if FileManager.default.fileExists(atPath: file.path) {
// Provide the file as an item for dragging
let fileURL = URL(fileURLWithPath: file.path)
let itemProvider = NSItemProvider(contentsOf: fileURL)
// Remove the file extension in the suggestedName
let baseNameWithoutExtension = fileURL.deletingPathExtension().lastPathComponent
itemProvider?.suggestedName = baseNameWithoutExtension
return itemProvider ?? NSItemProvider()
} else {
// Handle the case where the file no longer exists
print("File no longer exists at path: \(file.path)")
return NSItemProvider()
}
})
I already asked this, although I want to ask again so it boots and gets more people; When I try to run my project on the simulator, it tells me there is a bug. It is not in the code I wrote, but I believe in the compiler. It would work perfectly, say the build succeeded, but the phone turns white and stops there. I don't know how to debunk it, what to do!
Picture of what happens with the phone:
Picture of the debugging area:
Picture of my code:
If I need to add more things, please let me know.
Have a great day!
I am getting the following warning printed in the console while my app is running
Invalid profile 'c2ci': tags 'gTRC' and 'desc' overlap
Console metadata specifies it comes from ColorSync at com.apple.colorSync
How to fix this? It prints a lot in the console.
i need help!
we bought keyboard after keyboard, and nothing seems to work.
my ipad pro, 7th gen, 13 inch, is not typing whatsoever with the magic keyboard unless i hold the keys.
it did this with a logitech keyboard as well.
Hi,
Apple changed the renewal rate for auto renewable subscriptions in testflight to 24hrs and after 6 renewals it is supposed to expire. My subscription is now active for more than 13 days, it didnt expire as its supposed to. I heard that there is no chance to cancel it manually. Is there anyone else who had this problem and found a solution? I use RevenueCat to manage subscriptions. Maybe its because they have not adapted to apples update yet. Are there any other RevenueCat users that can confirm this experience? Or non RC users who don't have the issue I'm facing? Any responds are welcome.
Hi all, if anyone from apple Dev team is seeing this, please do consider supporting device mirroring without the need to login to icloud and with cable connection in addition to wi-fi.
I am working in a corporate setting which does not allow us to login to icloud, thus I am unable to use device mirroring when my work really needs is, I am stuck with Quick time preview.
I am quite sure, that this does not only apply to me.
I am a new user of PyCharm, but have years of experience with MacOS, python and similar. My set up is MacBook Pro M1, 32GB ram, MacOS Sequoia 15.2, and PyCharm Pro latest.
Path to projects leads to an external SSD via usb-c. I have set up some projects, each using python 3.12 in a venv.
The projects work for a while then “lose” a module (module not found). I have gone through every troubleshooting method the built-in AI and web search have come up with.
The first module to disappear is docx2txt. I created a new project and it worked, for a couple of days then the error returned. The docx2txt module could not be found working within or outside of PyCharm. In site-packages there is no “docx2txt” folder, only an “info” folder containing WHEEL and its companions.
For the most recent disappearance, I noticed the package used distutils. I cloned the docx2txt project from GitHub and updated setup.py to use setup tools instead of distutils, and installed it. Python invoked from the command line can import it, but not from PyCharm. When I run the project from PyCharm, the interpreter cannot find dotenv.
I have lost days of work time at this point so I am a bit worried. Advice on what to look at and for would be great.
my Date type data is "2024-12-28 15:00:00 +0000" and when I use Date formatter to format date with timezone TimeZone(identifier: "Asia/Seoul"), date formatter return wrong year like below
(lldb) po print(date); let formatter = DateFormatter(); formatter.timeZone = TimeZone(identifier: "Asia/Seoul"); formatter.dateFormat = "YYYY-MM-dd"; formatter.string(from: date)
2024-12-28 15:00:00 +0000
"2025-12-29"
(lldb) po print(date); let formatter = DateFormatter(); formatter.timeZone = .gmt; formatter.dateFormat = "YYYY-MM-dd"; formatter.string(from: date)
2024-12-28 15:00:00 +0000
"2024-12-28"
I do not see the devolper mode tab in my settings how do I access it ?
Hi,
Help!!
So I was in Thailand for a number of years and developed an app over there and signed up as a developer over there. But now I'm in the USA indefinitely and I'm unable to change my payment method. How can I change it?
I called the USA support line twice and no one was able to help me. I tried the Thailand phone number and I'm unable to call from the USA.
Any suggestions?
Thanks!!
Hello. I face such a problem as the fact that the screen does not work after turning on the developer mode. Read more: I'm trying to install an application that is not available in the App Store, and after installing it, I'm required to use developer mode. I turn it on, restart the phone, and the screen lits up in front of me that everything is ready to use the developer mode, and you just need to swipe up. I'm trying to do it, but the screen doesn't respond to my touch at all. I tried to restart the phone, but it didn't help. I reset it to factory settings - it didn't help either. I would like to hear advice from those people who have faced the same problem, or from those who know how to solve it.
I'm implementing Apple Pay in my Flutter web app and I'm following the guidelines for domain verification using the apple-developer-merchantid-domain-association file.
When I access the file at https://mydomain.com/.well-known/apple-developer-merchantid-domain-association through my web app, the browser silently downloads the file instead of displaying its content on the webpage.
My question is:
Is this the expected behavior for the apple-developer-merchantid-domain-association file? Should the browser download the file silently, or is there another step required, such as displaying the content on the webpage for verification purposes?
I've consulted some resources and they indicate that the file download is the correct behavior. However, I'd appreciate confirmation from the community to ensure I'm implementing the verification process correctly.
Summary is how do we know if apple has verified it?
When I try to run my project on the simulator, it tells me there is a bug. It is not in the code I wrote, but I believe in the compiler. It would work perfectly, say the build succeeded, but the phone turns white and stops there. I don't know how to debunk it, what to do!
Picture of what happens with the phone:
Picture of the debugging area:
In System Settings -> General -> Date & Time, there is an option called "Set time and date automatically".
Is there a way to check whether it is enabled programmatically?