Is it possible to perform speech-to-text using AVAudioEngine to capture microphone input while being on a FaceTime call at the same time?
I tried implementing this, but whenever I attempt to start the AVAudioEngine while a FaceTime call is active, I get the following error:
“The operation couldn’t be completed. (OSStatus error 2003329396)”
I assume this might be due to microphone resource restrictions during FaceTime, but I’d like to confirm whether this limitation is at the system level or if there’s any possible workaround or entitlement that allows concurrent microphone access.
Has anyone encountered this issue or found a solution?
General
RSS for tagExplore the integration of media technologies within your app. Discuss working with audio, video, camera, and other media functionalities.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
I’ve been struggling with a very frustrating issue using the new iOS 26 Swift Concurrency APIs for video processing. My pipeline reads frames using AVAssetReader, processes them via CIContext (Lanczos upscale), and then appends the result to an AVAssetWriter using the new PixelBufferReceiver.
The Problem: The execution randomly stops at the ]await append(...)] call. The task suspends and never resumes.
It is completely unpredictable: It might hang on the very first run, or it might work fine for 4-5 runs and then hang on the next one.
It is independent of video duration: It happens with 5-second clips just as often as with long videos.
No feedback from the system: There is no crash, no error thrown, and CPU usage drops to zero. The thread just stays in the suspended state indefinitely.
If I manually cancel the operation and restart the VideoEngine, it usually starts working again for a few more attempts, which makes me suspect some internal resource exhaustion or a deadlock between the GPU context and the writer's input.
The Code: Here is a simplified version of my processing loop:
private func proccessVideoPipeline(
readerOutputProvider: AVAssetReaderOutput.Provider<CMReadySampleBuffer<CMSampleBuffer.DynamicContent>>,
pixelBufferReceiver: AVAssetWriterInput.PixelBufferReceiver,
nominalFrameRate: Float,
targetSize: CGSize
) async throws {
while !Task.isCancelled, let payload = try await readerOutputProvider.next() {
let sampleBufferInfo: (imageBuffer: CVPixelBuffer?, presentationTimeStamp: CMTime) = payload.withUnsafeSampleBuffer { sampleBuffer in
return (sampleBuffer.imageBuffer, sampleBuffer.presentationTimeStamp)
}
guard let currentPixelBuffer = sampleBufferInfo.imageBuffer else {
throw AsyncFrameProcessorError.missingImageBuffer
}
guard let pixelBufferPool = pixelBufferReceiver.pixelBufferPool else {
throw NSError(domain: "PixelBufferPool", code: -1, userInfo: [NSLocalizedDescriptionKey: "No pixel buffer pool available"])
}
let newPixelBuffer = try pixelBufferPool.makeMutablePixelBuffer()
let newCVPixelBuffer = newPixelBuffer.withUnsafeBuffer({ $0 })
try upscale(currentPixelBuffer, outputPixelBuffer: newCVPixelBuffer, targetSize: targetSize )
let presentationTime = sampleBufferInfo.presentationTimeStamp
try await pixelBufferReceiver.append(.init(unsafeBuffer: newCVPixelBuffer), with: presentationTime)
}
}
Does anyone know how to fix it?
I’ve been using Apple Music API for quite a while now and a recent change must have happened which is quite disruptive.
On many occasions, artists release singles from an album as part of promoting this album. For recent examples, Harry Styles released “Aperture” (a single) to promote his upcoming album “Kiss All The Time. Disco, Occasionally“. Similarly, Bruno Mars released “I Just Might”, a single from the upcoming album “The Romantic”.
Previously, those would return at the endpoint ”artists/{artist_id}/albums” with a “- Single” suffix. But it seems a recent change happens where they only appear as playable tracks inside the album.
This behavior is also evident in the Apple Music app itself. Those singles no longer appear under “Singles & EPs”. Instead, they would only be visible if the single becomes popular enough to be shown on “Top Songs“. Otherwise one would have to know to tap on the (future) album to discover if there are released singles.
Meanwhile Spotify’s API returns those as singles properly, just like Apple Music API used to.
This change must be recent but the question is if it’s intentional, and if so, how can the API be used from here on out to “extract” those singles and represent them?
I’m trying to build a playlist editor on macOS. I can create playlists via the Apple Music HTTP API, but DELETE always returns 401 even immediately after creation with
the same tokens.
Minimal repro:
#!/usr/bin/env bash
set -euo pipefail
BASE_URL="https://api.music.apple.com/v1"
PLAYLIST_NAME="${PLAYLIST_NAME:-blah}"
: "${APPLE_MUSIC_DEV_TOKEN:?}"
: "${APPLE_MUSIC_USER_TOKEN:?}"
create_body="$(mktemp)"
delete_body="$(mktemp)"
trap 'rm -f "$create_body" "$delete_body"' EXIT
curl -sS --compressed -o "$create_body" -w "Create status: %{http_code}\n" \
-X POST "${BASE_URL}/me/library/playlists" \
-H "Authorization: Bearer ${APPLE_MUSIC_DEV_TOKEN}" \
-H "Music-User-Token: ${APPLE_MUSIC_USER_TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"attributes\":{\"name\":\"${PLAYLIST_NAME}\"}}"
playlist_id="$(python3 - "$create_body" <<'PY'
import json, sys
with open(sys.argv[1], "r", encoding="utf-8") as f:
data = json.load(f)
print(data["data"][0]["id"])
PY
)"
curl -sS --compressed -o "$delete_body" -w "Delete status: %{http_code}\n" \
-X DELETE "${BASE_URL}/me/library/playlists/${playlist_id}" \
-H "Authorization: Bearer ${APPLE_MUSIC_DEV_TOKEN}" \
-H "Music-User-Token: ${APPLE_MUSIC_USER_TOKEN}" \
-H "Content-Type: application/json"
I capture the response bodies like this:
cat "$create_body"
cat "$delete_body"
Result:
Create: 201
Delete: 401
I also checked the latest macOS SDK’s MusicKit interfaces and MusicLibrary.createPlaylist/edit/add(to:) are marked @available(macOS, unavailable), so I can’t create/
delete via MusicKit on macOS either.
Question: How can I implement a playlist editor on macOS (create/delete/modify) if:
MusicKit write APIs are unavailable on macOS, and
The HTTP API can create but DELETE returns 401?
Any guidance or official workaround would be hugely appreciated.
Has anyone seen this issue?
We have a user who changed their Apple ID password about 5 days ago. Now when they authenticate via MusicKit JS:
authorize() succeeds and returns a user token
Immediately calling any /me/ endpoint returns 403 "Invalid authentication" (code 40300)
Developer token works fine on catalog endpoints
User has active Apple Music subscription
Other users work fine through the same flow
App doesn't appear in user's "Apps Using Your Apple ID"
We've tried:
Calling unauthorize() before authorize()
Clearing localStorage/sessionStorage/cookies
Multiple re-auth attempts over several days
The token is freshly issued but Apple's API immediately rejects it.
Anyone encountered this after a password change? Any workarounds?
Hi all,
I've been working on some personal programming projects and have gotten into using the Apple Music API. I'm currently looking to get a list of recent songs using the /v1/me/recent/played/tracks endpoint and it's working well.
However, I know there are some songs I've listened to multiple times in a row, and those are not showing up as unique tracks when querying this endpoint. I'm only seeing a list of the different songs I've listened to lately, not a true list of the most recent plays on my account.
Is this intended behavior or am I going about something incorrectly here? My query is using that endpoint & specifying the types to be only [songs].
Thanks in advance for any ideas or insight.
Hi team,
In the Apple Music Feed datasets, we've noticed some unexpected values in the song and album tables.
The primaryartists column from either song or album may contain a "non-default" artist name such as the katakana name shown in the example below:
select id, name, namedefault, primaryartists from amf_song where id = '1698723329'
id | name | namedefault | primaryartists
----------------------------------------
1698723329 | {default=California} | California | [{id=1264818718, name=チャペル・ローン}]
select * from amf_artist where id = '1264818718'
id | name | namedefault | namepronunciation |
----------------------------------------------
1264818718 | {default=Chappell Roan, ja=チャペル・ローン} | Chappell Roan | {ja=チャペルローン} |
Shouldn't the primaryartists column be showing the namedefault instead of the Japanese language version?
When can we expect this bug to resolved?
Thanks,
Hello,
We are trying to use the new Background Upload Extension to improve uploads of assets (Photos, Live Photos, Videos) in the background in our application.
1 - We implemented the code to upload still images.
We would like to do the same for Live Photos but we are not sure how to proceed since a Live Photo is composed of 2 resources that we would like to upload in the same job so that we keep the association between the 2
resources.
Steps:
A Live Photo is captured on the device.
Our application is notified for new content in the Photo Library and the asset is queued for upload by our application.
The system calls the background upload extension and the Live Photo is prepared for upload but we can schedule a job only for one resource (still photo or paired video) so we can not upload both resources in a single job.
2 - Is there a way to synchronise the application and the extension so that the application would not process the same data or execute the same requests than the extension. For example: our application is working with
tokens and we would like to prevent those tokens to be consumed by the application and the extension at the same
time.
3 - is there a command in xcode or terminal to start or stop the extension, something similar to what exists for processing tasks
(https://developer.apple.com/documentation/backgroundtasks/starting-and-terminating-tasks-during-development).
Hi,
We identified massive amounts of leaked memory with the tvOS 26 standard player user interface as soon as chapters (navigation markers) are involved.
Artwork images associated with chapters are not correctly released anymore, leaking memory in chunks of several MiBs.
Over time apps will be terminated by the system due to excessive memory consumption.
The issue was reported to Apple as tvOS 26 regression: Huge memory leaks associated with navigation marker artworks displayed in the tvOS standard user interface, filed under FB21160665.
Hello,
We are experiencing on some occasions a wrong behavior with PDFDocument method:
func page(at index: Int) -> PDFPage?
With certain PDF files, this method returns the wrong PDFPage.
This occurs on iOS 18.3, 18.5 and 18.6.2 (an maybe on other versions).
Try this PDF for instance (page 81 is returned when index = 2):
https://drive.google.com/open?id=1MHm2wjfsbWB8OiRmARUMmvODYxp4DIqP&usp=drive_fs
Also, I mention that this doesn't occur systematically with this PDF. When making a copy of this file we don't observe the issue.
Could this be linked some kind of internal cache issue ?
Hey Swift community!
I'm exploring building a macOS app that needs to monitor what's currently playing in music apps like Spotify and Apple Music (track info, playback position, play/pause state). I'm trying to figure out the most efficient architecture before diving in.
The Goal:
Monitor playback state across multiple music players to react to changes in real-time, ideally with minimal CPU overhead since this would run continuously in the background.
Approaches I'm Considering
AppleScript / ScriptingBridge
Distributed Notifications
Native Frameworks (Apple Music only)
What's the recommended way to do this on macOS?
Are distributed notifications reliable enough to avoid polling entirely?
Is there a performance difference between AppleScript and ScriptingBridge for IPC?
For Apple Music specifically, should I use MusicKit, MediaPlayer, or stick with AppleScript?
Are there other approaches I'm missing?
Topic:
Media Technologies
SubTopic:
General
Dear Apple Developer Team,
On iOS 26, the contents of PDF pages appear to be swapped.
Could you please advise if there is a workaround or a planned fix for this issue?
Steps to Reproduce:
Download the attached PDF on iOS 26.
Open the PDF in the Files app.
Tap the PDF to view it in Quick Look.
Navigate to page 5.
Expected Result:
The page number displayed at the bottom should be 5.
Actual Result:
The page number displayed at the bottom is 4.
Issue:
This is not limited to page 5—multiple page contents appear to be swapped.
I have also submitted feedback via Feedback Assistant (FB20743531) on October 20.
Best regards,
Yoshihito Suezawa
part of the .swift file that controla the haptics buzz per each heart beat. however gives a 3-5 seconds delay between actual heart beat and watch haptic/buzz for that heart beat.
With older iOS versions, when user taps Mute/Volume button on AVPLayerViewController to unmute, the system restores the sound volume of device to the level when user muted before.
On iOS 26, when user taps unmute button on screen, the volume starts from 0 (not restore). (but it still restores if user unmutes by pressing physical volume buttons).
As I understand, the Volume bar/button on AVPlayerViewController is MPVolumeView, and I can not control it. So this is a feature of the system.
But I got complaints that this is a bug. I did not find documents that describe this change of Mute button behavior.
I need some bases to explain this situation. Thank you.
I use
htttps://api.music.apple.com/v1/me/library/playlists/${playlistId}/tracks
to add tracks to a playlist I created.
How do I DELETE tracks from the playlist?
The documentation does not mention a method for this. I have tried calling DELETE methods in various combinations but nothing seems to work.
Is this possible?
When I’m on FaceTime, my phone will randomly end my call? I have an iPhone 17, iOS 26.1. Some times I won’t even be touching my phone screen and it’ll hang up. I’m not sure if this is a universal issue or just a me problem. It’s getting really annoying.
Topic:
Media Technologies
SubTopic:
General
Hello, I'm trying to write a shortcut using Toolbox Pro that gets triggered by an accessibility trigger and then favorites the currently playing song. It's working pretty well, but I noticed that for some artists, especially asian ones, it simply doesn't work. While debugging, I noticed that the tool uses the same song ID, artist ID, everything as it should to search for the song and favorite it. However, I noticed that Apple Music treats artists with romanized names as two separate artists!
https://music.apple.com/br/artist/王菲/41760704
https://music.apple.com/br/artist/faye-wong/41760704?l=en-GB
You can see that the ID is the same (41760704). It seems that, when I search for the artist, the first artist (王菲) returns, so that when I open URLs on the web for the artist I can see a star next to the song name, meaning that it got a like. However, the romanized artist (faye-wong) doesn't have a like on the same song.
This is very weird, right?
Hi there,
I recently launched a dj app to the mac app store, and was wondering how I could access raw data to songs from apple music just like how serato, rekordbox, djay, etc. do?
Thanks,
Gunek
Topic:
Media Technologies
SubTopic:
General
Tags:
Apple Music API
MusicKit
Performance Partners Program
Apple Music Feed
Fetching the featured artists in a playlist, no longer works in iOS 26.1 beta
let detailedPlaylist = try await playlist.with([.tracks, .featuredArtists], preferredSource: .library)
Throws error when using .library and using .catalog returns empty array.
This works correctly in iOS 26.0 and iOS 18 versions
If I fetch a library playlist like the generated "Favorites" playlist via MusicKit like this
guard let initialTracks = try await playlist.with([.tracks]).tracks else {
return nil
}
I get a list of tracks like this:
...
TrackID: i.e5gmPS6rZ856
TrackID: i.4ZQMxU0OxNg0
TrackID: i.J198KH4P85K4
TrackID: i.J1AaRC4P85K4
TrackID: i.4BPqWt0OxNg0
TrackID: 4473570282773028026
TrackID: 4473570282773028025
TrackID: 4015088256684964387
TrackID: 4473570282773028024
TrackID: 7541557725362154249
TrackID: 4473570282773028027
I save the IDs for later use, but when I want to fetch them, only the ones with ids that starts with "i." work.
static func getLibrarySong(from id: String) async -> Song? {
var request = MusicLibraryRequest<Song>()
request.filter(matching: \.id, equalTo: MusicItemID(id))
do {
let response = try await request.response()
return response.items.first
} catch {
...
}
}
Or the Apple Music API endpoint :
static func getLibrarySongFromAPI(with id: String) async -> Song? {
guard let url = AppleMusicURL.getURL(for: .getSongById, id: id) else {
return nil
}
do {
let dataRequest = MusicDataRequest(urlRequest: URLRequest(url: url))
let dataResponse = try await dataRequest.response()
let response = try JSONDecoder().decode(SongsResponse.self, from: dataResponse.data)
return response.data.first
} catch {
...
}
}
Both functions above won't work for the non numeric like 4473570282773028024 so it seems the ID is wrong, but how do I make it work?
Otherwise I can fetch all the songs fine, in catalog or in the library, but these few songs can't be individually fetched, only with the try await playlist.with([.tracks])` fetch, that gets the whole playlist. But obviously this isn't always possible.
Thanks in advance!