Posts under App & System Services topic

Post

Replies

Boosts

Views

Activity

CMMotionActivityManager: past activities move in time between queries (watchOS 27, Apple Watch Ultra 4)
When I query the same past period with CMMotionActivityManager.queryActivityStarting(from:to:to:) at two different times, the second result contains the same activities, but their startDate values are earlier. Setup Apple Watch Ultra 4 (Watch8,1), watchOS 27.0.1 My app reads the activity history a few minutes after it happens and stores it. Later it queries the same period again and compares the results. What I see The activity types and durations do not change. Whole blocks of history move back in time by a constant offset. Example from today's query, compared with the stored values: Period of the dataOffsetNov 8, 12:47 – 19:55−155 sNov 8, 19:57 – Nov 9, 17:18−95 sNov 9, 17:19 – now0 sYesterday at 17:19, the same Nov 8 evening data had an offset of 0 s. So the offset changes over time, not only with the age of the data. New steps add up: when a step occurs, all older history moves back by the same amount. Earlier I saw offsets of −60 s, −123 s, −177 s and −340 s. The stored values match HealthKit workout start and end times within about 8 s. The re-queried values do not (for example −52 s at the start of a run). timestamp of these activities is equal to startDate (seconds since 2001), so it does not help to match them. I did not see this on Apple Watch Ultra 3 with watchOS 27, but I have only one comparison from that watch. Questions Is startDate of a past CMMotionActivity expected to stay the same? If not, which event changes it, and is there a way to detect it? What is the recommended way to get stable times from the activity history? I log every query on the watch (all activities plus clock and battery state every 30 minutes), so I can share data or a sysdiagnose. I will also file a Feedback.
0
0
54
1w
macOS Open Directory: Does ODNodeCreateRecord cleanup preserve concurrent records?
We are designing a local, non-login service account provisioning process on macOS using the public Open Directory API. The documentation for ODNodeCreateRecord() states that if setting an initial attribute fails, the record is deleted and an error is returned. We need to ensure that a failed creation attempt cannot delete or modify a pre-existing record, including during concurrent record creation or replacement. Questions: When attribute initialization fails, is the internal cleanup guaranteed to target only the record instance created by that specific API call, rather than another record with the same name? Is this cleanup bound to a unique record identity or UUID, including if another process concurrently creates, removes, or replaces a record with the same name? Does the public API provide an atomic create-only guarantee that prevents changes to an existing record? If these guarantees are not provided, what supported API or provisioning approach should be used to avoid affecting pre-existing local Directory Services records? Our current plan uses the local /Local/Default Directory Services node for a dedicated service account, administrative change serialization, pre-creation collision checks, and post-operation identity verification. We understand that these checks do not themselves prove atomicity or race-free cleanup. We would appreciate clarification of the supported API guarantees, specifically for macOS 15. Thank you.
3
0
74
1w
NETransparentProxyManager: saving isOnDemandEnabled = true disables On-Demand on other proxies
On macOS, multiple NETransparentProxyManager (NEAppProxyProvider) configurations from different vendors can be enabled (isEnabled = true) and run simultaneously. However, we discovered that when one NETransparentProxyManager configuration calls saveToPreferencesWithCompletionHandler: with isOnDemandEnabled = true, /usr/libexec/nehelper (NEConfigurationManager) silently modifies any other enabled NETransparentProxyManager configuration in /Library/Preferences/com.apple.networkextension.plist and flips its OnDemandEnabled to false (and nesessionmanager logs Resetting VPN On Demand and marks the other session not-kernel-activated). Unlike NEVPNManager.isEnabled (which documents mutual exclusion for personal VPNs), NETransparentProxyManager is designed so multiple transparent proxies can coexist simultaneously, and neither NETransparentProxyManager.h nor NEVPNManager.h documents that isOnDemandEnabled is mutually exclusive across coexisting transparent proxy configurations. Root Cause Observed in NetworkExtension.framework When inspecting -[NEConfigurationManager saveConfigurationToDisk:updateSCPreferences:currentSignature:userUUID:notifyNow:isUpgrade:], when iterating over existing NEConfiguration objects of the same grade: If [[newConfig VPN] isEnabled] && [[otherConfig VPN] isEnabled] && [[newConfig VPN] isOnDemandEnabled] && [[otherConfig VPN] isOnDemandEnabled], NEConfigurationManager invokes: +[NEConfigurationManager disableConfiguration:otherConfig onDemandOnly:YES] disableConfiguration:onDemandOnly:YES calls [[otherConfig VPN] setOnDemandEnabled:NO], even when both configurations are NETransparentProxyManager (TunnelType == 2). Real-World Impact When two enterprise security products that both use NETransparentProxyManager are installed on the same Mac: Both configure isEnabled = true, onDemandRules = [NEOnDemandRuleConnect()], and isOnDemandEnabled = true. Whenever Proxy A saves its preferences, nehelper silently flips Proxy B's isOnDemandEnabled to false (and vice versa). After a reboot or network transition where Proxy B's initial startVPNTunnel fails while Wi-Fi is still associating and Proxy B relies on VPN On Demand (NEOnDemandRuleConnect) to start its NEAppProxyProvider once network connectivity comes up, macOS never starts Proxy B because its isOnDemandEnabled flag was cleared. Minimal Reproducer (Swift) Compile this minimal CLI inside an app bundle signed with the com.apple.developer.networking.networkextension = ["app-proxy-provider"] entitlement: import Foundation import NetworkExtension let args = CommandLine.arguments let name = args.count > 1 ? args[1] : "PocProxyA" let action = args.count > 2 ? args[2] : "status" DispatchQueue.main.async { NETransparentProxyManager.loadAllFromPreferences { managers, error in if let error = error { print("[\(name)] loadAllFromPreferences error: \(error)") exit(1) } let all = managers ?? [] let existing = all.first(where: { $0.localizedDescription == name }) if action == "status" { if let mgr = existing { print("[\(name)] -> isEnabled=\(mgr.isEnabled), isOnDemandEnabled=\(mgr.isOnDemandEnabled), rulesCount=\(mgr.onDemandRules?.count ?? 0)") } else { print("[\(name)] -> not found") } exit(0) } if action == "remove" { guard let mgr = existing else { exit(0) } mgr.removeFromPreferences { err in print("[\(name)] removed (err=\(String(describing: err)))") exit(0) } return } // action == "save" let mgr = existing ?? NETransparentProxyManager() let proto = (mgr.protocolConfiguration as? NETunnelProviderProtocol) ?? NETunnelProviderProtocol() proto.providerBundleIdentifier = "com.example.poc.extension" proto.serverAddress = "127.0.0.1" mgr.protocolConfiguration = proto mgr.localizedDescription = name mgr.isEnabled = true mgr.onDemandRules = [NEOnDemandRuleConnect()] mgr.isOnDemandEnabled = true print("[\(name)] Saving NETransparentProxyManager with isEnabled=true, isOnDemandEnabled=true...") mgr.saveToPreferences { err in if let err = err { print("[\(name)] saveToPreferences error: \(err)") exit(1) } print("[\(name)] saveToPreferences succeeded! isEnabled=\(mgr.isEnabled), isOnDemandEnabled=\(mgr.isOnDemandEnabled)") exit(0) } } } RunLoop.main.run()Reproduction Output Running save on PocProxyA, then save on PocProxyB, and checking status on both: === Step 1: PocProxyA saves isOnDemandEnabled = true === [PocProxyA] Saving NETransparentProxyManager with isEnabled=true, isOnDemandEnabled=true... [PocProxyA] saveToPreferences succeeded! isEnabled=true, isOnDemandEnabled=true [PocProxyA] -> isEnabled=true, isOnDemandEnabled=true, rulesCount=1 === Step 2: PocProxyB saves isOnDemandEnabled = true === [PocProxyB] Saving NETransparentProxyManager with isEnabled=true, isOnDemandEnabled=true... [PocProxyB] saveToPreferences succeeded! isEnabled=true, isOnDemandEnabled=true === Step 3: Check BOTH configurations after PocProxyB saved === [PocProxyA] -> isEnabled=true, isOnDemandEnabled=false, rulesCount=1 [PocProxyB] -> isEnabled=true, isOnDemandEnabled=true, rulesCount=1 === Step 4: PocProxyA saves isOnDemandEnabled = true again === [PocProxyA] Saving NETransparentProxyManager with isEnabled=true, isOnDemandEnabled=true... [PocProxyA] saveToPreferences succeeded! isEnabled=true, isOnDemandEnabled=true === Step 5: Check BOTH configurations after PocProxyA saved === [PocProxyA] -> isEnabled=true, isOnDemandEnabled=true, rulesCount=1 [PocProxyB] -> isEnabled=true, isOnDemandEnabled=false, rulesCount=1Questions Is disableConfiguration:onDemandOnly:YES stripping isOnDemandEnabled across coexisting NETransparentProxyManager (TunnelType = 2) configurations a bug in NEConfigurationManager, or an intentional limitation? Is there a recommended way for two coexisting NETransparentProxyManager configurations from different vendors to both use On-Demand without disabling each other's isOnDemandEnabled flag on saveToPreferences? Filed in Feedback Assistant as FB25463155.
3
2
365
1w
Supported sandbox approach for cross-app window positioning and resizing
I am developing a macOS window-management utility for a new Mac App Store submission, targeting macOS 13+ on Apple silicon and supported Intel Macs. Its core function is to move and resize windows belonging to other, unmodified applications, in response to explicit menu commands, registered keyboard shortcuts, or optional edge-drag snapping. The current unsandboxed engineering implementation uses public Accessibility APIs: AXUIElementCreateApplication, AXUIElementCopyAttributeValue / AXUIElementCopyMultipleAttributeValues for window geometry, AXUIElementCopyElementAtPosition for drag targeting, and AXUIElementSetAttributeValue for AXPosition and AXSize. It requires explicit Accessibility consent. Window information is processed locally; the app does not transmit it. I understand that App Review Guideline 2.4.5(i) requires App Sandbox and that “Protecting user data with App Sandbox” lists assistive Accessibility API use as incompatible. The DTS answer in thread 789663 also explains that sandboxed apps cannot use Accessibility APIs, while noting that some use cases have alternatives. For this specific cross-application positioning/resizing use case: Is there a currently supported public API or documented, requestable entitlement that permits it in a newly submitted sandboxed Mac App Store app? If a supported alternative exists, what API/architecture and minimum OS requirements apply, including any approval process? If there is no supported route, can you confirm that this functionality cannot currently be delivered within the described sandboxed Mac App Store constraints? I am seeking a supported architecture for controlling other apps’ windows. The unsandboxed tests establish functionality only; they do not establish sandbox compatibility or App Review eligibility. References: https://developer.apple.com/app-store/review/guidelines/#hardware-compatibility https://developer.apple.com/documentation/security/protecting-user-data-with-app-sandbox https://developer.apple.com/forums/thread/789663
5
0
183
1w
A logging NWProtocolFramerImplementation-conforming type
This is an extension of https://developer.apple.com/forums/thread/854016 I was wondering if there's a way to print out the bytes passed-through so I can check that framer's implementation. Is there an existing type for this? Or would I need to introduce one? One issue is as a base diagnosing type, I can only check this new framer for correctness through inspection. Another is if using String conversion functionality takes too much resources for a type that may be called alot. My current idea is making an inline-array of 1024 bytes, write the UTF-8 representation directly, wrapping it with a no-allocation NSString, then passing that to the logging infrastructure.
1
0
71
1w
NEAppPushProvider times out connecting to a server on a routed subnet, while the containing app connects fine
We use Local Push Connectivity (NEAppPushProvider, matchSSIDs set) to receive notifications from an on-premise MQTT broker over WebSocket (wss://host:port/mqtt). iPhone on Wi-Fi, VLAN A (SSID matches matchSSIDs) Server on wired VLAN B, routing and firewall rules allow VLAN A → VLAN B on that port Result: the containing app, in the foreground, connects successfully to wss://<VLAN B IP>:<port>/mqtt. At the same moment, the app push provider (URLSessionWebSocketTask to the exact same URL) fails with "The request timed out". The provider starts normally (start() is called). When the server has an address on the Wi-Fi subnet (VLAN A), the provider connects without any issue. Is the app push provider restricted to servers on the local subnet of the matched Wi-Fi network? If so, is this documented anywhere? If not, what could prevent the provider from reaching a routed address that the app itself can reach? iOS version: 27.0.1 device : iPhone 13
1
0
103
1w
iPhone entitlement for bounded Bluetooth scanning while the screen is off?
We develop an iPhone app that performs user-started Bluetooth discovery for 1–5 minutes, with visible progress, cancellation and a Live Activity. We need to discover arbitrary BLE advertisers, including nonconnectable devices, and receive repeated RSSI samples during that bounded scan. The app declares bluetooth-central, creates its central manager before starting the Live Activity in the foreground, and scans with nil service filters and duplicates enabled. Discovery continues behind another app while the display is on, but saved observation timestamps stop advancing after the phone is locked with its display off. We understand the restriction described in https://developer.apple.com/forums/thread/815189. Is there an iPhone managed entitlement or supported program that permits this use case? If so, what are the eligibility criteria and application route? We also found com.apple.developer.bluetooth-central-screen-off-scanning mentioned in https://developer.apple.com/forums/thread/835684. That discussion concerns watchOS medical use; we are asking whether any corresponding iPhone capability exists. If no route exists, should we submit an enhancement request through Feedback Assistant?
1
0
78
1w
Supported quarantine-preservation contract for sandboxed file operations
Traverse is a sandboxed macOS file manager with user-selected read/write access. For an input already carrying the complete raw com.apple.quarantine value 0086;timestamp;agent;event, a fresh private copy may receive 0082 with the remaining fields equal. This asks about the input state, without claiming a verified creation recipe for the retained test file. Our security requirement is equality of the entire original raw value before and throughout the interval when the destination name is reachable, including interruption immediately after publication. Is there a documented, supported App Sandbox API or operation that guarantees this for (a) a same-volume, same-inode move from private staging to an absent user-selected name, (b) a new file or extracted ZIP member, and (c) native Trash followed by restoration? If so, what OS/volume/entitlement scope and exact guarantee apply, and can the raw flags and event field be preserved without removing or replacing an OS-assigned quarantine mark? If no such public contract exists, please confirm that raw byte equality cannot be claimed from quarantineProperties, FileManager.trashItem, NSWorkspace.recycle, NSFileCoordinator, rename, clone/copy, or post-operation readback alone. We are not requesting a bypass of quarantine or a weaker substitute for 0086.
1
0
85
1w
Critical Regression: smbfs 7.0 introduces a crtitical bug regarding symlinks
Apple feedback FB25355124 The SMB client no longer accepts reads to symlinks that are an absolute path to a network volume or a symlink that contains a (..) in the relative path. Reproduction steps on an SMB mount with this file structure: dir a.txt Run this command from inside of "dir": ln -s my-link ../dir/a.txt Attempt to read that symlink: cat ./my-link Which results in this error: cat: link: Invalid argument which is translating to an EINVAL getting returned from the SMB client. Same behavior was observed when making a symlink with an absolute path: ln -s my-link /Volumes/Example/dir/a.txt The server is responding successfully to the IOCTL command but the client is still rejecting the request with that error. This behavior was not observed in macOS 26.6.2 (smbfs 6.0.1) as well as previous versions of macOS.
4
5
359
1w
CloudKit JS with Advanced Data Protection: supported access to private encrypted data?
Does CloudKit JS support private encrypted records and assets when Advanced Data Protection is enabled? Our test account has ADP and iCloud.com web access on. Native CloudKit sync succeeds, but Apple’s browser sign-in reports Authentication Error before our callback. The container, environment, allowed origin and callback have been verified. A separate native-generated web token authenticates one identity request, while a known private-record lookup returns ACCESS_DENIED. Is there a supported trusted-device temporary-approval flow for third-party CloudKit JS, or another supported approach that keeps ADP enabled?
0
1
129
1w
PushToTalk: headset "play" never starts a transmission (goes to Music) — and is PTT appropriate for voice capture to an assistant?
Hi, We're building a voice assistant app. The user speaks to the assistant through a Bluetooth earset; the app records the speech, transcribes it and the assistant acts on it. We want the user to start and stop that capture from the earset button while the iPhone stays locked, without the Phone call UI. We prototyped this with the PushToTalk framework and have two questions. 1. Headset play button does not reach our joined PTT channel Setup (minimal test app, nothing else running): iPhone 14 Pro Max, iOS 26.6.1 (23G83). Entitlements: com.apple.developer.push-to-talk, aps-environment. Background modes: push-to-talk, audio, bluetooth-central. PTChannelManager.channelManager(delegate:restorationDelegate:) → requestJoinChannel in the foreground → didJoinChannel → setAccessoryButtonEventsEnabled(true, channelUUID:) completes without error. Audio session configured once before joining: .playAndRecord, options .allowBluetoothHFP; tried mode .default and .voiceChat. We never call setActive; audio starts only in didActivate (AVAudioEngine). What works: The system PTT UI talk button, phone locked: didBeginTransmitting → didActivate (earset HFP 16 kHz) → audio recorded. A Lock Screen / Control Center control running an intent that adopts PushToTalkTransmissionIntent, phone locked: one tap starts, one tap ends; 5+ minute transmissions; app cold-launched by the system when needed. What doesn't: pressing the earset's play/pause button (single press) while joined and idle never produces didBeginTransmitting. Same result with AirPods and with a third-party A2DP/HFP earset, locked and unlocked, Music app closed or not. mediaremoted logs, for every press: mediaremoted: Received command from client <... bundleIdentifier = com.apple.BTAvrcp ...>: <... command = Play ...> mediaremoted: No context for context-sensitive command <... command = Play, SenderBundleIdentifier = <com.apple.BTAvrcp> ...> mediaremoted: Destination app com.apple.Music not available for command <... command = Play ...> mediaremoted: Sending previously queued command <... command = Play ...> (Music is launched and plays)In thread 804205 you described this path as pressing "play" on an A2DP/HFP accessory "that's currently in playback mode". Questions: a) What exactly must be true for a headset AVRCP Play/Pause to be routed to the PTT system instead of the now-playing app? Is "playback mode" a state of our channel (e.g. only while setActiveRemoteParticipant is set / audio is playing), of the accessory, or of the route? b) Is an idle joined channel (no remote participant, nothing playing) expected to receive accessory events at all? c) Is a press-once start / press-once end mapping supported for accessory events, or is it press-and-hold only? d) If headset buttons cannot start a transmission from idle, is the BLE path (requestBeginTransmitting from a CoreBluetooth event) the only supported option for an earset trigger? (Our earset exposes no BLE button characteristic, so that would require firmware changes.) 2. Is this an appropriate use of PushToTalk? The audio goes from the user to our assistant service (speech-to-text, then the assistant responds in the app or by voice). There is no second human on the channel. In thread 816408 you noted the voice communication frameworks "can't be used for any other purpose". Would capturing a user's spoken requests/notes for an AI assistant through PTT be considered a supported use, or is PTT limited to person-to-person communication? If it isn't, is there any supported API that lets a user start and stop audio capture with an earset or a Lock Screen control while the device stays locked? A sysdiagnose and the test project are available on request. Thanks!
1
0
139
1w
[macOS 27] Cannot receive 4096-byte packets over USB CDC-ACM (works in macOS 26)
Hello, I’m facing an issue with a custom USB CDC-ACM device after updating to macOS 27. The device sends 4096-byte packets, which were correctly received under macOS 26. Since I need to transfer large amounts of data, 4096 bytes was a good compromise between performance and reliability. However, now any packet larger than 1019 bytes is not received at all. Wireshark confirms that the packets are present on the USB bus, but neither Serial Tool nor my own software can see them. The device uses the AppleUSBACMData driver (CDC-Data interface, Full Speed USB, with bMaxPacketSize0=64). Fragmenting the incoming data into chunks of 1019 bytes or less works as a temporary fix, but it significantly reduces performance and is not a sustainable solution. I have three specific questions: Is there a hardcoded 1019-byte buffer limit in AppleUSBACMData or IOSerialFamily in macOS 27? Is this a known issue in macOS 27 with CDC-ACM devices? Should I consider writing a custom driver for my device instead of relying on Apple’s default AppleUSBACMData? Any help or insights would be greatly appreciated. Thanks!
1
0
48
1w
Vendor ID Approval
We are building an iPadOS app that requires a DriverKit USB transport dext, and we have been waiting on the restricted entitlement for over three weeks with no movement on any of our requests. Team ID: AKFY9W27HB Entitlements requested: com.apple.developer.driverkit and com.apple.developer.driverkit.transport.usb ┌────────────┬───────────────┬───────────┐ │ Request ID │ Requested │ Status │ ├────────────┼───────────────┼───────────┤ │ 633LBK79JF │ 25 July 2026 │ Submitted │ ├────────────┼───────────────┼───────────┤ │ 6N8PP3G6BA │ 6 August 2026 │ Submitted │ ├────────────┼───────────────┼───────────┤ │ Y8T72G8YJS │ 6 August 2026 │ Submitted │ └────────────┴───────────────┴───────────┘ All three are still showing "Submitted" with no response, the oldest for over three weeks. What we actually need is one configuration, not three grants. The three requests cover three vendor IDs, but a single dext has to match all of them simultaneously: 0x1452 (5202) 0x1343 (4931) 0x0D16 (3350) I believe this is the same situation as thread 826658 (https://developer.apple.com/forums/thread/826658), where multiple vendor ID requests were consolidated into a single entitlement configuration. If our three can be merged the same way, that is exactly what we need. Any guidance on the status of these three requests, or on consolidating them, would be much appreciated.
3
0
626
1w
Can macOS enforce a 512 MiB combined address-space cap before child code runs?
On Apple silicon macOS, is there a supported public mechanism that can enforce a hard combined mapped virtual address-space ceiling of 512 MiB for a parent process and its new child from the first charged creation step through loading the child's executable image, before the child runs any application code? The current investigation targets macOS build 26B123 on arm64. We need to know how the supported limit accounts for inherited maps, shared-region reservations and image mappings during process creation. If the supported route is to partition the ceiling between per-process limits, please specify whether the child limit applies before its first charged map and how a limit failure is reported. Please identify the public API or documentation, supported OS versions and required setup. A control that only applies to resident memory or starts after application code begins would not cover this question.
1
0
92
1w
Hard aggregate process-tree memory enforcement on macOS
Is there a publicly supported macOS API, entitlement, or framework capable of enforcing a hard 64 MiB aggregate memory ceiling across a process tree, including its supervisor, observer, and descendants? Enforcement must be established before workload execution, survive fork/exec, and remain effective if the controlling process crashes. We have examined per-process resource limits and process-memory reporting, but these do not establish the required aggregate guarantee. If supported, which API and enforcement mechanism should we use? If not, is there a documented platform limitation?
1
0
45
1w
"Why doesn't the earbud button start Push to Talk?"
Apple's documentation says that once an app joins a Push to Talk channel, pressing "play" on a headset should start recording. On my iPhone it doesn't. Both the M015(our earbud) and AirPods send the press to Apple Music instead. The phone's own log says "No context for this command", then opens Music. So we ask Apple: What exactly has to be true for the earbud press to reach Push to Talk instead of Music? Does it work at all when nothing is playing? Can one press start and the next press stop, or is it press-and-hold only? Is a Bluetooth data signal from the earbud the only other way?
1
0
109
1w
Software I/O Support in SCSIControllerDriverKit
I'm pleased to announce that the initial beta of macOS 27.3 (26C5035r) includes our support for software I/O in SCSIControllerDriverKit. The class reference has not yet been updated to include this, but it is described in the release notes: "SCSIControllerDriverKit now supports software controllers. A software controller declares itself by setting kIOPropertySoftwareIOKey (an OSBoolean, from <IOKit/storage/IOStorageControllerCharacteristics.h>) through UserSetHBAProperties(). The system honors this setting only before controller initialization completes, so it stays fixed for the life of the controller. Such a controller doesn’t create any DMA mappings, and your dext can access the data buffer associated with a particular I/O through the UserCopyDataBuffer API. (182426393) (FB23797269)" Clearing up a few details on that process: The property kIOPropertySoftwareIOKey ("Software I/O") is created and set to "false" when IOSCSIParallelInterfaceController is initially created. That means a DEXT can check for software I/O support by using CopyProperties() to look for that key, instead of relying on a system version check or similar side channel check. The kIOPropertySoftwareIOKey must be set before the controller initialization sequence begins. Changes to the value after that point will fail. If kIOPropertySoftwareIOKey has been properly set to "true", then fBufferIOVMAddr will be set to NULL. This behavior can be used as additional confirmation that the kernel driver is properly configured. The deprecation and replacement of UserGetDataBuffer by UserCopyDataBuffer was primarily done to faciliate software I/O controllers. Functionally, the two APIs actually behave identically, however, the name change resolves the analyzer warnings that releasing the returned IOMemoryDescriptor previously caused. __Kevin ElliottDTS Engineer, CoreOS/Hardware
0
0
78
1w
BNNSNDArrayDescriptor rejects manually calculated strides?
Supporse, in a tight loop, I want to matrix MxP with PxN to get MxN (in rowNum x colNum convention). The call to BNNSNDArrayDescriptor.init(data:shape:) always fails if I (correctly) specify all the strides. /* The simplest and fastest matmul(A,B) is when both A and B are in inner- dimension-major order - with the size P dimension stored continuous. i.e. A*(B^T) when A,B are stored in C-like row-major order, or, first-dimension-major order, but first index is the row index, like BLAS */ import Accelerate // Different sizes, so incorrectly-ordered sizes/strides/indices generate error let M: Int = 16 let N: Int = 8 let P: Int = 32 let sizeA = BNNS.Shape.matrixFirstMajor(M, P, stride: (0, 0)) // OK: stride:(1, 0) // bad: stride:(0, 1) -- Matmul failed, because 1 is given to the wrong dimension: should be at least P // stride:(1, P) -- Failed to create BNNSNDArrayDescriptor??? let sizeB = BNNS.Shape.matrixFirstMajor(N, P, stride: (0, 0)) // OK: stride:(1, 0) bad: stride:(0, 1), stride:(1, P) let sizeC = BNNS.Shape.matrixFirstMajor(M, N, stride: (0, 0)) // OK: stride:(1, 0) bad: stride:(0, 1), stride:(1, N) let Mat1 = UnsafeMutableRawBufferPointer .allocate(byteCount: (M+N)*P*4, alignment: 128) .initializeMemory(as: Float.self, repeating: 1.234) let Mat2 = UnsafeMutableRawBufferPointer .allocate(byteCount: M*N*4, alignment: 128) .initializeMemory(as: Float.self, repeating: 0.0) guard let descA = BNNSNDArrayDescriptor( data: Mat1.extracting(0..<M*P), shape: sizeA), let descB = BNNSNDArrayDescriptor( data: Mat1.extracting(M*P..<(M+N)*P), shape: sizeB), let descC = BNNSNDArrayDescriptor( data: Mat2, shape: sizeC) else { print("Failed to create BNNSNDArrayDescriptor."); exit(1) } print(descA) // workspaceSize = BNNS.matrixMultiplicationWorkspaceSize(...) // withUnsafeTemporaryAllocation(byteCount: workspaceSize, alignment: ...) { wksp in var iter = 0 while iter < 1000{ do { try BNNS.applyMatrixMultiplication( inputA: descA, transposed: false, inputB: descB, transposed: true, output: descC, alpha: 1.0, workspace: /*wksp*/ nil) } catch { // Probably got the dimensions backwards, so two matrices are not multiplicable print("Matmul failed: \(error)") break } iter += 1 }I guess in the Swift overlay, the verifying initializer checked a wrong arrangement of stride[k] >= size[k-1] * stride[k-1]. These RowMajor FirstMajor, etc. with all different size and index orderings, are surely confusing. bnns_constants.h:1394 gives the right description. PS: Please don't educate me about deprecation of BNNS. context.executeFunction(arguments: [Aptr, Bptr, Cptr]) is nearly 5x slower for this one-matmul-in-a-tight-loop case, and there's no way to reuse the underlying graph in another thread yet, not withBNNSGraph.Builder. The (im)practical alternative is calling sgemm() that is even more verbose than this.
2
0
123
1w
FileManager.default.contentsOfDirectory fails with SMB
Hi, I am trying to list the contents of a directory selected by the user using the following code: let documentPicker = UIDocumentPickerViewController(forOpeningContentTypes: [.folder]) documentPicker.delegate = self self.present(documentPicker, animated: true) func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) {         guard let folderUrl = urls.first else {return} let startAccessing&#9;= folderUrl.startAccessingSecurityScopedResource()         guard startAccessing else { print("ERROR")             return         }         defer {             if startAccessing {                 folderUrl.stopAccessingSecurityScopedResource()             }         }         var error : NSError? = nil         NSFileCoordinator().coordinate(readingItemAt: folderUrl, error: &error) { (url) in             let startAccessing = url.startAccessingSecurityScopedResource()             guard startAccessing else {                 print("ERROR 2")                 return             }             defer {                 if startAccessing { folderUrl.stopAccessingSecurityScopedResource()                 }             }                          do {                 let files = try FileManager.default.contentsOfDirectory(at: url, includingPropertiesForKeys: [.nameKey])                 print(files)             } catch let filesError {                 print(filesError)             }         }     } This works for iCloud and for local files. It also, curiously, works on empty folders on the SMB server (though, obviously, it returns an empty array). However, for SMB folders with contents I get the following cryptic error message. Error Domain=NSCocoaErrorDomain Code=256 "The file “downloads” couldn’t be opened." UserInfo={NSURL=file:///private/var/mobile/Library/LiveFiles/com.apple.filesystems.smbclientd/Gabgugfiles/downloads, NSFilePath=/private/var/mobile/Library/LiveFiles/com.apple.filesystems.smbclientd/Gabgugfiles/downloads, NSUnderlyingError=0x28010b0c0 {Error Domain=NSPOSIXErrorDomain Code=10006 "Unknown error: 10006"}} In addition, modifying the code slightly so the user picks an image instead works just fine too. I can load the image from the supplied URL. I have read the documentation here - https://developer.apple.com/documentation/uikit/view_controllers/providing_access_to_directories and watched the WWDC 2019 presentation, What's New in File Management and Quicklook, where this was introduced but this hasn't turned up any answers. My app is set up with Supports Document Browser. Is there something I'm doing wrong? The way this is described what I'm trying to do, get a list of files and act on each of them, is exactly what this is intended for yet it's not working.
12
0
3.5k
1w
UGreen NAS - Unable to enumerate contents of directory on iOS, works on macOS
I have a UGreen NAS. My app can read the contents of a folder on the NAS from macOS, but it cannot read the contents of a folder from iOS. I bring up a UIDocumentPickerViewController(forOpeningContentTypes: [UTType.folder], asCopy: false). I can pick a folder on the iPad’s internal storage, and successfully enumerate its contents. On the UGreen, I can pick a folder, but the content enumeration always returns zero items (no errors). Enumeration of the UGreen works from macOS. It also works on the iPad when connecting to a Mac mini, or a Synology NAS. . Files.app is able to view the UGreen folder and its contents. Oddly, my app cannot enumerate the contents, but it IS able to write a file to that UGreen folder. Since Files.app can enumerate and I can write to the UGreen folder (and I can enumerate contents on other servers) - how can I get the enumeration to work? Feedback is FB22955130
13
0
906
1w
CMMotionActivityManager: past activities move in time between queries (watchOS 27, Apple Watch Ultra 4)
When I query the same past period with CMMotionActivityManager.queryActivityStarting(from:to:to:) at two different times, the second result contains the same activities, but their startDate values are earlier. Setup Apple Watch Ultra 4 (Watch8,1), watchOS 27.0.1 My app reads the activity history a few minutes after it happens and stores it. Later it queries the same period again and compares the results. What I see The activity types and durations do not change. Whole blocks of history move back in time by a constant offset. Example from today's query, compared with the stored values: Period of the dataOffsetNov 8, 12:47 – 19:55−155 sNov 8, 19:57 – Nov 9, 17:18−95 sNov 9, 17:19 – now0 sYesterday at 17:19, the same Nov 8 evening data had an offset of 0 s. So the offset changes over time, not only with the age of the data. New steps add up: when a step occurs, all older history moves back by the same amount. Earlier I saw offsets of −60 s, −123 s, −177 s and −340 s. The stored values match HealthKit workout start and end times within about 8 s. The re-queried values do not (for example −52 s at the start of a run). timestamp of these activities is equal to startDate (seconds since 2001), so it does not help to match them. I did not see this on Apple Watch Ultra 3 with watchOS 27, but I have only one comparison from that watch. Questions Is startDate of a past CMMotionActivity expected to stay the same? If not, which event changes it, and is there a way to detect it? What is the recommended way to get stable times from the activity history? I log every query on the watch (all activities plus clock and battery state every 30 minutes), so I can share data or a sysdiagnose. I will also file a Feedback.
Replies
0
Boosts
0
Views
54
Activity
1w
macOS Open Directory: Does ODNodeCreateRecord cleanup preserve concurrent records?
We are designing a local, non-login service account provisioning process on macOS using the public Open Directory API. The documentation for ODNodeCreateRecord() states that if setting an initial attribute fails, the record is deleted and an error is returned. We need to ensure that a failed creation attempt cannot delete or modify a pre-existing record, including during concurrent record creation or replacement. Questions: When attribute initialization fails, is the internal cleanup guaranteed to target only the record instance created by that specific API call, rather than another record with the same name? Is this cleanup bound to a unique record identity or UUID, including if another process concurrently creates, removes, or replaces a record with the same name? Does the public API provide an atomic create-only guarantee that prevents changes to an existing record? If these guarantees are not provided, what supported API or provisioning approach should be used to avoid affecting pre-existing local Directory Services records? Our current plan uses the local /Local/Default Directory Services node for a dedicated service account, administrative change serialization, pre-creation collision checks, and post-operation identity verification. We understand that these checks do not themselves prove atomicity or race-free cleanup. We would appreciate clarification of the supported API guarantees, specifically for macOS 15. Thank you.
Replies
3
Boosts
0
Views
74
Activity
1w
NETransparentProxyManager: saving isOnDemandEnabled = true disables On-Demand on other proxies
On macOS, multiple NETransparentProxyManager (NEAppProxyProvider) configurations from different vendors can be enabled (isEnabled = true) and run simultaneously. However, we discovered that when one NETransparentProxyManager configuration calls saveToPreferencesWithCompletionHandler: with isOnDemandEnabled = true, /usr/libexec/nehelper (NEConfigurationManager) silently modifies any other enabled NETransparentProxyManager configuration in /Library/Preferences/com.apple.networkextension.plist and flips its OnDemandEnabled to false (and nesessionmanager logs Resetting VPN On Demand and marks the other session not-kernel-activated). Unlike NEVPNManager.isEnabled (which documents mutual exclusion for personal VPNs), NETransparentProxyManager is designed so multiple transparent proxies can coexist simultaneously, and neither NETransparentProxyManager.h nor NEVPNManager.h documents that isOnDemandEnabled is mutually exclusive across coexisting transparent proxy configurations. Root Cause Observed in NetworkExtension.framework When inspecting -[NEConfigurationManager saveConfigurationToDisk:updateSCPreferences:currentSignature:userUUID:notifyNow:isUpgrade:], when iterating over existing NEConfiguration objects of the same grade: If [[newConfig VPN] isEnabled] && [[otherConfig VPN] isEnabled] && [[newConfig VPN] isOnDemandEnabled] && [[otherConfig VPN] isOnDemandEnabled], NEConfigurationManager invokes: +[NEConfigurationManager disableConfiguration:otherConfig onDemandOnly:YES] disableConfiguration:onDemandOnly:YES calls [[otherConfig VPN] setOnDemandEnabled:NO], even when both configurations are NETransparentProxyManager (TunnelType == 2). Real-World Impact When two enterprise security products that both use NETransparentProxyManager are installed on the same Mac: Both configure isEnabled = true, onDemandRules = [NEOnDemandRuleConnect()], and isOnDemandEnabled = true. Whenever Proxy A saves its preferences, nehelper silently flips Proxy B's isOnDemandEnabled to false (and vice versa). After a reboot or network transition where Proxy B's initial startVPNTunnel fails while Wi-Fi is still associating and Proxy B relies on VPN On Demand (NEOnDemandRuleConnect) to start its NEAppProxyProvider once network connectivity comes up, macOS never starts Proxy B because its isOnDemandEnabled flag was cleared. Minimal Reproducer (Swift) Compile this minimal CLI inside an app bundle signed with the com.apple.developer.networking.networkextension = ["app-proxy-provider"] entitlement: import Foundation import NetworkExtension let args = CommandLine.arguments let name = args.count > 1 ? args[1] : "PocProxyA" let action = args.count > 2 ? args[2] : "status" DispatchQueue.main.async { NETransparentProxyManager.loadAllFromPreferences { managers, error in if let error = error { print("[\(name)] loadAllFromPreferences error: \(error)") exit(1) } let all = managers ?? [] let existing = all.first(where: { $0.localizedDescription == name }) if action == "status" { if let mgr = existing { print("[\(name)] -> isEnabled=\(mgr.isEnabled), isOnDemandEnabled=\(mgr.isOnDemandEnabled), rulesCount=\(mgr.onDemandRules?.count ?? 0)") } else { print("[\(name)] -> not found") } exit(0) } if action == "remove" { guard let mgr = existing else { exit(0) } mgr.removeFromPreferences { err in print("[\(name)] removed (err=\(String(describing: err)))") exit(0) } return } // action == "save" let mgr = existing ?? NETransparentProxyManager() let proto = (mgr.protocolConfiguration as? NETunnelProviderProtocol) ?? NETunnelProviderProtocol() proto.providerBundleIdentifier = "com.example.poc.extension" proto.serverAddress = "127.0.0.1" mgr.protocolConfiguration = proto mgr.localizedDescription = name mgr.isEnabled = true mgr.onDemandRules = [NEOnDemandRuleConnect()] mgr.isOnDemandEnabled = true print("[\(name)] Saving NETransparentProxyManager with isEnabled=true, isOnDemandEnabled=true...") mgr.saveToPreferences { err in if let err = err { print("[\(name)] saveToPreferences error: \(err)") exit(1) } print("[\(name)] saveToPreferences succeeded! isEnabled=\(mgr.isEnabled), isOnDemandEnabled=\(mgr.isOnDemandEnabled)") exit(0) } } } RunLoop.main.run()Reproduction Output Running save on PocProxyA, then save on PocProxyB, and checking status on both: === Step 1: PocProxyA saves isOnDemandEnabled = true === [PocProxyA] Saving NETransparentProxyManager with isEnabled=true, isOnDemandEnabled=true... [PocProxyA] saveToPreferences succeeded! isEnabled=true, isOnDemandEnabled=true [PocProxyA] -> isEnabled=true, isOnDemandEnabled=true, rulesCount=1 === Step 2: PocProxyB saves isOnDemandEnabled = true === [PocProxyB] Saving NETransparentProxyManager with isEnabled=true, isOnDemandEnabled=true... [PocProxyB] saveToPreferences succeeded! isEnabled=true, isOnDemandEnabled=true === Step 3: Check BOTH configurations after PocProxyB saved === [PocProxyA] -> isEnabled=true, isOnDemandEnabled=false, rulesCount=1 [PocProxyB] -> isEnabled=true, isOnDemandEnabled=true, rulesCount=1 === Step 4: PocProxyA saves isOnDemandEnabled = true again === [PocProxyA] Saving NETransparentProxyManager with isEnabled=true, isOnDemandEnabled=true... [PocProxyA] saveToPreferences succeeded! isEnabled=true, isOnDemandEnabled=true === Step 5: Check BOTH configurations after PocProxyA saved === [PocProxyA] -> isEnabled=true, isOnDemandEnabled=true, rulesCount=1 [PocProxyB] -> isEnabled=true, isOnDemandEnabled=false, rulesCount=1Questions Is disableConfiguration:onDemandOnly:YES stripping isOnDemandEnabled across coexisting NETransparentProxyManager (TunnelType = 2) configurations a bug in NEConfigurationManager, or an intentional limitation? Is there a recommended way for two coexisting NETransparentProxyManager configurations from different vendors to both use On-Demand without disabling each other's isOnDemandEnabled flag on saveToPreferences? Filed in Feedback Assistant as FB25463155.
Replies
3
Boosts
2
Views
365
Activity
1w
Supported sandbox approach for cross-app window positioning and resizing
I am developing a macOS window-management utility for a new Mac App Store submission, targeting macOS 13+ on Apple silicon and supported Intel Macs. Its core function is to move and resize windows belonging to other, unmodified applications, in response to explicit menu commands, registered keyboard shortcuts, or optional edge-drag snapping. The current unsandboxed engineering implementation uses public Accessibility APIs: AXUIElementCreateApplication, AXUIElementCopyAttributeValue / AXUIElementCopyMultipleAttributeValues for window geometry, AXUIElementCopyElementAtPosition for drag targeting, and AXUIElementSetAttributeValue for AXPosition and AXSize. It requires explicit Accessibility consent. Window information is processed locally; the app does not transmit it. I understand that App Review Guideline 2.4.5(i) requires App Sandbox and that “Protecting user data with App Sandbox” lists assistive Accessibility API use as incompatible. The DTS answer in thread 789663 also explains that sandboxed apps cannot use Accessibility APIs, while noting that some use cases have alternatives. For this specific cross-application positioning/resizing use case: Is there a currently supported public API or documented, requestable entitlement that permits it in a newly submitted sandboxed Mac App Store app? If a supported alternative exists, what API/architecture and minimum OS requirements apply, including any approval process? If there is no supported route, can you confirm that this functionality cannot currently be delivered within the described sandboxed Mac App Store constraints? I am seeking a supported architecture for controlling other apps’ windows. The unsandboxed tests establish functionality only; they do not establish sandbox compatibility or App Review eligibility. References: https://developer.apple.com/app-store/review/guidelines/#hardware-compatibility https://developer.apple.com/documentation/security/protecting-user-data-with-app-sandbox https://developer.apple.com/forums/thread/789663
Replies
5
Boosts
0
Views
183
Activity
1w
A logging NWProtocolFramerImplementation-conforming type
This is an extension of https://developer.apple.com/forums/thread/854016 I was wondering if there's a way to print out the bytes passed-through so I can check that framer's implementation. Is there an existing type for this? Or would I need to introduce one? One issue is as a base diagnosing type, I can only check this new framer for correctness through inspection. Another is if using String conversion functionality takes too much resources for a type that may be called alot. My current idea is making an inline-array of 1024 bytes, write the UTF-8 representation directly, wrapping it with a no-allocation NSString, then passing that to the logging infrastructure.
Replies
1
Boosts
0
Views
71
Activity
1w
NEAppPushProvider times out connecting to a server on a routed subnet, while the containing app connects fine
We use Local Push Connectivity (NEAppPushProvider, matchSSIDs set) to receive notifications from an on-premise MQTT broker over WebSocket (wss://host:port/mqtt). iPhone on Wi-Fi, VLAN A (SSID matches matchSSIDs) Server on wired VLAN B, routing and firewall rules allow VLAN A → VLAN B on that port Result: the containing app, in the foreground, connects successfully to wss://<VLAN B IP>:<port>/mqtt. At the same moment, the app push provider (URLSessionWebSocketTask to the exact same URL) fails with "The request timed out". The provider starts normally (start() is called). When the server has an address on the Wi-Fi subnet (VLAN A), the provider connects without any issue. Is the app push provider restricted to servers on the local subnet of the matched Wi-Fi network? If so, is this documented anywhere? If not, what could prevent the provider from reaching a routed address that the app itself can reach? iOS version: 27.0.1 device : iPhone 13
Replies
1
Boosts
0
Views
103
Activity
1w
iPhone entitlement for bounded Bluetooth scanning while the screen is off?
We develop an iPhone app that performs user-started Bluetooth discovery for 1–5 minutes, with visible progress, cancellation and a Live Activity. We need to discover arbitrary BLE advertisers, including nonconnectable devices, and receive repeated RSSI samples during that bounded scan. The app declares bluetooth-central, creates its central manager before starting the Live Activity in the foreground, and scans with nil service filters and duplicates enabled. Discovery continues behind another app while the display is on, but saved observation timestamps stop advancing after the phone is locked with its display off. We understand the restriction described in https://developer.apple.com/forums/thread/815189. Is there an iPhone managed entitlement or supported program that permits this use case? If so, what are the eligibility criteria and application route? We also found com.apple.developer.bluetooth-central-screen-off-scanning mentioned in https://developer.apple.com/forums/thread/835684. That discussion concerns watchOS medical use; we are asking whether any corresponding iPhone capability exists. If no route exists, should we submit an enhancement request through Feedback Assistant?
Replies
1
Boosts
0
Views
78
Activity
1w
Supported quarantine-preservation contract for sandboxed file operations
Traverse is a sandboxed macOS file manager with user-selected read/write access. For an input already carrying the complete raw com.apple.quarantine value 0086;timestamp;agent;event, a fresh private copy may receive 0082 with the remaining fields equal. This asks about the input state, without claiming a verified creation recipe for the retained test file. Our security requirement is equality of the entire original raw value before and throughout the interval when the destination name is reachable, including interruption immediately after publication. Is there a documented, supported App Sandbox API or operation that guarantees this for (a) a same-volume, same-inode move from private staging to an absent user-selected name, (b) a new file or extracted ZIP member, and (c) native Trash followed by restoration? If so, what OS/volume/entitlement scope and exact guarantee apply, and can the raw flags and event field be preserved without removing or replacing an OS-assigned quarantine mark? If no such public contract exists, please confirm that raw byte equality cannot be claimed from quarantineProperties, FileManager.trashItem, NSWorkspace.recycle, NSFileCoordinator, rename, clone/copy, or post-operation readback alone. We are not requesting a bypass of quarantine or a weaker substitute for 0086.
Replies
1
Boosts
0
Views
85
Activity
1w
Critical Regression: smbfs 7.0 introduces a crtitical bug regarding symlinks
Apple feedback FB25355124 The SMB client no longer accepts reads to symlinks that are an absolute path to a network volume or a symlink that contains a (..) in the relative path. Reproduction steps on an SMB mount with this file structure: dir a.txt Run this command from inside of "dir": ln -s my-link ../dir/a.txt Attempt to read that symlink: cat ./my-link Which results in this error: cat: link: Invalid argument which is translating to an EINVAL getting returned from the SMB client. Same behavior was observed when making a symlink with an absolute path: ln -s my-link /Volumes/Example/dir/a.txt The server is responding successfully to the IOCTL command but the client is still rejecting the request with that error. This behavior was not observed in macOS 26.6.2 (smbfs 6.0.1) as well as previous versions of macOS.
Replies
4
Boosts
5
Views
359
Activity
1w
CloudKit JS with Advanced Data Protection: supported access to private encrypted data?
Does CloudKit JS support private encrypted records and assets when Advanced Data Protection is enabled? Our test account has ADP and iCloud.com web access on. Native CloudKit sync succeeds, but Apple’s browser sign-in reports Authentication Error before our callback. The container, environment, allowed origin and callback have been verified. A separate native-generated web token authenticates one identity request, while a known private-record lookup returns ACCESS_DENIED. Is there a supported trusted-device temporary-approval flow for third-party CloudKit JS, or another supported approach that keeps ADP enabled?
Replies
0
Boosts
1
Views
129
Activity
1w
PushToTalk: headset "play" never starts a transmission (goes to Music) — and is PTT appropriate for voice capture to an assistant?
Hi, We're building a voice assistant app. The user speaks to the assistant through a Bluetooth earset; the app records the speech, transcribes it and the assistant acts on it. We want the user to start and stop that capture from the earset button while the iPhone stays locked, without the Phone call UI. We prototyped this with the PushToTalk framework and have two questions. 1. Headset play button does not reach our joined PTT channel Setup (minimal test app, nothing else running): iPhone 14 Pro Max, iOS 26.6.1 (23G83). Entitlements: com.apple.developer.push-to-talk, aps-environment. Background modes: push-to-talk, audio, bluetooth-central. PTChannelManager.channelManager(delegate:restorationDelegate:) → requestJoinChannel in the foreground → didJoinChannel → setAccessoryButtonEventsEnabled(true, channelUUID:) completes without error. Audio session configured once before joining: .playAndRecord, options .allowBluetoothHFP; tried mode .default and .voiceChat. We never call setActive; audio starts only in didActivate (AVAudioEngine). What works: The system PTT UI talk button, phone locked: didBeginTransmitting → didActivate (earset HFP 16 kHz) → audio recorded. A Lock Screen / Control Center control running an intent that adopts PushToTalkTransmissionIntent, phone locked: one tap starts, one tap ends; 5+ minute transmissions; app cold-launched by the system when needed. What doesn't: pressing the earset's play/pause button (single press) while joined and idle never produces didBeginTransmitting. Same result with AirPods and with a third-party A2DP/HFP earset, locked and unlocked, Music app closed or not. mediaremoted logs, for every press: mediaremoted: Received command from client <... bundleIdentifier = com.apple.BTAvrcp ...>: <... command = Play ...> mediaremoted: No context for context-sensitive command <... command = Play, SenderBundleIdentifier = <com.apple.BTAvrcp> ...> mediaremoted: Destination app com.apple.Music not available for command <... command = Play ...> mediaremoted: Sending previously queued command <... command = Play ...> (Music is launched and plays)In thread 804205 you described this path as pressing "play" on an A2DP/HFP accessory "that's currently in playback mode". Questions: a) What exactly must be true for a headset AVRCP Play/Pause to be routed to the PTT system instead of the now-playing app? Is "playback mode" a state of our channel (e.g. only while setActiveRemoteParticipant is set / audio is playing), of the accessory, or of the route? b) Is an idle joined channel (no remote participant, nothing playing) expected to receive accessory events at all? c) Is a press-once start / press-once end mapping supported for accessory events, or is it press-and-hold only? d) If headset buttons cannot start a transmission from idle, is the BLE path (requestBeginTransmitting from a CoreBluetooth event) the only supported option for an earset trigger? (Our earset exposes no BLE button characteristic, so that would require firmware changes.) 2. Is this an appropriate use of PushToTalk? The audio goes from the user to our assistant service (speech-to-text, then the assistant responds in the app or by voice). There is no second human on the channel. In thread 816408 you noted the voice communication frameworks "can't be used for any other purpose". Would capturing a user's spoken requests/notes for an AI assistant through PTT be considered a supported use, or is PTT limited to person-to-person communication? If it isn't, is there any supported API that lets a user start and stop audio capture with an earset or a Lock Screen control while the device stays locked? A sysdiagnose and the test project are available on request. Thanks!
Replies
1
Boosts
0
Views
139
Activity
1w
[macOS 27] Cannot receive 4096-byte packets over USB CDC-ACM (works in macOS 26)
Hello, I’m facing an issue with a custom USB CDC-ACM device after updating to macOS 27. The device sends 4096-byte packets, which were correctly received under macOS 26. Since I need to transfer large amounts of data, 4096 bytes was a good compromise between performance and reliability. However, now any packet larger than 1019 bytes is not received at all. Wireshark confirms that the packets are present on the USB bus, but neither Serial Tool nor my own software can see them. The device uses the AppleUSBACMData driver (CDC-Data interface, Full Speed USB, with bMaxPacketSize0=64). Fragmenting the incoming data into chunks of 1019 bytes or less works as a temporary fix, but it significantly reduces performance and is not a sustainable solution. I have three specific questions: Is there a hardcoded 1019-byte buffer limit in AppleUSBACMData or IOSerialFamily in macOS 27? Is this a known issue in macOS 27 with CDC-ACM devices? Should I consider writing a custom driver for my device instead of relying on Apple’s default AppleUSBACMData? Any help or insights would be greatly appreciated. Thanks!
Replies
1
Boosts
0
Views
48
Activity
1w
Vendor ID Approval
We are building an iPadOS app that requires a DriverKit USB transport dext, and we have been waiting on the restricted entitlement for over three weeks with no movement on any of our requests. Team ID: AKFY9W27HB Entitlements requested: com.apple.developer.driverkit and com.apple.developer.driverkit.transport.usb ┌────────────┬───────────────┬───────────┐ │ Request ID │ Requested │ Status │ ├────────────┼───────────────┼───────────┤ │ 633LBK79JF │ 25 July 2026 │ Submitted │ ├────────────┼───────────────┼───────────┤ │ 6N8PP3G6BA │ 6 August 2026 │ Submitted │ ├────────────┼───────────────┼───────────┤ │ Y8T72G8YJS │ 6 August 2026 │ Submitted │ └────────────┴───────────────┴───────────┘ All three are still showing "Submitted" with no response, the oldest for over three weeks. What we actually need is one configuration, not three grants. The three requests cover three vendor IDs, but a single dext has to match all of them simultaneously: 0x1452 (5202) 0x1343 (4931) 0x0D16 (3350) I believe this is the same situation as thread 826658 (https://developer.apple.com/forums/thread/826658), where multiple vendor ID requests were consolidated into a single entitlement configuration. If our three can be merged the same way, that is exactly what we need. Any guidance on the status of these three requests, or on consolidating them, would be much appreciated.
Replies
3
Boosts
0
Views
626
Activity
1w
Can macOS enforce a 512 MiB combined address-space cap before child code runs?
On Apple silicon macOS, is there a supported public mechanism that can enforce a hard combined mapped virtual address-space ceiling of 512 MiB for a parent process and its new child from the first charged creation step through loading the child's executable image, before the child runs any application code? The current investigation targets macOS build 26B123 on arm64. We need to know how the supported limit accounts for inherited maps, shared-region reservations and image mappings during process creation. If the supported route is to partition the ceiling between per-process limits, please specify whether the child limit applies before its first charged map and how a limit failure is reported. Please identify the public API or documentation, supported OS versions and required setup. A control that only applies to resident memory or starts after application code begins would not cover this question.
Replies
1
Boosts
0
Views
92
Activity
1w
Hard aggregate process-tree memory enforcement on macOS
Is there a publicly supported macOS API, entitlement, or framework capable of enforcing a hard 64 MiB aggregate memory ceiling across a process tree, including its supervisor, observer, and descendants? Enforcement must be established before workload execution, survive fork/exec, and remain effective if the controlling process crashes. We have examined per-process resource limits and process-memory reporting, but these do not establish the required aggregate guarantee. If supported, which API and enforcement mechanism should we use? If not, is there a documented platform limitation?
Replies
1
Boosts
0
Views
45
Activity
1w
"Why doesn't the earbud button start Push to Talk?"
Apple's documentation says that once an app joins a Push to Talk channel, pressing "play" on a headset should start recording. On my iPhone it doesn't. Both the M015(our earbud) and AirPods send the press to Apple Music instead. The phone's own log says "No context for this command", then opens Music. So we ask Apple: What exactly has to be true for the earbud press to reach Push to Talk instead of Music? Does it work at all when nothing is playing? Can one press start and the next press stop, or is it press-and-hold only? Is a Bluetooth data signal from the earbud the only other way?
Replies
1
Boosts
0
Views
109
Activity
1w
Software I/O Support in SCSIControllerDriverKit
I'm pleased to announce that the initial beta of macOS 27.3 (26C5035r) includes our support for software I/O in SCSIControllerDriverKit. The class reference has not yet been updated to include this, but it is described in the release notes: "SCSIControllerDriverKit now supports software controllers. A software controller declares itself by setting kIOPropertySoftwareIOKey (an OSBoolean, from <IOKit/storage/IOStorageControllerCharacteristics.h>) through UserSetHBAProperties(). The system honors this setting only before controller initialization completes, so it stays fixed for the life of the controller. Such a controller doesn’t create any DMA mappings, and your dext can access the data buffer associated with a particular I/O through the UserCopyDataBuffer API. (182426393) (FB23797269)" Clearing up a few details on that process: The property kIOPropertySoftwareIOKey ("Software I/O") is created and set to "false" when IOSCSIParallelInterfaceController is initially created. That means a DEXT can check for software I/O support by using CopyProperties() to look for that key, instead of relying on a system version check or similar side channel check. The kIOPropertySoftwareIOKey must be set before the controller initialization sequence begins. Changes to the value after that point will fail. If kIOPropertySoftwareIOKey has been properly set to "true", then fBufferIOVMAddr will be set to NULL. This behavior can be used as additional confirmation that the kernel driver is properly configured. The deprecation and replacement of UserGetDataBuffer by UserCopyDataBuffer was primarily done to faciliate software I/O controllers. Functionally, the two APIs actually behave identically, however, the name change resolves the analyzer warnings that releasing the returned IOMemoryDescriptor previously caused. __Kevin ElliottDTS Engineer, CoreOS/Hardware
Replies
0
Boosts
0
Views
78
Activity
1w
BNNSNDArrayDescriptor rejects manually calculated strides?
Supporse, in a tight loop, I want to matrix MxP with PxN to get MxN (in rowNum x colNum convention). The call to BNNSNDArrayDescriptor.init(data:shape:) always fails if I (correctly) specify all the strides. /* The simplest and fastest matmul(A,B) is when both A and B are in inner- dimension-major order - with the size P dimension stored continuous. i.e. A*(B^T) when A,B are stored in C-like row-major order, or, first-dimension-major order, but first index is the row index, like BLAS */ import Accelerate // Different sizes, so incorrectly-ordered sizes/strides/indices generate error let M: Int = 16 let N: Int = 8 let P: Int = 32 let sizeA = BNNS.Shape.matrixFirstMajor(M, P, stride: (0, 0)) // OK: stride:(1, 0) // bad: stride:(0, 1) -- Matmul failed, because 1 is given to the wrong dimension: should be at least P // stride:(1, P) -- Failed to create BNNSNDArrayDescriptor??? let sizeB = BNNS.Shape.matrixFirstMajor(N, P, stride: (0, 0)) // OK: stride:(1, 0) bad: stride:(0, 1), stride:(1, P) let sizeC = BNNS.Shape.matrixFirstMajor(M, N, stride: (0, 0)) // OK: stride:(1, 0) bad: stride:(0, 1), stride:(1, N) let Mat1 = UnsafeMutableRawBufferPointer .allocate(byteCount: (M+N)*P*4, alignment: 128) .initializeMemory(as: Float.self, repeating: 1.234) let Mat2 = UnsafeMutableRawBufferPointer .allocate(byteCount: M*N*4, alignment: 128) .initializeMemory(as: Float.self, repeating: 0.0) guard let descA = BNNSNDArrayDescriptor( data: Mat1.extracting(0..<M*P), shape: sizeA), let descB = BNNSNDArrayDescriptor( data: Mat1.extracting(M*P..<(M+N)*P), shape: sizeB), let descC = BNNSNDArrayDescriptor( data: Mat2, shape: sizeC) else { print("Failed to create BNNSNDArrayDescriptor."); exit(1) } print(descA) // workspaceSize = BNNS.matrixMultiplicationWorkspaceSize(...) // withUnsafeTemporaryAllocation(byteCount: workspaceSize, alignment: ...) { wksp in var iter = 0 while iter < 1000{ do { try BNNS.applyMatrixMultiplication( inputA: descA, transposed: false, inputB: descB, transposed: true, output: descC, alpha: 1.0, workspace: /*wksp*/ nil) } catch { // Probably got the dimensions backwards, so two matrices are not multiplicable print("Matmul failed: \(error)") break } iter += 1 }I guess in the Swift overlay, the verifying initializer checked a wrong arrangement of stride[k] >= size[k-1] * stride[k-1]. These RowMajor FirstMajor, etc. with all different size and index orderings, are surely confusing. bnns_constants.h:1394 gives the right description. PS: Please don't educate me about deprecation of BNNS. context.executeFunction(arguments: [Aptr, Bptr, Cptr]) is nearly 5x slower for this one-matmul-in-a-tight-loop case, and there's no way to reuse the underlying graph in another thread yet, not withBNNSGraph.Builder. The (im)practical alternative is calling sgemm() that is even more verbose than this.
Replies
2
Boosts
0
Views
123
Activity
1w
FileManager.default.contentsOfDirectory fails with SMB
Hi, I am trying to list the contents of a directory selected by the user using the following code: let documentPicker = UIDocumentPickerViewController(forOpeningContentTypes: [.folder]) documentPicker.delegate = self self.present(documentPicker, animated: true) func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) {         guard let folderUrl = urls.first else {return} let startAccessing&#9;= folderUrl.startAccessingSecurityScopedResource()         guard startAccessing else { print("ERROR")             return         }         defer {             if startAccessing {                 folderUrl.stopAccessingSecurityScopedResource()             }         }         var error : NSError? = nil         NSFileCoordinator().coordinate(readingItemAt: folderUrl, error: &error) { (url) in             let startAccessing = url.startAccessingSecurityScopedResource()             guard startAccessing else {                 print("ERROR 2")                 return             }             defer {                 if startAccessing { folderUrl.stopAccessingSecurityScopedResource()                 }             }                          do {                 let files = try FileManager.default.contentsOfDirectory(at: url, includingPropertiesForKeys: [.nameKey])                 print(files)             } catch let filesError {                 print(filesError)             }         }     } This works for iCloud and for local files. It also, curiously, works on empty folders on the SMB server (though, obviously, it returns an empty array). However, for SMB folders with contents I get the following cryptic error message. Error Domain=NSCocoaErrorDomain Code=256 "The file “downloads” couldn’t be opened." UserInfo={NSURL=file:///private/var/mobile/Library/LiveFiles/com.apple.filesystems.smbclientd/Gabgugfiles/downloads, NSFilePath=/private/var/mobile/Library/LiveFiles/com.apple.filesystems.smbclientd/Gabgugfiles/downloads, NSUnderlyingError=0x28010b0c0 {Error Domain=NSPOSIXErrorDomain Code=10006 "Unknown error: 10006"}} In addition, modifying the code slightly so the user picks an image instead works just fine too. I can load the image from the supplied URL. I have read the documentation here - https://developer.apple.com/documentation/uikit/view_controllers/providing_access_to_directories and watched the WWDC 2019 presentation, What's New in File Management and Quicklook, where this was introduced but this hasn't turned up any answers. My app is set up with Supports Document Browser. Is there something I'm doing wrong? The way this is described what I'm trying to do, get a list of files and act on each of them, is exactly what this is intended for yet it's not working.
Replies
12
Boosts
0
Views
3.5k
Activity
1w
UGreen NAS - Unable to enumerate contents of directory on iOS, works on macOS
I have a UGreen NAS. My app can read the contents of a folder on the NAS from macOS, but it cannot read the contents of a folder from iOS. I bring up a UIDocumentPickerViewController(forOpeningContentTypes: [UTType.folder], asCopy: false). I can pick a folder on the iPad’s internal storage, and successfully enumerate its contents. On the UGreen, I can pick a folder, but the content enumeration always returns zero items (no errors). Enumeration of the UGreen works from macOS. It also works on the iPad when connecting to a Mac mini, or a Synology NAS. . Files.app is able to view the UGreen folder and its contents. Oddly, my app cannot enumerate the contents, but it IS able to write a file to that UGreen folder. Since Files.app can enumerate and I can write to the UGreen folder (and I can enumerate contents on other servers) - how can I get the enumeration to work? Feedback is FB22955130
Replies
13
Boosts
0
Views
906
Activity
1w