Posts under App & System Services topic

Post

Replies

Boosts

Views

Activity

issue with iconv() on macOS using "WCHAR_T//TRANSLIT"
Hello, I am working on a cross‑platform application that uses libiconv to convert strings to/from Unicode. I need to modify the existing code for compatibility with macOS. However, the call to iconv() fails with an unclear errno value (92) when using "WCHAR_T": std::wstring ConvertToWchar(const std::string& iconvCodeSet, const std::string_view str) { iconv_t conv = iconv_open("WCHAR_T//TRANSLIT", iconvCodeSet.c_str()); if (conv == (iconv_t)-1) { std::cerr << "iconv_open() failed" << std::endl; return {}; } std::wstring out(str.size(), L'\0'); auto inPtr = (char*)str.data(); size_t inSize = str.size(); auto outPtr = (char*)out.data(); size_t outSize = out.size() * sizeof(wchar_t); if (iconv(conv, &inPtr, &inSize, &outPtr, &outSize) == (size_t)-1) { std::cerr << "iconv() failed. errno = " << errno << std::endl; return {}; } if (iconv(conv, nullptr, &inSize, &outPtr, &outSize) == (size_t)-1) { std::cerr << "iconv() failed. errno = " << errno << std::endl; return {}; } iconv_close(conv); return out; } int main() { std::string str1((const char*)u8"ΟΔΥΣΣΕΥΣ"); std::wstring str2 = ConvertToWchar("UTF-8", str1); if (str2.empty()) return 1; std::cout << "converted" << std::endl; return 0; } Using "UTF-32" works fine, but "WCHAR_T//TRANSLIT" fails. What is the recommended way to convert wchar_t strings using libiconv? Why does the conversion fail with "WCHAR_T//TRANSLIT"? Thank you in advance!
2
0
125
4d
Question about MFi token access
Hi all, Our company is applying for the Find My certification for our smartwearable product. Now we submitted the product plan and it's approved. The lab asked us to get the token but we searched on internet and the documents about it are limited. The CSR has approved and we already had .pem and .key file. I wonder what should we do next. Any helps are appreciated
1
0
92
6d
DeviceCheck framework error
We integrated DeviceCheck framework into our app to prevent fraudulent call to our app service around one year ago. Recently, we received a few cases related to this function over Christmas Eve period. Based on the logs we have, it indicated both the following two functions returned errors. But we don't have the exactly errors logged and now we cannot replicate. DCAppAttestService.shared.attestKey() DCAppAttestService.shared.generateAssertion() The other finding we have is some users reporting this issue recently upgraded their devices from iOS 18 to iOS 26. So we are suspecting it's due to either the OS upgrading, or Apple's app attest service degrading. Anyone encountered the similar issues before, or have any idea regarding the root cause? Thanks!
0
1
128
1w
CoreNFC ISO7816: provisioning profile doesn’t match entitlements for readersession.formats / iso7816.select-identifiers + NFCError 104 “Tag is not connected”
Hi all, I’m building an iOS app that uses CoreNFC to communicate with a YubiKey 5C NFC over ISO14443 / ISO7816 and send APDUs (e.g. select an applet by AID). Environment • Device: iPhone 13 Pro Max • iOS: 18.6.2 • Xcode: 26.1.1 (17B100) • API: NFCTagReaderSession(pollingOption: .iso14443) using NFCTag.iso7816 What I’m trying to do 1. Start NFCTagReaderSession(.iso14443) 2. Detect tag → connect 3. Send ISO7816 APDUs (SELECT AID, etc.) Issue A — Entitlements / signing If I add ISO7816-related NFC entitlements, Xcode fails signing with an error like: • “Provisioning profile … doesn’t match entitlements file value for com.apple.developer.nfc.readersession.formats” When I inspect the generated .mobileprovision, I only see something like: • com.apple.developer.nfc.readersession.formats = [NDEF, TAG, PACE] …and I do not see an ISO7816 / select-identifiers entitlement (and the Developer portal UI doesn’t appear to let me enable it). Questions: 1. Is ISO7816 access under com.apple.developer.nfc.readersession.formats restricted and requires Apple approval? If yes, what’s the correct request process? 2. Is com.apple.developer.nfc.readersession.iso7816.select-identifiers required for sending ISO7816 APDUs? If yes, how do developers obtain it / enable it for an App ID + provisioning profiles? 3. What is the Apple-supported way to configure entitlements/profiles for CoreNFC ISO7816 APDU communication with a token like a YubiKey? Issue B — Runtime NFC error Separately (even when I can run), I intermittently/consistently get: • NFCError Code=104 (“Tag is not connected”) This occurs after the tag is detected/connected when trying to establish a session or send APDUs. I’ve verified: • No phone case interference • Correct placement • Consistent detection “tick” from the phone for "Ready to Scan" prompt after tapping YubiKey 5C NFC device. If helpful, I can share: • A minimal sample project • The exact entitlements I tried • Console logs around the Code 104 failure Thanks!
1
0
72
6d
VPN profile corruption
We've often observed connectivity issues from our VPN app that can only be remedied by removing the VPN profile. It happens to a small but significant amount of our users, this often happens more when the app is updated, but the VPN profile corruption can happen without that too. The behavior we're observing is that any socket opened by the packet tunnel process just fails to send any data whatsoever. Stopping and restarting the packet tunnel does not help. The only solution is to remove the profile and create a new one. We believe our app is not the only one suffering from this issue as other VPN apps have added a specific button to refresh their VPN profile, which seemingly deletes and re-created the VPN configuration profile. Previously, we've caught glimpses of this in a sysdiagnose, but that was a while ago and we found nothing of interest. Alas, the sysdiagnose was not captured on a device with the network extension diagnostic profile (it was not a developer device). I would love to get technical support with this, as our bug reports have gone unanswered for long enough, yet we are still struggling with this issue. But of course, there is no minimum viable xcodeproject that reproduces this. Is there anything we can feasibly do to help with this issue? Is it even an acknowledged issue?
1
0
72
5d
Declared Age Range - AgeRangeService.Error the operation couldn't be completed
Is there a setting in Settings for None, Ask, or Always for Declared Age? I cannot find anything in iOS 26.2 Settings app, nothing comes up in a search for "age" in Settings. I managed to setup a sandbox apple account (after creating a new email address) and I was able to go to Settings->Developer, login to the sandbox account, and try the various settings for age there, so that much is working. When I call AgeRangeService.shared.requestAgeRange(ageGates: 18, in: presenter) I get "The operation couldn’t be completed. (DeclaredAgeRange.AgeRangeService.Error error 0.)" Is there a way to test this with my regular personal apple unpaid developer account, my work apple developer account with MS SSO, or with the sandbox user? Should I be using requestAgeRange or isEligibleForAgeFeatures? We just have a regular app on the store, it doesn't have chat or anything like that, it's used by licensed truck drivers mostly CDL holders who are 99.99% 18+ in age, possibly some exceptions for 16+ farm drivers. And we would like to stay compliant. Other caveats are that only iOS 26.2 and up are supported, and a judge has blocked the Texas law. Is Apple still supporting the Declared Age Framework or has there been a change?
2
0
202
1w
APNS always returning "discarded as device was offline"
Approx Dec 13th 2025 til now (Dec 29th) I noticed my APNS dropped off to nothing daily. When I try to send APNS alerts on the developer site tool it always returns "discarded as device was offline" for multiple devices which I know are online. When I try pushing through my VPS (as I always have without any code changes for months) I get status codes of 400 and 403 mostly and a few 200's without it delivering also. I created a new sandbox certificate just in case it was that but still no luck, I get the same results. Ive checked for any firewall issues and I see the following on my VPS: nslookup gateway.push.apple.com Server: 1.1.1.1 Address: 1.1.1.1#53 ** server can't find gateway.push.apple.com: NXDOMAIN This seems like a second issue but not the primary issue that the portal is reporting. Any ideas what to check? Im at a loss as to why its not working at all through apples test notification portal on my developer account. It seems thats the initial issue I need to solve. Thank you for any ideas/help
1
0
84
1w
Reliable Shield enforcement for Parental Control App when child disables Notifications
We're building a parental control app using FamilyControls (.child authorization). Our architecture: Parent sends pause command → Firestore + FCM Child receives push → NotificationService Extension triggers main app Main app sets ManagedSettings Shields Problem: If child disables Notifications in Settings and force-quits the app, we cannot enforce Shields. What we've tried: Firestore Realtime Listener (works only when app is running) DeviceActivityMonitor (intervalDidStart/End only triggers at schedule boundaries, eventDidReachThreshold requires explicit app selection via FamilyActivityPicker) Question: Is there a recommended approach for parental control apps to reliably enforce Shields when the child has disabled notifications? Or is this a known limitation?
2
0
100
3d
Post-iOS update crash on app launch with split/black screen (Flutter + WebView)
Hi all. Thanks in advance for any guidance you’re able to offer. We’ve had an issue reported by multiple customers where, following an iOS update, our app crashes on the next launch. When this happens, users briefly see a split screen: half of the view shows the app background, while the other half is completely black. After this point, the app is unusable. Here’s what we’ve uncovered so far during our investigation: We believe this occurs when a user is already signed into the app at the time they install the iOS update. For context, we intentionally do not force users to log out of the app, as it’s primarily used for customer support and assistance. This is a firm business decision and not something we plan to change. We suspect the issue is related to our Flutter WebView and how it restores or reloads session state following an iOS update. In the past, updating the Flutter version has resolved similar issues, but we are currently on the latest available version. Once the half-screen issue occurs, all app functionality is blocked. At present, the only workaround is for the user to delete and reinstall the app. The most frustrating part is that this does not affect all users. Some customers have updated to iOS 26.2 without any issues at all. We’ve been unable to reproduce the problem internally, despite extensive testing and attempts to force the conditions. That said, our IT Director did experience the issue firsthand on his own device. For our next release, we’re planning to try the following changes, though we won’t know for certain whether they resolve the issue until the update is in the wild. First, disabling iOS state restoration: func application(_ application: UIApplication, shouldSaveApplicationState coder: NSCoder) -> Bool { return false } func application(_ application: UIApplication, shouldRestoreApplicationState coder: NSCoder) -> Bool { return false } This was recommended to us as it’s apparently a common approach to addressing post-update freezes or broken restore states. Second, detecting an iOS version change and resetting the WebView / Flutter state on first launch after an update: let lastOS = UserDefaults.standard.string(forKey: "lastOSVersion") let currentOS = UIDevice.current.systemVersion if lastOS != currentOS { // Clear WebView data WKWebsiteDataStore.default().removeData( ofTypes: WKWebsiteDataStore.allWebsiteDataTypes(), modifiedSince: Date.distantPast, completionHandler: {} ) // Force Flutter engine restart // OR route user through a native splash/login screen UserDefaults.standard.set(currentOS, forKey: "lastOSVersion") } The idea here is to ensure the WebView and Flutter engine start cleanly after an iOS update, rather than attempting to restore potentially incompatible state. We’d really welcome any ideas, suggestions, or feedback from others who may have encountered something similar. Apologies in advance if any details are vague — I’m not deeply technical, so this is based on the research and guidance we’ve gathered so far. Thanks again for your time and help, Chris Brodier
1
0
90
6d
How to detect when Apple Watch is removed from wrist during active workout session?
I'm currently collecting real-time heart rate data using HKWorkoutSession. I want to track when the Apple Watch is physically removed from the user's wrist during an active workout. However, I've noticed that workoutBuilder(_:didCollectDataOf:) continues to be called even after the watch is removed from the wrist. Is there a way to detect when the Apple Watch is removed from the wrist during an active HKWorkoutSession? Or is this tracking not possible through the HealthKit framework? Any guidance or alternative approaches would be appreciated.
1
0
65
1w
NSPersistentCloudKitContainer in duplicate processes
I have a single multiplatform application that I use NSPersistentCloudKitContainer on. This works great, except I noticed when I open two instances of the same process (not windows) on the same computer, which share the same store, data duplication and "Metadata Inconsistency" errors start appearing. This answer (https://stackoverflow.com/a/67243833) says this is not supported with NSPersistentCloudKitContainer. Is this indeed true? If it isn't allowed, is the only solution to disable multiple instances of the process via a lock file? I was thinking one could somehow coordinate a single "leader" process that syncs to the cloud, with the others using NSPersistentContainer, but this would be complicated when the "leader" process terminates. Currently, it seems iPad split views are new windows, not processes -- but overall I'm still curious :0 Thank you!
1
0
205
1w
iAP2 IdentificationInformation Rejected - Product Plan Status Question
Hello, We are developing an iAP2 accessory and encountering an issue during the Identification phase. Issue: Authentication: ✅ Successful Identification: ❌ IdentificationInformation rejected (0x1D03) Product Plan Status: "Submitted" (in MFi Portal) What we've verified: ProductPlanUID matches MFi Portal All required parameters per R43 Table 101-9 are included Parameters are in ascending order by ID Message format appears correct Observation: iPhone accepts the message format but still rejects IdentificationInformation, suggesting the issue may be related to Product Plan configuration or status rather than parameter format. Questions: Can a Product Plan with status "Submitted" complete iAP2 identification, or does it need to be "Approved"? Are there any Product Plan configuration requirements that might not be visible in MFi Portal? Should we configure "Control Message Lists" in Product Plan? (We don't see this option in Portal) We can provide additional technical details through secure channels if needed. Thank you for your assistance.
1
0
67
5d
Bug apple Health
Hello everyone, I’m experiencing a visual issue when dismissing a sheet on iOS 26. I’m using the same implementation shown in the official Apple documentation. While testing, I noticed that some apps do not exhibit this behavior. However, when running this code on iOS 26, the issue consistently occurs. Issue description: The sheet dismisses abruptly A white screen briefly appears for a few milliseconds and then disappears This results in a noticeable visual glitch and a poor user experience I tested the exact same code on iOS 18, where the sheet dismisses smoothly and behaves as expected, without any visual artifacts. Has anyone else encountered this issue on iOS 26? Is this a known bug, or is there a recommended workaround? Any insights would be greatly appreciated. Thank you.
2
0
171
1w
Provisioning profile missing entitlement
My iOS app uses CloudKit key-value storage. I have not updated the app in a few years but it works fine. Since it was last updated, I transferred the app from an old organization to my personal developer account. Now that I'm working on the app again I get an error: Provisioning profile "iOS Team Provisioning Profile: com.company.app" doesn't match the entitlements file's value for the com.apple.developer.ubiquity-kvstore-identifier entitlement. In the entitlement file, it has $(TeamIdentifierPrefix)$(CFBundleIdentifier) as the value for iCloud Key-Value Store. I've verified the variables resolve as expected. When I parse the provisioning profile there is no entitlement value for key-value storage. What am I getting wrong?
4
0
653
1d
ipad通过转接口连接上有线网络之后,部分设备无法获取到IP地址
private static func getEthernetIPAddress(from interfaces: [String: String]) -> String? { // 常见虚拟以太网接口名(根据适配器型号可能不同) let poeEthernetInterfaces = ["en2", "en3", "en4", "en5", "eth0", "eth1"] for interfaceName in poeEthernetInterfaces { if let ethernetIP = interfaces[interfaceName], !ethernetIP.isEmpty { return ethernetIP } } return nil }//我们通过该方法去抓取有线网的IP地址,但是有的设备无法抓取到,怎样才能更准确的抓取到有线网络的IP地址
1
0
111
5d
old icon is displayed in some places after updating the app
I changed the AppIcon in Images.xcassets,and distribute a new version on appstore;The icon have changed on the desktop, but elsewhere, such as when switching between apps, the top left corner shows the old version of the icon.When I restart my phone,the top left corner show the new version of the icon;My phone is iPhone 13 Pro Max,iOS 18.4.1;Is there other ways to resolve the problem without restart the phone?
0
0
56
2w
NSPersistentCloudKitContainer data loss edge case
Hi, I was testing the new iOS 18 behavior where NSPersistentCloudKitContainer wipes the local Core Data store if the user logs out of iCloud, for privacy purposes. I ran the tests both with a Core Data + CloudKit app, and a simple one using SwiftData with CloudKit enabled. Results were identical in either case. In my testing, most of the time, the feature worked as expected. When I disabled iCloud for my app, the data was wiped (consistent with say the Notes app, except if you disable iCloud it warns you that it'll remove those notes). When I re-enabled iCloud, the data appeared. (all done through the Settings app) However, in scenarios when NSPersistentCloudKitContainer cannot immediately sync -- say due to rate throttling -- and one disables iCloud in Settings, this wipes the local data store and ultimately results in data loss. This occurs even if the changes to the managed objects are saved (to the local store) -- it's simply they aren't synced in time. It can be a little hard to reproduce the issue, especially since when you exit to the home screen from the app, it generally triggers a sync. To avoid this, I swiped up to the screen where you can choose which apps to close, and immediately closed mine. Then, you can disable iCloud, and run the app again (with a debugger is helpful). I once saw a message with something along the lines of export failed (for my record that wasn't synced), and unfortunately it was deleted (and never synced). Perhaps before NSPersistentCloudKitContainer wipes the local store it ought to force sync with the cloud first?
3
0
284
1w
iOS 26.2 (23C55): DeviceActivity eventDidReachThreshold fires with 0 Screen Time minutes
On iOS 26.2 (23C55), DeviceActivityMonitor.eventDidReachThreshold fires intermittently for a daily schedule (00:00–23:59) even when iOS Screen Time shows 0 minutes for the selected apps that day. This causes premature shielding via ManagedSettings. Environment: iPhone 13 Pro Max, iOS 26.2 (23C55). Event selection: 2 apps. Threshold: 30 minutes. Multiple TestFlight users report the same behavior across various app selections and thresholds. Intermittent (~50% of days); sometimes multiple days in a row. Not observed in testing prior to iOS 26.2. Evidence: sysdiagnose + Screen Time screenshots (with 0 screen time on selected apps) + unified logs show UsageTrackingAgent notifying the extension that “unproductive from activity daily reached its threshold,” followed immediately by ManagedSettings shield being applied (extension reacting to the callback). Filed Feedback Assistant: FB21450954. Questions: Are others seeing this on 26.2? Does it correlate with restarting monitoring at interval boundaries or includesPastActivity settings?
2
2
358
4d
Tahoe 26.2.
Ich habe Tahoe 26.2. installiert und bekomme nun keine Verbindungen zu externen Geräten (Keyboard, Synthesizer). KI gefragt und Antwort bekommen: Tahoe ist keine macOS-update und existiert nicht. Was ist die Wahrheit?
1
0
256
2w