Explore the core architecture of the operating system, including the kernel, memory management, and process scheduling.

Posts under Core OS subtopic

Post

Replies

Boosts

Views

Activity

Core OS Resources
General: DevForums subtopic: App & System Services > Core OS Core OS is a catch-all subtopic for low-level APIs that don’t fall into one of these more specific areas: Processes & Concurrency Resources Files and Storage Resources Networking Resources Network Extension Resources Security Resources Virtualization Resources Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com"
0
0
79
Jul ’25
How to find Siri response window by bundle id
Hi, experts, I want to find Siri response window by bundle id and use it for checking or printing, here is my example code: XCUIDevice.shared.siriService.activate(voiceRecognitionText: "call mom") let siriApp = XCUIApplication(bundleIdentifier: "XXX") // Print out text from siriApp, // expecte print: "Sorry, I can't make a phone call with your iphone." Where should I put into XXX? I tried "com.apple.SiriViewService", "com.apple.siri.velocity", "com.apple.springboard' but nothing work Any suggestion appreciated, thanks!
0
0
4
5h
iOS swift BLE updateValue() without PeripheralManagerIsReady
I want to fully control the BLE send timing myself, instead of relying on the iOS system. When I try to send a large data block using BLE (i.e., splitting it and sending multiple times), I follow Apple’s official guide. However, after the first successful updateValue() call in my loop, the second call always fails unless I wait for the peripheralManagerIsReady(toUpdateSubscribers:) callback. This callback timing is managed by the system, so I can’t control exactly when I can send the next packet. If I send data manually by clicking a button, updateValue() always returns true—even if I add a long delay (like sleep(10)) between calls. But in a loop, after the first send, updateValue() returns false until the thread leaves or the callback occurs. I suspect this is a thread or queue issue blocking subsequent sends. I also tried using DispatchQueue.global().async {} in the loop, but the result is the same. Is there any way to fully control when I call updateValue(), without waiting for peripheralManagerIsReady()? Or is this a limitation of iOS BLE? Thank you!
0
0
78
1d
Virtualization Resources
Virtualization framework is a high-level API to create macOS and Linux virtual machines. Hypervisor is a low-level API to build virtualization solutions without the need for a kernel extension. If you’re interesting in containers on the Mac, check out the Containerization package and its associated container tool. Virtualization: Forums subtopic: App & System Services > Core OS Forums tag: Virtualization Virtualization framework documentation Using iCloud with macOS virtual machines documentation article Use iCloud on a virtual machine support article Running macOS in a virtual machine on Apple silicon sample code Running Linux in a Virtual Machine sample code Running GUI Linux in a virtual machine on a Mac sample code Building macOS apps with Xcode 26 on macOS 26 VM forums thread — This thread describes how the development experience in VMs has improved recently, and one remaining issue that you might bump in to. Hypervisor: Forums subtopic: App & System Services > Core OS Forums tag: Hypervisor Hypervisor framework documentation Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com"
0
0
52
3d
Memory leak in case of using IOHIDManager
Hello, The following simple code leads to memory leak IOHIDManagerRef hidManager = IOHIDManagerCreate(kCFAllocatorDefault, kIOHIDManagerOptionNone); ... IOHIDManagerSetDeviceMatching(hidManager, matchingCriteria); CFRelease(matchingCriteria); if (IOHIDManagerOpen(hidManager, kIOHIDOptionsTypeNone) != kIOReturnSuccess) { return 1; } ... if (IOHIDManagerClose(hidManager, kIOHIDOptionsTypeNone) != kIOReturnSuccess) { return 1; } CFRelease(hidManager); The following leaks report: STACK OF 2 INSTANCES OF ROOT LEAK: : 17 dyld 0x19b3aeb98 start + 6076 16 a.out 0x1027147e4 main + 200 15 com.apple.framework.IOKit 0x19f6781b8 __ApplyToDevices + 100 14 com.apple.CoreFoundation 0x19b801cfc CFSetApplyFunction + 224 13 com.apple.CoreFoundation 0x19b801dc0 CFBasicHashApply + 148 12 com.apple.CoreFoundation 0x19b801f94 __CFSetApplyFunction_block_invoke + 28 11 com.apple.framework.IOKit 0x19f6784c8 __IOHIDManagerDeviceApplier + 76 10 com.apple.framework.IOKit 0x19f5e18ec IOHIDDeviceOpen + 56 9 com.apple.iokit.IOHIDLib 0x102992cf0 0x102984000 + 60656 8 com.apple.iokit.IOHIDLib 0x10298d8ec 0x102984000 + 39148 7 com.apple.iokit.IOHIDLib 0x10298d3e8 0x102984000 + 37864 6 com.apple.framework.IOKit 0x19f5d5760 IORegistryEntrySearchCFProperty + 420 5 com.apple.framework.IOKit 0x19f5d66b4 IOCFUnserializeBinary + 480 4 com.apple.CoreFoundation 0x19b7d9ef0 __NSArrayM_new + 60 3 com.apple.CoreFoundation 0x19b7c2378 __CFAllocateObject + 20 2 libobjc.A.dylib 0x19b35b7ec class_createInstance + 76 1 libsystem_malloc.dylib 0x19b56ba40 _calloc + 88 0 libsystem_malloc.dylib 0x19b581270 _malloc_zone_calloc_instrumented_or_legacy + 132 _ I have not found any mention in documentation what should be released before/after the call IOHIDManagerClose. Are there any advices? Thank you in advance!
1
0
38
3d
Sleep State Notification Inconsistencies on MacBook Devices When Unplugged
There are inconsistent behaviors in sleep/wake notification callbacks across different MacBook devices and macOS versions when the device is not connected to power, with or without external displays, entering sleep mode by closing the lid, and waking up from sleep by opening the lid. When monitoring the following Objective-C notifications: NSWorkspaceScreensDidSleepNotification NSWorkspaceScreensDidWakeNotification NSWorkspaceWillSleepNotification NSWorkspaceDidWakeNotification Different devices exhibit varying notification trigger patterns: Some devices trigger all four notifications properly Some devices fail to trigger NSWorkspaceScreensDidWakeNotification Some devices fail to trigger NSWorkspaceDidWakeNotification Some devices fail to trigger NSWorkspaceWillSleepNotification These inconsistencies make it challenging to implement reliable sleep/wake detection logic across different MacBook models and macOS versions.
1
0
38
4d
Macos File open, close, copy, paste event notification
working on app like dropbox and making a feature like dropbox offline download, so when a file is added from a system it will download in other system but as a placeholder file once user double click or open that file or after copy pasting to another location on demand need to download the file and after that do the action open or paste so here I need file open event and paste event to be block untill it downloads. how to achieve this uing obj c, c , c++ or swift
2
0
43
5d
BLE LE Privacy Issue with iPad A16 (11th Gen?) – Peripheral Not Responding After MTU Exchange
Hi all, I'm encountering a BLE issue with the newer iPad models featuring the A16 Bionic chip (e.g., iPad 11th Gen). I have an iOS application that runs as a BLE peripheral, and it used to work flawlessly with various central devices. 📱 Device Specs Model: iPad (A16 Bionic) OS: iPadOS 18.6 ✅ Working Setup (Before): iOS app acts as a BLE peripheral (advertises a custom service). Central device (Windows/Linux/Android) could: Discover advertisements Connect to the peripheral Exchange MTU Discover GATT services Communicate bidirectionally ❌ Issue with iPad A16 (Newer Devices): Central device receives advertisements and connects. MTU exchange request is sent by central, but iPad A16 does not respond. The BLE link remains active but only transmits empty PDUs, and communication never proceeds. Same issue observed with third-party apps like BLE HID keyboard — they also fail to connect or communicate on A16 iPads but work on older devices (e.g., iPad 10th Gen and below). 🔍 Debugging So Far: Confirmed that MTU Exchange Request is compliant (Client Rx MTU = 527). Works fine with iPad 10th Gen and earlier. Works with Android, Windows, and even Linux central stacks with older iPads. A16-based iPads seem to silently drop or ignore the MTU request. 🧪 Suspected Cause: Possible regression or behavioral change in LE Privacy handling on newer iPads. Possibly tied to iPadOS version or Bluetooth controller firmware. 🙏 Looking for: Anyone else facing similar BLE issues on iPads with A16? Any known changes to BLE LE Privacy, MTU negotiation, or connection behavior in iPadOS on A16 devices? Any workarounds, entitlements, or configuration changes that fixed the issue? Would appreciate any insights or suggestions. Thank you!
2
0
32
5d
storeuid Process Incorrectly Appearing as Frontmost Window
After updating to macOS 15.6, the system process storeuid (located at /System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Resources/storeuid.app/Contents/MacOS/storeuid) is incorrectly being detected as a frontmost window with GUI elements, despite being a background system process without a user interface. Product Information Product: macOS Version: 15.6 Build Number: [Please add your build number - you can find this in Apple Menu > About This Mac] Description of the Issue The storeuid process, which is part of the CommerceKit framework and handles App Store-related functionality, is now being reported by the Core Graphics Window Server as having windows in the normal window layer (layer 0). This is causing issues for: Window management applications that enumerate visible windows Scripts using CGWindowListCopyWindowInfo that filter for on-screen windows Applications that manage window focus and visibility Previously, this process operated entirely in the background without registering as having GUI windows. This change appears to be a regression introduced in macOS 15.6. Steps to Reproduce Update to macOS 15.6 Use Core Graphics APIs to enumerate windows: import Quartz window_list = Quartz.CGWindowListCopyWindowInfo( Quartz.kCGWindowListOptionOnScreenOnly | Quartz.kCGWindowListExcludeDesktopElements, Quartz.kCGNullWindowID ) Filter for windows with kCGWindowLayer == 0 and kCGWindowOwnerName != "Window Server" Observe that storeuid appears in the results despite having no visible interface Expected Behavior The storeuid process should not appear in window enumeration results for visible windows, as it is a background system service without a user interface. Actual Behavior The storeuid process appears as if it has visible windows, causing it to be included in window management operations and potentially interfering with applications that manage window visibility and focus.
1
0
38
5d
iOS 26
After using the iOS 26 for a couple of weeks I’ve seen that the phone’s battery life is reduced and also I’ve seen the phone is lagging more gets heated a lot more often.
0
0
32
6d
Matter over wifi without matter client developer profile
My iOS app uses the Matter framework to commission devices over Wi-Fi (not Thread). With the Matter Client Developer Profile installed, commissioning works perfectly. However, in TestFlight builds without the profile, commissioning fails, even though the app includes the Matter Allow Setup Payload capability and the following in Info.plist: <key>NSBonjourServices</key> <array> <string>_matter._tcp</string> <string>_matterc._udp</string> <string>_matterd._udp</string> </array> How can I enable Matter device commissioning using the Matter framework in production/TestFlight builds without the Matter Client Developer Profile? Please provide guidance or specific configurations needed for production environments
3
0
58
6d
Can SMAppService Daemon replace SMJobBless for exclusive HID capture from keyboards?
To gain exclusive access to keyboard HID devices like Amazon Fire Bluetooth remote controls, my app has been installing a privileged helper tool with SMJobBless in the past. The app - which also has Accessibility permissions - then invoked and communicated with that helper tool through XPC. Now I'm looking into replacing that with a daemon installed through the newer SMAppService APIs, but running into a permission problem: If I try to exclusively open a keyboard HID device from the SMAppService-registered XPC service/daemon (which runs as root as seen in Activity Monitor), IOHIDDeviceOpen returns kIOReturnNotPermitted. I've spent many hours now trying to get it to work, but so far didn't find a solution. Could it be that XPC services registered as a daemon through SMAppService do not inherit the TCC permissions from the invoking process (here: Accessibility permissions) - and the exclusive IOHIDDeviceOpen therefore fails?
6
0
93
6d
Duplicate timestamps in UWB (Nearby Interaction) updates.
Hello, We are using NearbyInteraction to get the distance between an iPhone and Apple Watch. Overall it works pretty well, but we are noticing that it sometimes produces duplicate (or near duplicate) timestamps. Here is an example of the data produced (time is in seconds since scan start): 0: 1.882862 1: 1.88296 2: 1.981459 3: 1.981495 4: 2.080235 5: 2.080397 As you can see there's a pattern where two updates have very similar timestamps. This seems to only happen when using 2 U2 chips together. Is this an expected behavior? If so, why? The timestamps are calculated using: let bootTimeInterval = bootTime() func bootTime() -> TimeInterval { let uptime = ProcessInfo.processInfo.systemUptime let nowTimeIntervalSince1970 = Date().timeIntervalSince1970 return nowTimeIntervalSince1970 - uptime } // Then later on each NISession update... let timestamp = bootTimeInterval + ProcessInfo.processInfo.systemUptime The app produces unix timestamps but I have converted them to be relative to the start of the scan to be easier to read. Note that bootTimeInterval is calculated once at the start of the app, so all timestamps produced on a UWB update should be using the same clock. Things I've confirmed: The NISession is only able to connect to one device, so it is not coming from a different device. Any feedback is appreciated, thank you.
0
0
32
6d
Downloading folder having large files times out
I have FileProvider based MacOS application, where user is trying to copy the folder having mix of small and large files. Large files are having size ~ 1.5 GB from FileProvider based drive to locally on Desktop. Since the folder was on cloud and not downloaded the copy action triggered the download. Small files were downloaded successfully however during large file download the URLSession timed out. We are using default timeout for URLSession which is 1 min. I tried to capture logs Console.app where i found FileProvider daemon errors. PFA Solutions tried so far: Increased timeout for URLSession from 5 to 10 mins - configuration.timeoutIntervalForRequest Set timeout for resource - configuration.timeoutIntervalForResource It happens when we have low network bandwidth. Network connectivity is there but the bandwidth is low. Any clue by looking at these errors?
1
0
77
1w
File Provider UI Extension no longer supported in Xcode?
I am writing a file provider extension for Finder. I have things working to some extent and I want to add context menu which will 1/ Open an HTTP URL based on the item selected. However, this is not allowed in the code as there is no context for it to open the URL 2/ Documentation (sparse) online talks about the FileProvider UI Extension but that does not seem to be a target 3/ If I use the FinderSyncExtension, it seems it is not fully reliable with the NSReplicatedFileProviderExtenion, as that extension takes precedence and the FinderSyncExtension is not enabled. My question, what is the best way for the FileProviderExtension to do some UI work? like open a URL, show alert messages etc?
1
0
69
1w
Selecting a Default Contactless App Is Broken in iOS 18
My iOS application has both the “Default Host Card Emulation (HCE) App” and “Host Card Emulation (HCE)” entitlements. I was previously able to choose my app as the default contactless app in Settings, but after upgrading to iOS 18.6, my app no longer appears - Apple Wallet is now the only option. I’m located in the European Economic Area, and both my Apple ID and developer team are registered in the EU. Here is my entitlements file: &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt; &lt;plist version="1.0"&gt; &lt;dict&gt; &lt;key&gt;com.apple.developer.nfc.hce&lt;/key&gt; &lt;true/&gt; &lt;key&gt;com.apple.developer.nfc.hce.default-contactless-app&lt;/key&gt; &lt;true/&gt; &lt;key&gt;com.apple.developer.nfc.hce.iso7816.select-identifier-prefixes&lt;/key&gt; &lt;array&gt; &lt;string&gt;A000000004&lt;/string&gt; &lt;string&gt;325041592E5359532E4444463031&lt;/string&gt; &lt;string&gt;A000000003&lt;/string&gt; &lt;/array&gt; &lt;/dict&gt; &lt;/plist&gt;
1
0
60
1w
compact sparsebundle
I used the following commands to create two sparsebundles, with the only difference being that one is 100GB and the other is 200GB. hdiutil create -size 100g -fs APFS -volname test1 -type SPARSEBUNDLE -encryption test1.sparsebundle hdiutil create -size 200g -fs APFS -volname test2 -type SPARSEBUNDLE -encryption test2.sparsebundle Then, I created a 5GB random file in each of their mounted volumes: dd if=/dev/urandom of=/Volumes/test1/random_5gb_file bs=1m count=5120 dd if=/dev/urandom of=/Volumes/test2/random_5gb_file bs=1m count=5120 Afterward, I deleted them: rm /Volumes/test1/random_5gb_file rm /Volumes/test2/random_5gb_file Then, after waiting a while, I unmounted and remounted them. I noticed that the 100GB test1.sparsebundle automatically reclaimed the space, while the 200GB test2.sparsebundle still retained 5.4GB of usage. Later, I used: hdiutil compact test2.sparsebundle But no space was reclaimed. Now, I want to know what the difference is between the 100GB and 200GB sparsebundles, and how I can reclaim the space in the 200GB test2.sparsebundle.
7
0
70
1w
block microphone and speakers due to security reason
Hello, As part of developing a DLP system, the microphone and speakers should be blocked. My solution involves muting devices by changing the property kAudioDevicePropertyMute. However, this solution allows the user to unmute the device, and the app must implement a property listener to mute the device again. The problem is that muting takes some time and the device is temporarily unmuted. Admittedly, it takes less than a second, but nevertheless, it appears insecure. Is there an Apple-recommended approach to implement such blocking more securely? Maybe some solution which is based on IOKit. Thank you in advance, Pavel
2
0
55
1w