Question:
When implementing simultaneous video capture and audio processing in an iOS app, does the order of starting these components matter, or can they be initiated in any sequence?
I have an actor responsible for initiating video capture using the setCaptureMode function. In this actor, I also call startAudioEngine to begin the audio engine and register a resultObserver. While the audio engine starts successfully, I notice that the resultObserver is not invoked when startAudioEngine is called synchronously. However, it works correctly when I wrap the call in a Task.
Could you please explain why the synchronous call to startAudioEngine might be blocking the invocation of the resultObserver? What would be the best practice for ensuring both components work effectively together? Additionally, if I were to avoid using Task, what approach would be required? Lastly, is the startAudioEngine effective from the start time of the video capture (00:00)?
Platform: Xcode 16, Swift 6, iOS 18
References:
Classifying Sounds in an Audio Stream – In my case, the analyzeAudio() method is not invoked.
Setting Up a Capture Session – Here, the focus is on video capture.
Classifying Sounds in an Audio File
Code Snippet: (For further details. setVideoCaptureMode() surfaces the problem.)
// ensures all operations happen off of the `@MainActor`.
actor CaptureService {
...
nonisolated private let resultsObserver1 = ResultsObserver1()
...
private func setUpSession() throws { .. }
...
setVideoCaptureMode() throws {
captureSession.beginConfiguration()
defer { captureSession.commitConfiguration() }
/* -- Works fine (analyseAudio is printed)
Task {
self.resultsObserver1.startAudioEngine()
}
*/
self.resultsObserver1.startAudioEngine() // Does not work - analyzeAudio not printed
captureSession.sessionPreset = .high
try addOutput(movieCapture.output)
if isHDRVideoEnabled {
setHDRVideoEnabled(true)
}
updateCaptureCapabilities()
}
Delve into the world of built-in app and system services available to developers. Discuss leveraging these services to enhance your app's functionality and user experience.
Post
Replies
Boosts
Views
Activity
I've watched the following 3 WWDC videos on intents and after watching, decided to try and implement an AppIntentsExtension. All my intent action does is run a network request in the background. So it seems like I should be putting it in an AppIntentsExtension instead of in the main app to avoid having to launch the app in the background, and instead have it run directly in the extension.
2022
https://developer.apple.com/videos/play/wwdc2022/10032?time=1620
2023
https://developer.apple.com/videos/play/wwdc2023/10103?time=880
2024
https://developer.apple.com/videos/play/wwdc2024/10134/?time=992
If I just put the intent and shortcut provider code I need inside an AppIntentsExtension, everything works fine except for 1 thing.
I have no way to call updateAppShortcutParameters on my AppShortcutsProvider from the main app because it is defined inside the extension. So I have no way to let siri know to re-query my parameterized phrases, and so siri doesnt expose any new phrases when things in the app are updated.
So to solve this, I somehow need a way to access the AppShortcutsProvider from within the main app to be able to call updateAppShortcutParameters
https://developer.apple.com/documentation/appintents/appshortcutsprovider/updateappshortcutparameters()
What is the recommended way to do this?
Should I be trying to create a separate framework with the shortcut provider, which is then used by both the main app an extension? I tried doing this but ran into a few build errors. I tried changing the target membership of the AppShortcutsProvider to have the file in the extension, but include both the main app and intent extension, this seems to work, but I am unsure if this is the correct approach.
I have implemented a custom AppIntent in a macOS (14+) application and also added AppShortcuts. However whenever I try to launch it from Siri I get "Sorry something went wrong". In the documentation it states that Siri should automagically index and pick up these shortcuts/ intents. What ma I missing ?
Juust before I initiate an App Transfer...
We have sandboxed 'mobile' versions of our app (iOS and mac App) to transfer to the surviving company.
However, we also have a 'full' non-sandboxed legacy desktop dmg version of the app, available for Mac (and Win). This has access to the same iCloud folder
So the question is, what happens to the iCloud app folder on the Mac if they are only using this desktop version, once the transfer takes place? Will it remain visible on the Mac, and will it remain accessible by the desktop version if so?
I expect that although the iCloud entitlement is transferred, as it is another Team ID, the legacy app will not be able to read/write without user prompted permission. What I hope at the least, is that the folder doesn't become invisible on that machine...
To receive silent push notifications in the background, I need to include content-available payload into my APNS push notification, and have application(_:didReceiveRemoteNotification:fetchCompletionHandler:) implemented.
When I send a push notification, my app receives and handles it with the above method.
This works correctly and is straightforward to test when the app is running in foreground or background on my device.
I would like to test if my app is woken up correctly from scratch and does the above work. But how do I do this? How do I get my app into the state where it is started when it receives a silent push notification?
When the user force-kills the app, the notification is not delivered. This is also the case when I as a developer force-kill the app which I am testing. I assume it also applies when I force-stop the app running on my device from within Xcode.
Is there any way for me as a developer to terminate the app, which does not count as “force killing”, and would reliably start the app when it receives the background notification?
I'm seeing a lot of these in my logs:
PersistentIdentifier PersistentIdentifier(id: SwiftData.PersistentIdentifier.ID(url: x-swiftdata://Course/BC9CF99A-DE6A-46F1-A18D-8034255A56D8), implementation: SwiftData.PersistentIdentifierImplementation) was remapped to a temporary identifier during save: PersistentIdentifier(id: SwiftData.PersistentIdentifier.ID(url: x-coredata:///Course/t58C849CD-D895-4773-BF53-3F63CF48935B210), implementation: SwiftData.PersistentIdentifierImplementation). This is a fatal logic error in DefaultStore
... though everything seems to work.
Does anyone know what this means in this context? Anything I can do to not have this appear?
We have a requirement to include Apple Pay In-App Provisioning in our Mobile Application and we have an API from Backend to get the tokenReferenceID for a given Card. I want to query the passes from Apple Wallet to see if there are any matches to the given tokenReferenceID before I can decide whether to show the “Add to Apple Wallet” button or not.
I went through all PassKit APIs but couldn’t find a way to query for passes with tokenReferenceID. We have primaryAccountIdentifier, deviceAccountIdentifier but which one should be used to match with tokenReferenceID?
Can someone please help me how to query the Wallet passes with tokenReferenceID using PassKit?
All of a sudden my app started getting this CloudKit error, and it happens to a lot of users. I had no changes to cloud sync for months and really surprised by seeing this. What confuses me even more, is that there is no information on the web about this kind of error. I have no idea what causes it and how to solve it. Would love to get any feedback from the CloudKit engineer.
Client went away before operation 27761871408C460A could be validated; failing
{
"NSUnderlyingError": "<CKUnderlyingError 0x600002573f30: \"ClientInternalError\" (2005); \"Client went away before operation 27761871408C460A could be validated; failing\">",
"CKErrorDescription": "Client went away before operation 27761871408C460A could be validated; failing",
"NSDebugDescription": "CKInternalErrorDomain: 2005",
"NSLocalizedDescription": "Client went away before operation 27761871408C460A could be validated; failing"
}
Seems to happen only on macOS.
Hello,
After iOS 18 fetchChanges() method of CloudKitSync engine does not work as before. Calling the function doesn't fetch changes always, but it does fetch on iOS 17.
However going background and foreground again fetches changes automatically.
Hi,
I'd like to develop sticker packs for iMessage. In particular, I'd like to have custom UIs so user can select different groups of stickers under the same sticker drawer. Based on what I read in the developer doc, sticker pack does not allow custom UIs, and I have to go to iMessage apps. However, I discovered quite a few sticker packs have custom UIs. For example, GIPHY, Fluffcorn, Animal Stickers, Mochj Cat, they are in sticker drawer but they still have custom UIs with tabs. How is this possible? Is there something I'm missing from the developer doc? Thanks a lot!
I solved before writing it up entirely and i accidentally hit enter and submitted it and cant delete the post
Since I updated to iOS 18, CallKit-linked caller not display on screen of CarPlay.
CarPlay display only "{App Name} Caller ID".
When iOS version was 17.x, CarPlay displayed caller name of CallKit-linked contact.
I think CarPlay should perform the same function as iOS 17.
Please review it.
I tried to add a few yearly reminder but every reminder is adding to the next year today's date
Example - Reminder for 5th October is setting to 30/9/25
After a prolonged BLE connection, we have noticed that ANCS frequently pushes a large number of "remove" messages (event ID 0x02), after which the device no longer receives any notifications. Is this behavior a result of system design, or could it be a potential bug? I would appreciate any insights or experiences that others can share.
I'm trying to read a tag generated by my app that emulates event input tags; in my NFC reader app and I get this error:
<NSXPCConnection: 0x300a108c0> connection to service with pid 62 named com.apple.nfcd.service.corenfc: Exception caught during decoding of received selector didDetectExternalReaderWithNotification:, dropping incoming message.
Exception: Exception while decoding argument 0 (#2 of invocation):
Exception: decodeObjectForKey: class "NFFieldNotificationECP1_0" not loaded or does not exist
(
0 CoreFoundation 0x0000000192b00f2c 76A3B198-3C09-323E-8359-0D4978E156F5 + 540460
1 libobjc.A.dylib 0x000000018a9a32b8 objc_exception_throw + 60
2 Foundation 0x0000000191932584 D27A6EC5-943C-3B0E-8D15-8840FD2914F0 + 38276
3 Foundation 0x0000000191930d10 D27A6EC5-943C-3B0E-8D15-8840FD2914F0 + 32016
4 Foundation 0x000000019198f460 D27A6EC5-943C-3B0E-8D15-8840FD2914F0 + 418912
5 Foundation 0x000000019198c510 D27A6EC5-943C-3B0E-8D15-8840FD2914F0 + 406800
6 Foundation 0x00000001919e4cf4 D27A6EC5-943C-3B0E-8D15-8840FD2914F0 + 769268
7 Foundation 0x00000001919e3a60 D27A6EC5-943C-3B0E-8D15-8840FD2914F0 + 764512
8 Foundation 0x00000001919e31c4 D27A6EC5-943C-3B0E-8D15-8840FD2914F0 + 762308
9 Foundation 0x00000001919e307c D27A6EC5-943C-3B0E-8D15-8840FD2914F0 + 761980
10 libxpc.dylib 0x00000001ef5a1cbc CD0F76A8-713A-3FDB-877E-386B089BC2D1 + 72892
11 libxpc.dylib 0x00000001ef5a3908 CD0F76A8-713A-3FDB-877E-386B089BC2D1 + 80136
12 libdispatch.dylib 0x000000010401e87c _dispatch_client_callout4 + 20
13 libdispatch.dylib 0x000000010403bec4 _dispatch_mach_msg_invoke + 516
14 libdispatch.dylib 0x00000001040264a4 _dispatch_lane_serial_drain + 376
15 libdispatch.dylib 0x000000010403cea8 _dispatch_mach_invoke + 480
16 libdispatch.dylib 0x00000001040264a4 _dispatch_lane_serial_drain + 376
17 libdispatch.dylib 0x000000010402743c _dispatch_lane_invoke + 460
18 libdispatch.dylib 0x0000000104034404 _dispatch_root_queue_drain_deferred_wlh + 328
19 libdispatch.dylib 0x0000000104033a38 _dispatch_workloop_worker_thread + 444
20 libsystem_pthread.dylib 0x00000001ef550934 _pthread_wqthread + 288
21 libsystem_pthread.dylib 0x00000001ef54d0cc start_wqthread + 8
)
(
0 CoreFoundation 0x0000000192b00f2c 76A3B198-3C09-323E-8359-0D4978E156F5 + 540460
1 libobjc.A.dylib 0x000000018a9a32b8 objc_exception_throw + 60
2 Foundation 0x000000019198f680 D27A6EC5-943C-3B0E-8D15-8840FD2914F0 + 419456
3 Foundation 0x000000019198c510 D27A6EC5-943C-3B0E-8D15-8840FD2914F0 + 406800
4 Foundation 0x00000001919e4cf4 D27A6EC5-943C-3B0E-8D15-8840FD2914F0 + 769268
5 Foundation 0x00000001919e3a60 D27A6EC5-943C-3B0E-8D15-8840FD2914F0 + 764512
6 Foundation 0x00000001919e31c4 D27A6EC5-943C-3B0E-8D15-8840FD2914F0 + 762308
7 Foundation 0x00000001919e307c D27A6EC5-943C-3B0E-8D15-8840FD2914F0 + 761980
8 libxpc.dylib 0x00000001ef5a1cbc CD0F76A8-713A-3FDB-877E-386B089BC2D1 + 72892
9 libxpc.dylib 0x00000001ef5a3908 CD0F76A8-713A-3FDB-877E-386B089BC2D1 + 80136
10 libdispatch.dylib 0x000000010401e87c _dispatch_client_callout4 + 20
11 libdispatch.dylib 0x000000010403bec4 _dispatch_mach_msg_invoke + 516
12 libdispatch.dylib 0x00000001040264a4 _dispatch_lane_serial_drain + 376
13 libdispatch.dylib 0x000000010403cea8 _dispatch_mach_invoke + 480
14 libdispatch.dylib 0x00000001040264a4 _dispatch_lane_serial_drain + 376
15 libdispatch.dylib 0x000000010402743c _dispatch_lane_invoke + 460
16 libdispatch.dylib 0x0000000104034404 _dispatch_root_queue_drain_deferred_wlh + 328
17 libdispatch.dylib 0x0000000104033a38 _dispatch_workloop_worker_thread + 444
18 libsystem_pthread.dylib 0x00000001ef550934 _pthread_wqthread + 288
19 libsystem_pthread.dylib 0x00000001ef54d0cc start_wqthread + 8
)
A few weeks ago, I submitted a request for the Family Controls & Personal Device Usage Entitlement to enable my app to access the Managed Settings and Device Activity frameworks in the Screen Time API. The app is nearly complete, with the only remaining component being the Family Controls capability.
As of now, I haven’t received a response regarding the request. I’m wondering if anyone else has experienced a similar situation or can provide insight into the following:
• How long does it typically take to receive feedback on this type of entitlement request?
• Is there a way to check if a request is still active and under review?
• Is a finished website required for the entitlement to be granted?
Any information or guidance would be greatly appreciated!
On macOS Sequoia, the settings to enable FIFinderSync seem to have gone. I have already figured out that Extensions are no longer in the Privacy & Security section, but they are now at General › Login Items & Extensions. Here there is a Finder section, but that is just for the Finder-Extensions, not the Finder-Sync-Extensions. Those previously did not have their own section and were hidden away in the Added Extensions section that apparently no longer exists. I expect that it has been forgotten when migrating.
Where are the settings for this – have they been forgotten?
Hi,
We have an IPv6 only server setup, where we have put AASA file as required:
https://qa-jen.noknoktest.com/.well-known/apple-app-site-association
But Apple CDN does not found it:
https://app-site-association.cdn-apple.com/a/v1/qa-jen.noknoktest.com
Is there any restriction on IPv6 only servers?
Everything works with our other IPv4 servers.
Note: With alternate mode configuration in application, the AASA is accessible to devices.
There is no any geo restriction or IP filtering for server.
What is missing to force CDN cache the file fro mentioned server?
I have some user of my App reporting that they are not able to store thread network credentials in keychain, the error they get is "Can not store frozen credentials".
I couldn't find documentation around this error message, can anyone help me with it's meaning? Why this specific credential can't be stored in keychain?
I am working on developing a Mac app that will be distributed outside of the App Store.
I have added the network extension which packaged in System Extension with packet tunnel capability.
I have created a build following these steps here: https://developer.apple.com/forums/thread/737894
based on your suggestions in my accepted post: https://developer.apple.com/forums/thread/761251
It works fine in this case when the machine has SIP disabled and systemextensionsctl developer on.
As soon as I have made changes on the machine to systemextensionsctl developer off and SIP enabled, System Extension stopped loading.
I have copied the app to the "/Applications" directory before opening it.
When I check the loading status of the system extension with the "systemextensionsctl list" command, it shows as "[validating by category]"
Am I missing something? Thanks in advance.