Post

Replies

Boosts

Views

Activity

Reply to FileManager.removeItem(atPath:) fails with "You don't have permission to access the file" error when trying to remove non-empty directory on NAS
It's more likely that Finder is calling a network-specific file operation for the SMB or AFP connection. You said you "could" work around the problem by manually doing a recursive delete. But does that mean that this actually works? Permissions can be complicated, especially on a Linux-based file server that the user could have configured in an unusual fashion.
Topic: App & System Services SubTopic: Core OS Tags:
Jul ’25
Reply to Can't post because "This post contains sensitive language"
Hello, I have been working on an audio module that plays a specific sound at regular intervals -- similar to a workout timer that alerts the user to switching exercises every few minutes. I'm configuring my audio session like this: let session = AVAudioSession.sharedlnstance() try session.setCategory( .playback, mode: default, options: [.interruptSpokenAudioAndMixWithOthers, duckOthers] ) self.engine.attach(self.player) self.engine.connect(self.player, to: self.engine.outputNode, format: self.audioFormat) try session. setActive(true) I schedule playback using a DispatchQueue (that's what scheduleAudio does): self.scheduleAudio(at: interval.start) { do { try audio.engine.start() audio.node.play() for kue in interval.cues { audio.node.scheduleBuffer(kue.buffer, at: AVAudioTime(hostTime: kue.hostTime)) } } catch { print (Audio activation failed: \(error)") } } This works perfectly in the foreground. But once the app goes into the background, the scheduled callback runs, yet the audio engine does not start, resulting in 'AVAudioSession.ErrorCode.cannotStartPlaying'. Interestingly, if the app is already playing audio before going to the background, the scheduled sounds continue to play as expected. I have added the required background audio mode to my Info plist file by including the key UlBackgroundModes with the value audio. Is there anything else I should configure? What is the best practice to play periodic audio cues when the app runs in the background? How do apps that do turn-by-turn navigation handle continuous audio playback in the background? Any advice or pointers would be greatly appreciated!
Jul ’25
Reply to Can't post because "This post contains sensitive language"
This works perfectly in the foreground. But once the app goes into the background, the scheduled callback runs, yet the audio engine does not start, resulting in 'AVAudioSession.ErrorCode.cannotStartPlaying'. Interestingly, if the app is already playing audio before going to the background, the scheduled sounds continue to play as expected. I have added the required background audio mode to my Info plist file by including the key UlBackgroundModes with the value audio. Is there anything else I should configure? What is the best practice to play periodic audio cues when the app runs in the background? How do apps that do turn-by-turn navigation handle continuous audio playback in the background? Any advice or pointers would be greatly appreciated!
Jul ’25
Reply to Can't post because "This post contains sensitive language"
Hello, I have been working on an audio module that plays a specific sound at regular intervals -- similar to a workout timer that alerts the user to switching exercises every few minutes. I'm configuring my audio session like this: let session = AVAudioSession.sharedlnstance() try session.setCategory( .playback, mode: default, options: [.interruptSpokenAudioAndMixWithOthers, .duckOthers] ) self.engine.attach(self.player) self.engine.connect(self.player, to: self.engine.outputNode, format: self.audioFormat) try session. setActive(true)
Jul ’25
Reply to Can't post because "This post contains sensitive language"
I just tried posting it without the error code and it still fails with the same message Could be anything really. I know that currently, in this forum, the word "s i g n a l" gets censored with asterisks. In the Apple Support Community, which uses the same back-end software, it's even worse, the word "am" is censored. So all the people trying to post "I am having a problem with...." get censored. What you're experiencing is something else. It could be some other word that is too sensitive to even get redacted with asterisks. Or it could be just some other random bug. Maybe try posting one or more screenshots of your content. At least that way people can read it. And if you have a code sample, the built-in OCR works quite well.
Jul ’25
Reply to "Show API Changes" no longer available on Apple Developer Documentation website?
Try doing diff -r --brief /path/to/Xcode/SDK /path/to/Xcode-beta/SDK and then opendiff on each line. You might need to wrap it in some extra logic because versions numbers in the headers will have been updated, so pretty much every file has been updated. But otherwise, it clearly shows the differences.
Replies
Boosts
Views
Activity
Jul ’25
Reply to FileManager.removeItem(atPath:) fails with "You don't have permission to access the file" error when trying to remove non-empty directory on NAS
It's more likely that Finder is calling a network-specific file operation for the SMB or AFP connection. You said you "could" work around the problem by manually doing a recursive delete. But does that mean that this actually works? Permissions can be complicated, especially on a Linux-based file server that the user could have configured in an unusual fashion.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jul ’25
Reply to Thread running at User-interactive quality-of-service class waiting on a lower QoS thread running at Default quality-of-service class
It looks like you're using the deprecated "metadata" property. I'm not familiar with these AV APIs, but it looks like modern versions make the asynchronous nature of this operation explicit, as in this example.
Replies
Boosts
Views
Activity
Jul ’25
Reply to Redaction problem in the forums
This is another test: let redacted = "signal"
Replies
Boosts
Views
Activity
Jul ’25
Reply to Redaction problem in the forums
This is a signal test.
Replies
Boosts
Views
Activity
Jul ’25
Reply to Can't post because "This post contains sensitive language"
Alas, I don't know the answer to your question. But at least now you can post it without using such naughty language.
Replies
Boosts
Views
Activity
Jul ’25
Reply to Can't post because "This post contains sensitive language"
Hello, I have been working on an audio module that plays a specific sound at regular intervals -- similar to a workout timer that alerts the user to switching exercises every few minutes. I'm configuring my audio session like this: let session = AVAudioSession.sharedlnstance() try session.setCategory( .playback, mode: default, options: [.interruptSpokenAudioAndMixWithOthers, duckOthers] ) self.engine.attach(self.player) self.engine.connect(self.player, to: self.engine.outputNode, format: self.audioFormat) try session. setActive(true) I schedule playback using a DispatchQueue (that's what scheduleAudio does): self.scheduleAudio(at: interval.start) { do { try audio.engine.start() audio.node.play() for kue in interval.cues { audio.node.scheduleBuffer(kue.buffer, at: AVAudioTime(hostTime: kue.hostTime)) } } catch { print (Audio activation failed: \(error)") } } This works perfectly in the foreground. But once the app goes into the background, the scheduled callback runs, yet the audio engine does not start, resulting in 'AVAudioSession.ErrorCode.cannotStartPlaying'. Interestingly, if the app is already playing audio before going to the background, the scheduled sounds continue to play as expected. I have added the required background audio mode to my Info plist file by including the key UlBackgroundModes with the value audio. Is there anything else I should configure? What is the best practice to play periodic audio cues when the app runs in the background? How do apps that do turn-by-turn navigation handle continuous audio playback in the background? Any advice or pointers would be greatly appreciated!
Replies
Boosts
Views
Activity
Jul ’25
Reply to Can't post because "This post contains sensitive language"
It didn't like the word "c u e"
Replies
Boosts
Views
Activity
Jul ’25
Reply to Can't post because "This post contains sensitive language"
try audio.engine.start() audio.node.play() for q in interval.cues { audio.node.scheduleBuffer(q.buffer, at: AVAudioTime(hostTime: q.hostTime)) }
Replies
Boosts
Views
Activity
Jul ’25
Reply to Can't post because "This post contains sensitive language"
self.scheduleAudio(at: interval.start) { do { } catch { print ("Audio activation failed: \(error)") } }
Replies
Boosts
Views
Activity
Jul ’25
Reply to Can't post because "This post contains sensitive language"
I schedule playback using a DispatchQueue (that's what scheduleAudio does):
Replies
Boosts
Views
Activity
Jul ’25
Reply to Can't post because "This post contains sensitive language"
This works perfectly in the foreground. But once the app goes into the background, the scheduled callback runs, yet the audio engine does not start, resulting in 'AVAudioSession.ErrorCode.cannotStartPlaying'. Interestingly, if the app is already playing audio before going to the background, the scheduled sounds continue to play as expected. I have added the required background audio mode to my Info plist file by including the key UlBackgroundModes with the value audio. Is there anything else I should configure? What is the best practice to play periodic audio cues when the app runs in the background? How do apps that do turn-by-turn navigation handle continuous audio playback in the background? Any advice or pointers would be greatly appreciated!
Replies
Boosts
Views
Activity
Jul ’25
Reply to Can't post because "This post contains sensitive language"
Hello, I have been working on an audio module that plays a specific sound at regular intervals -- similar to a workout timer that alerts the user to switching exercises every few minutes. I'm configuring my audio session like this: let session = AVAudioSession.sharedlnstance() try session.setCategory( .playback, mode: default, options: [.interruptSpokenAudioAndMixWithOthers, .duckOthers] ) self.engine.attach(self.player) self.engine.connect(self.player, to: self.engine.outputNode, format: self.audioFormat) try session. setActive(true)
Replies
Boosts
Views
Activity
Jul ’25
Reply to Can't post because "This post contains sensitive language"
I just tried posting it without the error code and it still fails with the same message Could be anything really. I know that currently, in this forum, the word "s i g n a l" gets censored with asterisks. In the Apple Support Community, which uses the same back-end software, it's even worse, the word "am" is censored. So all the people trying to post "I am having a problem with...." get censored. What you're experiencing is something else. It could be some other word that is too sensitive to even get redacted with asterisks. Or it could be just some other random bug. Maybe try posting one or more screenshots of your content. At least that way people can read it. And if you have a code sample, the built-in OCR works quite well.
Replies
Boosts
Views
Activity
Jul ’25
Reply to Can't post because "This post contains sensitive language"
It's probably interpreting that as a phone number and thinks you're trying to post Indian Astrology spam. Ironically enough, if you actually do want to post Indian Astrology spam, and format your phone number properly, not only will your post succeed, you'll probably get a reply suggesting other Apple support forums where you can post instead.
Replies
Boosts
Views
Activity
Jul ’25