Delve into the world of built-in app and system services available to developers. Discuss leveraging these services to enhance your app's functionality and user experience.

Posts under General subtopic

Post

Replies

Boosts

Views

Activity

CXCallDirectoryProvider – Numbers added but blocking not working
Hi all, I'm working on a Call Directory Extension using CXCallDirectoryExtensionContext. I want to add a list of numbers to be blocked. Here's the function I use: override func beginRequest(with context: CXCallDirectoryExtensionContext) { context.delegate = self let blockedNumbers = loadNumberEntries(forKey: blockedKey) let identifiedNumbers = loadNumberEntries(forKey: identifiedKey) addAllBlocking(blockedNumbers, to: context) addAllIdentification(identifiedNumbers, to: context) context.completeRequest() } private func addAllBlocking(_ entries: [NumberEntry], to context: CXCallDirectoryExtensionContext) { let numbers: [Int64] = entries.compactMap { Int64($0.countryCode + $0.phone) }.sorted() for number in numbers { context.addBlockingEntry(withNextSequentialPhoneNumber: number) print("# Added blocking entry: \(number)") } } When I run this, I see in the console: # Added blocking entry: (*my number with country code*) So it seems the number is added correctly. However, in practice, the number is not blocked on the device. I’ve made sure that: The number is stored with the country code prefix. The extension is enabled in Settings → Phone → Call Blocking & Identification. The extension is reloaded after adding numbers. The array of numbers is sorted in ascending order before calling addBlockingEntry. Despite all this, the number still isn’t blocked. Does anyone know why the print shows the number added, but it doesn’t actually block the call? Am I missing something in the way CXCallDirectoryExtensionContext works? Thanks for any advice!
1
0
848
20m
Crash in libicucore via NSDateFormatter dateFromString: on iOS 26.2
Introduction: I’m encountering a consistent crash in production on iOS 26.2 (build 23C55). The crash occurs deep within libicucore when calling [NSDateFormatter dateFromString:]. Crash Summary: Exception Type: SIGSEGV (SEGV_ACCERR) Fault Address: 0xffffffff Thread: Crashed on Main Thread (Thread 0) Library: libicucore.A.dylib Code Snippet: The crash is triggered by the following method. It converts a string to an NSDate using a specific format and locale: // 获取日期date - (NSDate *)getDateWithTime:(NSString *)time formatter:(NSString *)formatterStr { NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setDateFormat:formatterStr]; formatter.timeZone = [NSTimeZone timeZoneWithName:@"Asia/Shanghai"]; formatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]; return [formatter dateFromString:time]; } Backtrace: Here is the relevant part of the crash report: Incident Identifier: E24485B6-C53E-4115-A6CF-A7E4A952AD50 CrashReporter Key: 21FAC1CF-F56B-409A-98AA-351D3D2EB06C Hardware Model: iPhone18,2 Code Type: ARM-64 Parent Process: [1] Date/Time: 2026-01-12T01:32:25Z OS Version: iPhone OS 26.2 (23C55) Report Version: 105 SDK Version: 0.0.4 Exception Type: SIGSEGV Exception Codes: SEGV_ACCERR at 0xffffffff Crashed Thread: 0 Thread 0 Crashed: 0 libicucore.A.dylib 0x000000019b81def8 0x19b74a000 + 868088 1 libicucore.A.dylib 0x000000019b7da91c 0x19b74a000 + 592156 2 libicucore.A.dylib 0x000000019b8d8340 0x19b74a000 + 1631040 3 libicucore.A.dylib 0x000000019b8eae18 0x19b74a000 + 1707544 4 libicucore.A.dylib 0x000000019b8eb600 0x19b74a000 + 1709568 5 libicucore.A.dylib 0x000000019b878be4 0x19b74a000 + 1240036 6 libicucore.A.dylib 0x000000019b87ae84 0x19b74a000 + 1248900 7 libicucore.A.dylib 0x000000019b87b2dc 0x19b74a000 + 1250012 8 libicucore.A.dylib 0x000000019b9564ac 0x19b74a000 + 2147500 9 libicucore.A.dylib 0x000000019b954afc 0x19b74a000 + 2140924 10 libicucore.A.dylib 0x000000019b952794 0x19b74a000 + 2131860 11 libicucore.A.dylib 0x000000019b98689c 0x19b74a000 + 2345116 12 CoreFoundation 0x00000001895dbfe0 0x18953d000 + 651232 13 CoreFoundation 0x00000001895dbaa0 0x18953d000 + 649888 14 Foundation 0x0000000186d2029c 0x186b88000 + 1671836 15 Foundation 0x00000001874a62dc 0x186b88000 + 9560796 16 Foundation 0x00000001874a6384 0x186b88000 + 9560964 17 xxxx 0x0000000105ea6e30 -[xxxxx getDateWithTime:formatter:] + 168 and Thread 0 crashed with ARM-64 Thread State: pc: 0x000000019b81def8 fp: 0x000000016f96bc10 sp: 0x000000016f96bbd0 x0: 0x00000000ffffffff x1: 0x000000019ba1e8e0 x2: 0x0000000000000002 x3: 0x000000000000000b x4: 0x0000000000000074 x5: 0x0000000000000069 x6: 0x0000000000000000 x7: 0xfffff0003ffff800 x8: 0x000000009ba18014 x9: 0x00000001148dffd0 x10: 0x0000000000000002 x11: 0x0000000000000004 x12: 0x0000000000000220 x13: 0x0000000000000030 x14: 0x000000015b6f36b8 x15: 0x000000015cfe0000 x16: 0x00000002a19d0ff0 x17: 0x00000001f5590a70 x18: 0x0000000000000000 x19: 0x000000016f96bc30 x20: 0x0000000000000000 x21: 0x000000015cfe3200 x22: 0x000000019ba18014 x23: 0x0000000000000000 x24: 0x000000015cfe32a0 x25: 0x0000000000000003 x26: 0x0000000000000000 x27: 0x0000000000000000 x28: 0x000000015cfe3200 lr: 0x000000019b7da958 cpsr: 0x00000000a0000000
0
0
43
7h
DeviceActivityReportExtension: NSExtensionPrincipalClass required by App Store but rejected at runtime
I'm experiencing a contradictory validation issue with DeviceActivityReportExtension that creates an impossible situation: The Problem: Without NSExtensionPrincipalClass in Info.plist → App Store Connect rejects upload with: "Missing Info.plist values. No values for NSExtensionMainStoryboard or NSExtensionPrincipalClass found" With NSExtensionPrincipalClass → Local install fails with: "defines either an NSExtensionMainStoryboard or NSExtensionPrincipalClass key, which is not allowed for the extension point com.apple.deviceactivityui.report-extension" Setup: Extension point: com.apple.deviceactivityui.report-extension Using SwiftUI with @main attribute and DeviceActivityReportExtension protocol Xcode 16.2, iOS 17.6 deployment target Code structure: @main struct SpoolReport: DeviceActivityReportExtension { var body: some DeviceActivityReportScene { // Report scenes here } } The extension builds and runs perfectly without NSExtensionPrincipalClass, but cannot be uploaded to App Store Connect. Adding the key allows upload but breaks local installation. Is this a known issue? Is there a workaround or correct Info.plist configuration for DeviceActivityReportExtension? Thank you!
0
0
93
1d
SensorKit - Questions about the startRecording() and data holding period
From the document https://developer.apple.com/documentation/sensorkit/srfetchrequest we know that "SensorKit places a 24-hour holding period on newly recorded data before an app can access it. This gives the user an opportunity to delete any data they don’t want to share with the app. A fetch request doesn’t return any results if its time range overlaps this holding period." Will this holding period reset each time when I called startRecording() ? Let's say I upgrade my app to a new version, do I need to call startRecording again to init the data collection process? will it be able to query the data collected from previous version's app ?
2
0
85
1d
Extend Measurement to support inverse units
There are many units which are inverse of standard units, e.g. wave period vs Hz, pace vs speed, Siemens vs Ohms, ... Dimension can be subclassed to create the custom units. How to extend Measurement.converted( to: )? I was looking at somehow using UnitConverter and subclass to something like UnitConverterInverse. Thoughts?
1
1
153
2d
CXCallUpdate not working for outgoing calls
I try to update remoteHandle using CXCallUpdate for outgoing call, but this works only on iOS 15 but not on 17 or 18 (16 didn't test). This problem actual only for outgoing calls, but for incoming calls update works fine. func startOutgoingCall(with callID: UUID, userID: String) { let handle = CXHandle(type: .generic, value: userID) let action = CXStartCallAction(call: callID, handle: handle) callController.requestTransaction(with: action) { [weak self] error in // ... } } func updateOutgoingCall(with callID: UUID, groupID: String) { let update = CXCallUpdate() update.remoteHandle = CXHandle(type: .generic, value: groupID) provider.reportCall(with: callID, updated: update) } I also tried phoneNumber type but it seems initial handle that I set to CXStartCallAction not possible to change (value or even type). I use this handle value to implement recall by tap on call in Recents tab of system address book. But since my calls can transform from p2p to group call, I need to update handle value or find some another way to pass call identification info.
2
0
288
2d
iOS 26.2 RC DeviceActivityMonitor.eventDidReachThreshold regression?
Hi there, Starting with iOS 26.2 RC, all my DeviceActivityMonitor.eventDidReachThreshold get activated immediately as I pick up my iPhone for the first time, two nights in a row. Feedback: FB21267341 There's always a chance something odd is happening to my device in particular (although I can't recall making any changes here and the debug logs point to the issue), but just getting this out there ASAP in case others are seeing this (or haven't tried!), and it's critical as this is the RC. DeviceActivityMonitor.eventDidReachThreshold issues also mentioned here: https://developer.apple.com/forums/thread/793747; but I believe they are different and were potentially fixed in iOS 26.1, but it points to this part of the technology having issues and maybe someone from Apple has been tweaking it.
8
3
593
2d
Shape detection for other apps?
When selecting a stroke path for object on PKCanvas, the option "Snap to Shape" appears. I understand this function is still in beta and has not made available natively to other PencilKit app. Is there a way using Stroke API to call this function directly after the user hold pencil for half a second when stroke is done drawing, just like how it behaves in native apps?
4
0
2.4k
2d
Tahoe 26.2 breaks printing with PaperCut
Issue After upgrading to Tahoe 26.2, print queues monitored by PaperCut no longer work. The print queue gets paused, and the jobs fail to print. This issue was discovered during our internal testing prior to the Tahoe 26.2 public release, and a growing number of our mutual customers have also reported it since then. Root cause This appears to be due to changes in the behavior of CUPS Sandbox restrictions, which prevent the backend (and filter) from reading/writing to the PaperCut install folder. Error messages From syslog. 2025-12-22 16:41:59.283761+1100 0x1daf61 Error 0x0 0 0 kernel: (Sandbox) Sandbox: papercut(5783) deny(1) file-write-data /Library/Printers/PaperCut/Print Provider/print-provider.log When trying to create a TCP socket from the PaperCut filter. 2025-12-15 19:50:08,403 ERROR: os_tcp_socket_create: getaddrinfo failed: nodename nor servname provided, or not known Technical details PaperCut implements print queue monitoring using a CUPS backend (and filter). CUPS backends and filters run in a security 'sandbox' which limits what they can do (such as file/folder access, create network sockets, and execute sub-processes, etc.). The PaperCut backend (and filter) relies on some of these operations, so to function correctly, our code updates /etc/cups/cups-files.conf with "Sandboxing relaxed". Until 26.2, this relaxed mode allowed us to read/write to PaperCut folders, create TCP sockets to communicate with the local PaperCut Application Server, and execute/kill sub-processes. As an alternative to the relaxed mode, we also tried "Sandboxing off", but that doesn't help either (from CUPS scheduler/conf.h). typedef enum { CUPSD_SANDBOXING_OFF, /* No sandboxing */ CUPSD_SANDBOXING_RELAXED, /* Relaxed sandboxing */ CUPSD_SANDBOXING_STRICT /* Strict sandboxing */ } cupsd_sandboxing_t; Test code We can provide a simplified version of our backend that demonstrates the issue if required Questions Has the CUPS sandbox relaxing changed? According to the CUPS man pages (cups-files.conf(5)), "Sandboxing relaxed" should still work as before. If this is the new intended behavior, what are the other options/directives we can use to relax the limitations on CUPS backends and filters?
4
16
468
3d
iOS 26 fails to automatically switch to [system settings - personal hotspot ] directly from application ]
On iOS 18 and lower version, my application supports automatically switching to [System settings - Personal Hotspot] directly. But on iOS 26, my application will be redirected to [System settings- Apps]. Does iOS 26 disable the behavior of directly jumping to the system hotspot page? If support, could you share the API for iOS 26?
7
0
292
3d
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
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
363
4d
Application being blocked with time limit even though allowed
Hey there, We are being incorrectly blocked by Time Limits since the iOS 26 update released earlier this year. We are receiving complaints from parents that set a screentime limit for "All apps", and then add an exception for us, that they are still getting blocked by the OS after a certain period of time. While we originally thought this was fixed in 26.1, we have recently been made aware it still occurs. Has anyone else experienced this issue? Is there something we can do from our side to protect ourselves from this? Telling customers to remove their "All app" limit isn't really practical given our customer base, so we're looking to see if there's something on Apple's end or our end that can alleviate this.
1
0
59
4d
eventDeviceActivityThreshold from DeviceActivity will fire early and block apps after downloading iOS 26.2
A screen time app I'm making has started telling users that their limit was reached even when they're far below their limit for the day (sometimes even at 0 minutes for the day). This issue only started happening after upgrading my software to iOS 26.2. Is this happening to anyone else? If so how have you found any solutions or does anyone know of any changes that could be causing this? Any help would be appreciated.
1
0
113
4d
Activating a Container App from a Custom Keyboard Extension to Enable Continuous Voice Input While Preserving the Original Typing Context
Project Background: I am developing a third-party custom keyboard for iOS whose primary feature is real-time voice input. In my current design, responsibilities are split as follows: 1. The container (main) app is responsible for: Audio recording Speech recognition (ASR) 2. The keyboard extension is responsible for: Providing the keyboard UI Initiating the voice input workflow Receiving transcription results via an App Group Inserting recognized text into the active text field using textDocumentProxy.insertText(_:) Intended User Flow The intended workflow is: The user is typing in a third-party app (for example, WeChat) using my custom keyboard. The user taps a “Voice Input” button in the keyboard extension. The keyboard extension activates the container app so that audio recording and ASR can begin. After recording has started, control returns to the original app where the user was typing. The container app continues running in the background, maintaining active audio recording and ASR. Recognized text is continuously streamed back to the keyboard extension and inserted into the current cursor position in real time. Observed Industry Behavior Some popular third-party keyboards on iOS, such as WeChat Keyboard and Doubao Keyboard, appear to provide a similar user experience in which: Voice input can be initiated directly from the keyboard while typing in another app. The user remains (or returns) in the original typing context after voice input starts. Speech recognition continues and text is streamed into the active text field without interrupting the typing experience. I would like to better understand how this type of workflow aligns with iOS platform capabilities and supported APIs. My Questions Is it supported by iOS public APIs for a custom keyboard extension to activate its container app to start audio recording and ASR, then return to the original host app while the container app continues recording and performing ASR in the background? If this workflow is not supported, are there any Apple-recommended or supported alternative architectures for achieving a similar user experience, especially when audio recording and ASR logic are currently implemented in the container app rather than in the keyboard extension? Goal My goal is to design a solution that is fully compliant with iOS public APIs and platform constraints, while providing a real-time voice input experience comparable to existing third-party keyboards on the platform. Any guidance on supported APIs, recommended architectures, or relevant documentation would be greatly appreciated.
3
0
104
4d
Text filtering: behavior of current message is affected by behavior of past message from same origin
If there is this situation: A text message is sent from a sender and gets classified as junk (by a text filtering extension) with the result that it gets send to the spam folder as expected. A text message with different content is sent from the same sender and gets classified as allowed, however it also gets sent to the spam folder. If the above is repeated but after step 1 the message is deleted, then in step 2 the message doesn't get sent to the spam folder. So the presence of the message from step 1 being in the spam folder is having an effect on the behavior of step 2. Expected beahavour (if so, why?), or a defect?
0
0
28
4d