Overview

Post

Replies

Boosts

Views

Activity

NSFileManager getRelationship:ofDirectoryAtURL:toItemAtURL:error: returning NSURLRelationshipSame for Different Directories
I'll try to ask a question that makes sense this time :) . I'm using the following method on NSFileManager: (BOOL) getRelationship:(NSURLRelationship *) outRelationship ofDirectoryAtURL:(NSURL *) directoryURL toItemAtURL:(NSURL *) otherURL error:(NSError * *) error; Sets 'outRelationship' to NSURLRelationshipContains if the directory at 'directoryURL' directly or indirectly contains the item at 'otherURL', meaning 'directoryURL' is found while enumerating parent URLs starting from 'otherURL'. Sets 'outRelationship' to NSURLRelationshipSame if 'directoryURL' and 'otherURL' locate the same item, meaning they have the same NSURLFileResourceIdentifierKey value. If 'directoryURL' is not a directory, or does not contain 'otherURL' and they do not locate the same file, then sets 'outRelationship' to NSURLRelationshipOther. If an error occurs, returns NO and sets 'error'. So this method falsely returns NSURLRelationshipSame for different directories. One is empty, one is not. Really weird behavior. Two file path urls pointing to two different file paths have the same NSURLFileResourceIdentifierKey? Could it be related to https://developer.apple.com/forums/thread/813641 ? One url in the check lived at the same file path as the other url at one time (but no longer does). No symlinks or anything going on. Just plain directory urls. And YES calling -removeCachedResourceValueForKey: with NSURLFileResourceIdentifierKey causes proper result of NSURLRelationshipOther to be returned. And I'm doing the check on a background queue.
11
0
260
12h
MusicKit JS — Commercial B2B use case: SaaS managing song requests for venues
Hello everyone, I'm building Mixify (https://mixify.fr), a French SaaS platform for professional DJs and commercial venues (bars, lounges, event spaces). I'm looking for guidance on whether my use case is compliant with MusicKit JS policies. How it works: The Host (a venue owner or DJ) logs into the Mixify dashboard using their own Apple Music subscription. The Guests scan a QR code to access a web interface where they can browse the Apple Music catalog and suggest songs. The Host reviews suggestions, accepts or rejects them, and accepted songs are added to the playback queue. Playback is handled entirely by MusicKit JS in the host's authenticated browser session, connected to the venue's speakers. Key points: Mixify is a paid SaaS (starting at €49/month) — we charge for event management tools (dashboard, analytics, guest interaction), not for access to music content. Only the authenticated Apple Music subscriber hears/controls playback. Guests only browse and suggest — they never access playback. No content is downloaded, cached, or redistributed. We use the official MusicKit JS player exclusively. Venues are responsible for their own public performance licenses (SACEM in France). My questions: Does this B2B workflow — where a SaaS manages song request logistics but relies on MusicKit JS solely for playback by an authenticated subscriber — comply with the MusicKit guidelines? Are there any specific restrictions on using MusicKit JS in a commercial/venue environment that I should be aware of? Is there a recommended way to contact Apple Developer Relations directly for a formal compliance review of this use case? I've already submitted an inquiry via the Apple Developer contact form and email, but I'd appreciate any community insight or experience with similar integrations. Thank you!
0
0
12
12h
Is calling different SBApplication objects from different threads bad?
Not quite but maybe sorta related to the errOSAInternalTableOverflow problem I asked about in a different thread, this one deals with crashes our app gets (and much more frequently lately after recent OS updates (15.7.3) are OK'd by our IT department). Our app can run multiple jobs concurrently, each in their own NSOperation. Each op creates its own SBApplication instance that controls unique instances of InDesignServer. What I'm seeing recently is lots of crashes happening while multiple ops are calling into ScriptingBridge. Shown at the bottom is one of the stack crawls from one of the threads. I've trimmed all but the last of our code. Other threads have a similar stack crawl. In searching for answers, Google's AI overview mentions "If you must use multiple threads, ensure that each thread creates its own SBApplication instance…" Which is what we do. No thread can reach another thread's SBApplication instance. Is that statement a lie? Do I need to lock around every ScriptingBridge call (which is going to severely slow things down)? 0 AE 0x1a7dba8d4 0x1a7d80000 + 239828 1 AE 0x1a7d826d8 AEProcessMessage + 3496 2 AE 0x1a7d8f210 0x1a7d80000 + 61968 3 AE 0x1a7d91978 0x1a7d80000 + 72056 4 AE 0x1a7d91764 0x1a7d80000 + 71524 5 CoreFoundation 0x1a0396a64 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 6 CoreFoundation 0x1a03969f8 __CFRunLoopDoSource0 + 172 7 CoreFoundation 0x1a0396764 __CFRunLoopDoSources0 + 232 8 CoreFoundation 0x1a03953b8 __CFRunLoopRun + 840 9 CoreFoundation 0x1a03949e8 CFRunLoopRunSpecific + 572 10 AE 0x1a7dbc108 0x1a7d80000 + 246024 11 AE 0x1a7d988fc AESendMessage + 4724 12 ScriptingBridge 0x1ecb652ac -[SBAppContext sendEvent:error:] + 80 13 ScriptingBridge 0x1ecb5eb4c -[SBObject sendEvent:id:keys:values:count:] + 216 14 ScriptingBridge 0x1ecb6890c -[SBCommandThunk invoke:] + 376 15 CoreFoundation 0x1a037594c ___forwarding___ + 956 16 CoreFoundation 0x1a03754d0 _CF_forwarding_prep_0 + 96 17 RRD 0x1027fca18 -[AppleScriptHelper runAppleScript:withSubstitutionValues:usingSBApp:] + 1036
18
0
298
12h
Significantly Delayed App Review
Hi all, Like others my app submission has been stuck in “waiting for review” for weeks. I know initial app reviews take longer than updates, but this has been delayed far too long and makes me concerned about repeating the process in the future. I submitted this app for review back on Feb 10. It was initially rejected for a minor issue, which I resolved and resubmitted the same day. After that, the build remained in “Waiting for Review” for about two weeks with no further communication. At that point I canceled the submission and resubmitted the build, thinking it may have been stuck in the queue (I now know not to do this next time). Unfortunately the new submission has also been waiting for review for another 9 days now with no messages or updates. I’ve contacted app review support as well (case ID- 102826632729). I understand review times can vary, but delays like this make it difficult for developers to plan launches or push updates when the review process is the only path to distributing apps. As paying members of the Apple Developer Program, we rely heavily on this pipeline functioning reliably. Hoping this post will reach someone from Apple who can help move the process along. If any other devs have suggestions/tips that have worked for them, please share so others in this position can become unblocked. Thanks in advance.
1
2
88
13h
FileManager.replaceItemAt(_:withItemAt:) fails sporadically on ubiquitous items
I’m encountering a strange, sporadic error in FileManager.replaceItemAt(_:withItemAt:) when trying to update files that happen to be stored in cloud containers such as iCloud Drive or Dropbox. Here’s my setup: I have an NSDocument-based app which uses a zip file format (although the error can be reproduced using any kind of file). In my NSDocument.writeToURL: implementation, I do the following: Create a temp folder using FileManager.url(for: .itemReplacementDirectory, in: .userDomainMask, appropriateFor: fileURL, create: true). Copy the original zip file into the temp directory. Update the zip file in the temp directory. Move the updated zip file into place by moving it from the temp directory to the original location using FileManager.replaceItemAt(_:withItemAt:). This all works perfectly - most of the time. However, very occasionally I receive a save error caused by replaceItemAt(_withItemAt:) failing. Saving can work fine for hundreds of times, but then, once in a while, I’ll receive an “operation not permitted” error in replaceItemAt. I have narrowed the issue down and found that it only occurs when the original file is in a cloud container - when FileManager.isUbiquitousItem(at:) returns true for the original fileURL I am trying to replace. (e.g. Because the user has placed the file in iCloud Drive.) Although strangely, the permissions issue seems to be with the temp file rather than with the original (if I try copying or deleting the temp file after this error occurs, I’m not allowed; I am allowed to delete the original though - not that I’d want to of course). Here’s an example of the error thrown by replaceItemAt: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “test-file.txt” in the folder “Dropbox”." UserInfo={NSFileBackupItemLeftBehindLocationKey=file:///var/folders/mt/0snrr8fx7270rm0b14ll5k500000gn/T/TemporaryItems/NSIRD_TempFolderBug_y3UvzP/test-file.txt, NSFileOriginalItemLocationKey=file:///var/folders/mt/0snrr8fx7270rm0b14ll5k500000gn/T/TemporaryItems/NSIRD_TempFolderBug_y3UvzP/test-file.txt, NSURL=file:///Users/username/Library/CloudStorage/Dropbox/test-file.txt, NSFileNewItemLocationKey=file:///Users/username/Library/CloudStorage/Dropbox/test-file.txt, NSUnderlyingError=0xb1e22ff90 {Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “test-file.txt” in the folder “NSIRD_TempFolderBug_y3UvzP”." UserInfo={NSURL=file:///var/folders/mt/0snrr8fx7270rm0b14ll5k500000gn/T/TemporaryItems/NSIRD_TempFolderBug_y3UvzP/test-file.txt, NSFilePath=/var/folders/mt/0snrr8fx7270rm0b14ll5k500000gn/T/TemporaryItems/NSIRD_TempFolderBug_y3UvzP/test-file.txt, NSUnderlyingError=0xb1e22ffc0 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}}} And here’s some very simple sample code that reproduces the issue in a test app: // Ask user to choose this via a save panel. var savingURL: URL? { didSet { setUpSpamSave() } } var spamSaveTimer: Timer? // Set up a timer to save the file every 0.2 seconds so that we can see the sporadic save problem quickly. func setUpSpamSave() { spamSaveTimer?.invalidate() let timer = Timer(fire: Date(), interval: 0.2, repeats: true) { [weak self] _ in self?.spamSave() } spamSaveTimer = timer RunLoop.main.add(timer, forMode: .default) } func spamSave() { guard let savingURL else { return } let fileManager = FileManager.default // Create a new file in a temp folder. guard let replacementDirURL = try? fileManager.url(for: .itemReplacementDirectory, in: .userDomainMask, appropriateFor: savingURL, create: true) else { return } let tempURL = replacementDirURL.appendingPathComponent(savingURL.lastPathComponent) guard (try? "Dummy text".write(to: tempURL, atomically: false, encoding: .utf8)) != nil else { return } do { // Use replaceItemAt to safely move the new file into place. _ = try fileManager.replaceItemAt(savingURL, withItemAt: tempURL) print("save succeeded!") try? fileManager.removeItem(at: replacementDirURL) // Clean up. } catch { print("save failed with error: \(error)") // Note: if we try to remove replaceDirURL here or do anything with tempURL we will be refused permission. NSAlert(error: error).runModal() } } If you run this code and set savingURL to a location in a non-cloud container such as your ~/Documents directory, it will run forever, resaving the file over and over again without any problems. But if you run the code and set savingURL to a location in a cloud container, such as in an iCloud Drive folder, it will work fine for a while, but after a few minutes - after maybe 100 saves, maybe 500 - it will throw a permissions error in replaceItemAt. (Note that my real app has all the save code wrapped in file coordination via NSDocument methods, so I don’t believe file coordination to be the problem.) What am I doing wrong here? How do I avoid this error? Thanks in advance for any suggestions.
8
0
156
13h
Bluetooth audio packet alignment
We’re evaluating a Bluetooth device that supports Hands Free Profile (HFP) as the “Hands-Free Unit”. You can think of this as a Bluetooth telephone headset. This device interacts with our iOS application. We observed the following. The iPhone 17 HFP Wide-Band Speech (WBS) mSBC decoder requires the WBS packet (H2 header + mSBC frame) to be sent aligned. Aligned meaning, the H2 header must be first in every packet. The WBS packet cannot span multiple eSCO packets or else the iPhone will discard the audio. This is a different implementation than the iPad (iPad Pro 11-inch M4) , presumably due to Apple’s new N1 chip. In other words, we’ve identified that older iPhones and iPads do not require this alignment. They have implemented a stateful parser/decoder of the HFP WBS audio. A quick picture to help illustrate. The iPhone 17 requires: | Frame | Frame | Frame | Frame | However, a Bluetooth implementation we are evaluating does: | me Fra | me Fra | me Fra | me Fra | Does Apple intend to keep this implementation and continue discarding audio frames that are not aligned? Page 115 of the Bluetooth HFP 1.8 specification mentions at the bottom that this behavior is “left up to the implementation” but that the “synchronization header enables unaligned codec audio frames to be recovered by the receiving side.” We understand and acknowledge that one whole frame per eSCO packet is the intended, optimal method for delivering WBS mSBC audio for reduced jitter, latency, and memory usage. However, the more robust solution would be to maintain a stateful receiver as previously implemented. Any input would be appreciated.
0
0
9
13h
Xcode 26 Kills Productivity by Making Global the State of Inspectors Pane
Here's the text of FB22001359 I've just submitted: Xcode 26 changed the behavior of the Inspectors pane (which hopefully is a bug and not an intended behavior). Now, if I close (or open) the Inspectors pane in a window tab, it closes (or opens) the Inspectors pane in ALL tabs. This is insanely horrible, unproductive, time-wasting behavior that breaks workflows that has been established for many years. By way of example: In a window tab that contains a .xib, I always want the Inspectors pane to be open. While in the window tabs that contain code files, I want the Inspectors pane to be closed. (Sometimes I do open it in certain window tabs, when needed). Before Xcode 26, the Inspectors pane was open or closed in each individual tab as the user desired. Now, if I close the Inspectors pane in one window tab, the pane closes EVERYWHERE. Thus when, for example, I go to a .xib window tab, I have to open the Inspectors pane AGAIN. But then when I go back to a code window tab, I have to CLOSE the Inspectors pane there (because it became open globally). And have to do this endlessly every day. WHY??? Please restore the normal, pre-26 behavior of the Inspectors pane. That is, the Inspectors pane should remain open or closed as PER INDIVIDUAL WINDOW TAB, not globally. Thank you for your attention to this important issue!
1
0
74
14h
Xcode 26 Butchers Productivity by Making Global the State of Navigators Pane
Here's the text of FB22008758 I've just submitted: Xcode 26 changed the behavior of the Navigators pane (which hopefully is a bug and not an intended behavior). in Xcode 26, if I close (or open) the Navigators pane in a window tab, it closes (or opens) the Navigators pane in ALL window tabs. This is insanely horrible, unproductive, time-wasting behavior that breaks workflows that has been established for many years (I've been using Xcode since 2006). By way of example: In a window tab that contains a .xib, I prefer the Navigators pane to be closed. While in all other window tabs (that contain code files and other items), I want the Navigators pane to be always displayed. Before Xcode 26, the Navigators pane was open or closed in each individual window tab as the user desired. But in Xcode 26, if I close the Navigators pane in one window tab, the pane closes EVERYWHERE. Thus when, for example, I go to a .xib window tab, I have to close the Navigators pane AGAIN. But then when I go back to a code window tab, I have to OPEN the Navigators pane there (because it became closed globally). And have to do this endlessly every day. WHY??? Please restore the normal, pre-26 behavior of the Navigators pane. That is, the Navigators pane should remain open or closed as PER INDIVIDUAL WINDOW TAB, not globally. Thank you for your attention to this important issue!
2
0
72
14h
AVAssetDownloadConfiguration: How many video variants are actually downloaded when multiple variants exist in the HLS master playlist?
Hi, I’m trying to better understand how AVAssetDownloadConfiguration selects video variants when downloading HLS content for offline playback. Suppose I have an HLS master playlist (.m3u8) that contains several video variants defined with #EXT-X-STREAM-INF. For example, the master playlist may contain multiple video streams like this: Same resolution, different BANDWIDTH Or different resolutions (for example 720p, 1080p, etc.) My question is: How many video variants are actually downloaded when using AVAssetDownloadConfiguration without specifying any variantQualifiers? In other words: If the master playlist contains multiple video variants, will the download task fetch only one variant, or multiple variants? Does the behavior differ depending on whether the variants differ only by BANDWIDTH or also by RESOLUTION? What I observed in testing In my tests, I always end up with only one video variant downloaded, specifically the one with the highest BANDWIDTH parameter. In the m3u8 files I tested, all video variants had identical parameters (resolution, codec, frame rate, etc.) and differed only by the BANDWIDTH attribute in the master playlist. However, when inspecting the downloaded .movpkg, I noticed something interesting in boot.xml. It lists two video streams: one with complete="true" (the one with highest bandwidth) another with complete="no" (the one with lowest bandwidth) I actually had 3 video streams listed in m3u8, but the one with middle bandwidth wasn't listed in boot.xml file at all. There are also additional streams for audio and subtitles in boot.xml file. This made me wonder whether the system initially attempts to download another video variant (possibly a lower bitrate one), but then switches to the highest-quality variant and only completes that one. Additional question about variantQualifiers If I provide a predicate such as: NSPredicate(format: "peakBitRate > 0") which should theoretically match all variants, will the download task attempt to download all matching video variants, or will it still select only one? Summary So the main questions are: Without variantQualifiers, does AVAssetDownloadConfiguration always download a single video variant, and if so, how is it chosen? Does the behavior differ if variants have different resolutions vs only different bitrates? When a predicate matches multiple variants, can multiple video variants actually be downloaded in a single .movpkg? Why might boot.xml list multiple video streams when only one appears to be fully downloaded? Any clarification on the intended behavior would be greatly appreciated. Thanks!
1
0
125
14h
Broken autocomplete in Xcode 26
Xcode 16 and 26 changes in painful way how the Tab key works during autocomplete. Previously, pressing Tab would extend the typed text up to the word match. For example, we have two classes: NSViewController and NSViewCoordinator BEFORE, typing: "NSV" + Tab used to complete to NSViewCo Now, in Xcode 26, pressing Tab just use the first suggestion. Stupidly. Especially when you want DispatchQueue and it gaves you DispatchSemaphore… That is very inconvenient because very often I want just see all possible cases with some prefix...without need of typing all prefix manually. How to restore the previous behavior? How to do autocomplete word-by-word?
7
0
174
14h
Beta Update Killed Mini M4
I dutifully upgraded my software (beta) on Feb. 24 when prompted. I could not get the computer to reboot, then after about 5 hours on the phone with, I think, 4 techs, they told me the only solution was to wait for the next update - I could not go backwards to the regular version. So $1,299 later I have a new Mac Mini M4! I have to work, so it was the only solution. What do I win?
0
0
26
14h
WiFi not working since build 25E5218f
I installed the latest build of Tahoe (25E5218f) yesterday on our test machine, an M1 Pro MacBook Pro and have been having a hard time getting my WiFi network to work. It's especially noticeable in Mail and Safari. Mail shows it can't connect to the designated server, and Safari simply can't connect to most sites. None of my other devices or computers are having problems, so I have to assume it's this last build that is the culprit. When I tether to my iPhone Air, everything pops back into place and I can access Mail and use Safari. I've reported the problem with FBA, but wanted to know if anyone else is experiencing the same thing.
11
2
687
14h
In-App Payments
Does a payment that is processed within the app, that generates a QR-Code for the redeeming of a real-life-good (such as tickets, vouchers for drinks, etc.), fall under IN-APP-PAYMENT regulation, which would get a fee of 15-30% on top or can that payment be processed with an external mechanism such as Stripe?
0
0
60
15h
Driver Activation failure error code 9. Maybe Entitlements? Please help
This is my first driver and I have had the devil of a time trying to find any information to help me with this. I beg help with this, since I cannot find any tutorials that will get me over this problem. I am attempting to write a bridging driver for an older UPS that only communicates via RPC-over-USB rather than the HID Power Device class the OS requires. I have written the basic framework for the driver (details below) and am calling OSSystemExtensionRequest.submitRequest with a request object created by OSSystemExtensionRequest.activationRequest, but the didFailWithError callback is called with OSSystemExtensionErrorDomain of a value of 9, which appears to be a general failure to activate the driver. I can find no other information on how to address this issue, but I presume the issue is one of entitlements in either the entitlements file or Info.plist. I will have more code-based details below. For testing context, I am testing this on a 2021 iMac (M1) running Sequoia 15.7, and this iMac is on MDM, specifically Jamf. I have disabled SIP and set systemextensionsctl developer on, per the instructions here, and I have compiled and am attempting to debug the app using xcode 26.2. The driver itself targets DriverKit 25, as 26 does not appear to be available in xcode despite hints on google that it's out. For the software, I have a two-target structure in my xcode project, the main Manager app, which is a swift-ui app that both handles installation/activation of the driver and (if that finally manages to work) handles communication from the driver via its UserClient, and the driver which compiles as a dext. Both apps compile and use automated signing attached to our Apple Development team. I won't delve into the Manager app much, as it runs even though activation fails, except to include its entitlements file in case it proves relevant <dict> <key>com.apple.developer.driverkit.communicates-with-drivers</key> <true/> <key>com.apple.developer.system-extension.install</key> <true/> <key>com.apple.security.app-sandbox</key> <true/> <key>com.apple.security.files.user-selected.read-only</key> <true/> </dict> and the relevant activation code: func request(_ request: OSSystemExtensionRequest, didFailWithError error: any Error) { // handling the error, which is always code value 9 } func activateDriver() { let request = OSSystemExtensionRequest.activationRequest(forExtensionWithIdentifier: "com.mycompany.driver.bundle.identifier", queue: .main) request.delegate = self OSSystemExtensionManager.shared.submitRequest(request) //... } And finally the Manager app has the following capabilities requested for its matching identifier in our Apple Developer Account: DriverKit Communicates with Drivers System Extension On the Driver side, I have two major pieces, the main driver class MyDriver, and UserClient class, StatusUserClient. MyDriver derives from IDriverKit/IOService.iig but (in case this is somehow important) does not have the same name as the project/target name MyBatteryDriver. StatusUserClient derives from DriverKit/IOUserClient.iig. I have os_log(OS_LOG_DEFAULT, "trace messages") code in every method of both classes, including the initializers and Start implementations, and the log entries never seem to show up in Console, so I presume that means the OS never tried to load the driver. Unless I'm looking in the wrong place? Because I don't think the driver code is the current issue, I won't go into it unless it becomes necessary. As I mentioned above, I think this is a code signing / entitlements issue, but I don't know how to resolve it. In our Apple Developer account, the Driver's matching identifier has the following capabilities requested: DriverKit (development) DriverKit Allow Any UserClient (development) DriverKit Family HID Device (development) -- NOTE: this is planned for future use, but not yet implemented by my driver code. Could that be part of the problem? DriverKit Transport HID (development) DriverKit USB Transport (development) DriverKit USB Transport - VendorID -- submitted, no response from Apple yet HID Virtual Device -- submitted, no response from Apple. yet. This is vestigial from an early plan to build the bridge via shared memory funneling to a virtual HID device. I think I've found a way to do it with one Service, but... not sure yet. Still, that's a problem for tomorrow. Apparently I've gone over the 7000 character maximum so I will add my entitlements and info.plist contents in a reply.
8
0
267
15h