Search results for

“Popping Sound”

20,035 results found

Post

Replies

Boosts

Views

Activity

Background upload issue in WatchOS
We are developing a watchOS application that records long audio sessions and uploads them to our backend in chunks (~5 MB each) using pre-signed URLs and URLSession background upload. Current behavior: While audio recording is active, uploads continue successfully even when the app is in the background. Once the recording stops, if multiple chunks (e.g., 10+) are still pending, the remaining uploads do not proceed in the background and appear to be suspended. We attempted to use WKExtendedRuntimeSession (mindfulness type) to allow sufficient time to enqueue background upload tasks, but the session is invalidated when the app goes to the background (e.g., wrist down or app inactive), which prevents reliable scheduling of uploads. Additionally, we added the entitlement: com.apple.developer.extended-runtime-session (mindfulness) in the Watch app entitlements file, but Xcode automatic signing fails with: “Provisioning profile does not include the com.apple.developer.extended-runtime-session enti
2
0
137
1w
Reply to CloudKit, cannot deploy private database initial schema to production
When running the app in the development environment, I can see that data is saved and can be retrieved successfully. However, in the iCloud console, I don’t see any record types or even the custom zone. Hmm, this doesn't sound right. Would you mind to share the detailed steps you used to reproduce the issue? It will be really strange if you see the data but not the schema in CloudKit Console. Be sure that you choose the right container and the development environment. Additionally, I’m unable to deploy any schema to production because no changes are detected. CloudKit Console doesn't deploy the schema, if the schema in the development environment is indeed empty. Installing the app from TestFlight when trying to upload a record CloudKit reports this error: The error indicates that MyType didn't exist and the attempt to create it failed, which is as-designed because a TestFlight app by default uses the CloudKit production environment and creating a new record type isn't allowed in the environment. Be
1w
Reply to Do watchOS widget reloads in an active workout session count against the daily budget?
Thanks for the post, I’m not an expert in watchOS, but I’m relative familiar with in Live Activity and Widgets. However, waiting for a confirmation from a watchOS engineer on this. On watchOS, starting an HKWorkoutSession elevates your app's lifecycle state. The system considers your app to be actively in use by the user equivalent to being in the foreground, or having an active audio/navigation session. Looking at the documentation and trying to make sense of it, because the system recognizes the user is actively engaged in the workout, WidgetKit suspends the standard daily reload budget to allowed unlimited complication updates during an active workout. The budget exception only applies while the HKWorkoutSession is in the .running state. If the workout is paused, ended, or suspended, your app loses this elevated privilege and any subsequent calls to reloadTimelines will immediately start counting against your standard daily budget. Again, inviting watchOS experts here to jump in the thread to veri
1w
AlarmKit sometimes creates a blank (empty) Live Activity
Hi! My users have reported (and I have observed) a blank Live Activity where only a black capsule is shown in the dynamic island. When tapping that capsule, the app opens, but inside the capsule, nothing is shown. The Live Activity is created through the AlarmKit API like this: let identifier = UUID() Task { do { _ = try await AlarmManager.shared.schedule( id: identifier, configuration: .init( countdownDuration: countdownDuration, attributes: attributes, stopIntent: CancelTimerIntent(), secondaryIntent: RestartTimerIntent(), sound: Settings.shared.systemAlarmToneEnabled ? .default : .named(Settings.shared.alarmTone[.loop].filename) ) ) Log.debug(Alarm scheduled successfully: (identifier.uuidString)) } catch { Log.error(Error scheduling alarm with id (identifier.uuidString), error: (error)) } } I've read some other forum posts where developers reported the same issue: https://developer.apple.com/forums/thread/807335 https://developer.apple.com/forums/thread/812006 I assume, it has something to do with
1
0
120
1w
Reply to Unlock with Touch ID suggested despite system.login.screensaver being configured with authenticate-session-owner rule
[quote='819454021, oleksandr91, /thread/819454, /profile/oleksandr91'] Is this a known macOS bug? [/quote] I’m pretty sure I’ve seen this before. IIRC the problem was reported by a third-party developer and I found it super hard to reproduce, and thus I’m not sure if a bug got filed. Sorry to be vague about the details; I searched my records but was unable to track down the conversation. Anyway, it sounds like you can easily reproduce this. Given that, I think it make sense for you to file your own bug about it. Please post your bug number, just for the record. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Privacy & Security SubTopic: General Tags:
1w
hapticpatternlibrary.plist error with Text entry fields in Simulator only
When I have a TextField or TextEditor, tapping into it produces these two console entries about 18 times each: CHHapticPattern.mm:487 +[CHHapticPattern patternForKey:error:]: Failed to read pattern library data: Error Domain=NSCocoaErrorDomain Code=260 The file “hapticpatternlibrary.plist” couldn’t be opened because there is no such file. UserInfo={NSFilePath=/Library/Audio/Tunings/Generic/Haptics/Library/hapticpatternlibrary.plist, NSURL=file:///Library/Audio/Tunings/Generic/Haptics/Library/hapticpatternlibrary.plist, NSUnderlyingError=0x600000ca1b30 {Error Domain=NSPOSIXErrorDomain Code=2 No such file or directory}} <_UIKBFeedbackGenerator: 0x600003505290>: Error creating CHHapticPattern: Error Domain=NSCocoaErrorDomain Code=260 The file “hapticpatternlibrary.plist” couldn’t be opened because there is no such file. UserInfo={NSFilePath=/Library/Audio/Tunings/Generic/Haptics/Library/hapticpatternlibrary.plist, NSURL=file:///Library/Audio/Tunings/Generic/Haptics/Libra
4
0
721
1w
Reply to DriverKit Entitlement Model Has No Viable Path for Open Source and Community-Maintained Drivers
A free or reduced-cost entitlement path for non-commercial volunteer-maintained drivers If you haven't already, please file a bug asking for the dev-only entitlements to be enabled on free developer accounts, and post the bug number back here. I can't promise it will happen, but it's an interesting idea that I don't think we've really considered. Published approval criteria and timelines so projects can plan accordingly Unfortunately, publishing truly formal criteria is much more difficult than it sounds since, in practice, it's very difficult to come up with a criteria set that EXACTLY covers every reasonable use case while also excluding every possible unreasonable use case... and that assumes we could even come up with every use case. However, on this point: Even if the developer is a professional company, some legacy hardware will go unsupported because of a lack of support from the vendor. Providing a way for users who need access to older hardware would be needed. We understand that the nature
Topic: App & System Services SubTopic: Drivers Tags:
1w
WatchOS: Can a background metronome app coexist with both Runna workout and Spotify playback?
I’m building a standalone Apple Watch metronome app for running. My goal is for these 3 apps to work at the same time: Runna owns the workout session Spotify plays music my app plays a metronome click in the background So far this is what I've found: Using HKWorkoutSession in my metronome app works well with Spotify, but conflicts with Runna and other workout apps, so I removed that. Using watchOS background audio with longFormAudio allows my app run in the background, and it can coexist with Runna. However, it seems to conflict with Spotify playback, and one app tends to stop the other. Is there any supported watchOS audio/background configuration that allows all 3 at once? More specifically this is what I need: another app owns HKWorkoutSession Spotify keeps playing my app keeps generating metronome clicks in the background Or is this simply not supported by current watchOS session/background rules? My metronome uses AVAudioEngine / AVAudioPlayerNode with generated click audio. Th
4
0
319
1w
Reply to WatchOS: Can a background metronome app coexist with both Runna workout and Spotify playback?
Thanks for the reply! I have also tested AVAudioSession with .playback + .mixWithOthers on watchOS. That works for mixing my metronome with Spotify while the metronome app is in the foreground, which matches the behavior I already see on iPhone. However, on watchOS the metronome stops once the app goes to the background, while longFormAudio keeps it alive but then conflicts with Spotify. So this seems to be a watchOS-specific limitation rather than a general AVAudioSession limitation on Apple platforms. It would be very useful if watchOS supported a way to combine background audio persistence (longFormAudio) with cooperative mixing behavior (mixWithOthers) for lightweight apps like metronomes, cues, or coaching audio. Is there any way I can formally request this feature other than the FB22273077 I have already submitted?
Topic: Media Technologies SubTopic: Audio Tags:
1w
Using StoreKit from an AUv3 plugin that can be loaded in-process
I have a bunch of Audio Unit v3 plugins that are approaching release, and I was considering using subscription-model pricing, as I have done in a soon to be released iOS app. However, whether this is possible or not is not at all obvious. Specifically: The plugin can, depending on the host app, be loaded in-process or out-of-process - yes, I know, Logic Pro and Garage Band will not load a plug-in in-process anymore, but I am not going to rule that out for other audio apps and force on them the overhead of IPC (I spent two solid weeks deciphering the process to actually make it possible for an AUv3 to run in-process - see this - https://github.com/timboudreau/audio_unit_rust_demo - example with notes) Depending on how it is loaded, the value of Bundle.main.bundleIdentifier will vary. If I use the StoreKit API, will that return product results for my bundle identifier when being called as a library from a foreign application? I would expect it would be a major security hole if random apps coul
10
0
748
1w
Reply to SpeechAnalyzer.start(inputSequence:) fails with _GenericObjCError nilError, while the same WAV succeeds with start(inputAudioFile:)
I've been working with SpeechAnalyzer.start(inputSequence:) on macOS 26 and got streaming transcription working. A few things that might help: Make sure the AVAudioFormat you use to create AnalyzerInput buffers exactly matches what bestAvailableAudioFormat() returns. Even subtle mismatches (e.g., interleaved vs non-interleaved, different channel layouts) can cause the nilError without a descriptive message. I found that feeding buffers that are too small (< 4096 frames) occasionally triggers this error. Try using larger chunks â I settled on 8192 frames per buffer. The bufferStartTime parameter needs to be monotonically increasing and consistent with the actual audio duration. If there are gaps or overlaps in the timestamps, the stream mode can fail silently or throw nilError. Instead of replaying a WAV file as chunked buffers, I'd suggest testing with live audio from AVCaptureSession first. In my experience, live capture â AnalyzerInput works more reliably than simulated streaming from a
Topic: Media Technologies SubTopic: Audio Tags:
1w
Reply to DriverKit vs MFi for iPad custom hardware serial communication?
> I have a custom hardware board that I want to communicate serially with from an iPad. Should I use the DriverKit route or the MFi route? Depends on exactly what your needs are and the hardware you're working with. Starting with MFi, the biggest advantage is that the software side (ExternalAccessory framework) is far simpler to use and includes support for background access (DriverKit does not). The main downside is that it requires a certain amount of custom hardware and the certification process. Comparing it with DriverKit is... complicated. The software side of DriverKit is FAR more complicated. To start with, the DriverKit API is a somewhat odd derivative of the IOKit kernel API. For someone who's familiar with IOKit, it's similar enough to be understandable, but for a new developer, the learning curve can be quite significant. None of this is helped by the fact that DriverKit is poorly documented[1], to the point that my standard advice to new developers is to study the IOKit kernel API (which has o
Topic: App & System Services SubTopic: Drivers Tags:
1w
Reply to WatchOS: Can a background metronome app coexist with both Runna workout and Spotify playback?
If you are looking for a way to have multiple apps running their own active HKWorkoutSession on watchOS simultaneously, there is no way to do that. This is documented here: Apple Watch runs one workout session at a time. If a second workout starts while your workout is running, your HKWorkoutSessionDelegate object receives an HKError.Code.errorAnotherWorkoutSessionStarted error, and your session ends. Regarding audio, my limited knowledge is that, with AVAudioSession, you can tell the system how to mix your app's audio with the current now-playing app by setting up the session category. You can play with the categories and see if there is one fitting your use case. Best, —— Ziqiao Chen  Worldwide Developer Relations.
Topic: Media Technologies SubTopic: Audio Tags:
2w
How to monitor heart rate in background without affecting Activity Rings?
I'm developing a watchOS nap app that detects when the user falls asleep by monitoring heart rate changes. == Technical Implementation == HKWorkoutSession (.mindAndBody) for background execution HKAnchoredObjectQuery for real-time heart rate data CoreMotion for movement detection == Battery Considerations == Heart rate monitoring ONLY active when user explicitly starts a session Monitoring continues until user is awakened OR 60-minute limit is reached If no sleep detected within 60 minutes, session auto-ends (user may have abandoned or forgotten to stop) App displays clear UI indicating monitoring is active Typical session: 15-30 minutes, keeping battery usage minimal == The Problem == HKWorkoutSession affects Activity Rings during the session. Users receive Exercise goal reached notifications while resting — confusing. == What I've Tried == Not using HKLiveWorkoutBuilder → Activity Rings still affected Using builder but not calling finishWorkout() (per https://developer.apple.com/forums/thread/780220) → Acti
6
0
549
2w
Background upload issue in WatchOS
We are developing a watchOS application that records long audio sessions and uploads them to our backend in chunks (~5 MB each) using pre-signed URLs and URLSession background upload. Current behavior: While audio recording is active, uploads continue successfully even when the app is in the background. Once the recording stops, if multiple chunks (e.g., 10+) are still pending, the remaining uploads do not proceed in the background and appear to be suspended. We attempted to use WKExtendedRuntimeSession (mindfulness type) to allow sufficient time to enqueue background upload tasks, but the session is invalidated when the app goes to the background (e.g., wrist down or app inactive), which prevents reliable scheduling of uploads. Additionally, we added the entitlement: com.apple.developer.extended-runtime-session (mindfulness) in the Watch app entitlements file, but Xcode automatic signing fails with: “Provisioning profile does not include the com.apple.developer.extended-runtime-session enti
Replies
2
Boosts
0
Views
137
Activity
1w
Reply to CloudKit, cannot deploy private database initial schema to production
When running the app in the development environment, I can see that data is saved and can be retrieved successfully. However, in the iCloud console, I don’t see any record types or even the custom zone. Hmm, this doesn't sound right. Would you mind to share the detailed steps you used to reproduce the issue? It will be really strange if you see the data but not the schema in CloudKit Console. Be sure that you choose the right container and the development environment. Additionally, I’m unable to deploy any schema to production because no changes are detected. CloudKit Console doesn't deploy the schema, if the schema in the development environment is indeed empty. Installing the app from TestFlight when trying to upload a record CloudKit reports this error: The error indicates that MyType didn't exist and the attempt to create it failed, which is as-designed because a TestFlight app by default uses the CloudKit production environment and creating a new record type isn't allowed in the environment. Be
Replies
Boosts
Views
Activity
1w
Reply to Do watchOS widget reloads in an active workout session count against the daily budget?
Thanks for the post, I’m not an expert in watchOS, but I’m relative familiar with in Live Activity and Widgets. However, waiting for a confirmation from a watchOS engineer on this. On watchOS, starting an HKWorkoutSession elevates your app's lifecycle state. The system considers your app to be actively in use by the user equivalent to being in the foreground, or having an active audio/navigation session. Looking at the documentation and trying to make sense of it, because the system recognizes the user is actively engaged in the workout, WidgetKit suspends the standard daily reload budget to allowed unlimited complication updates during an active workout. The budget exception only applies while the HKWorkoutSession is in the .running state. If the workout is paused, ended, or suspended, your app loses this elevated privilege and any subsequent calls to reloadTimelines will immediately start counting against your standard daily budget. Again, inviting watchOS experts here to jump in the thread to veri
Replies
Boosts
Views
Activity
1w
AlarmKit sometimes creates a blank (empty) Live Activity
Hi! My users have reported (and I have observed) a blank Live Activity where only a black capsule is shown in the dynamic island. When tapping that capsule, the app opens, but inside the capsule, nothing is shown. The Live Activity is created through the AlarmKit API like this: let identifier = UUID() Task { do { _ = try await AlarmManager.shared.schedule( id: identifier, configuration: .init( countdownDuration: countdownDuration, attributes: attributes, stopIntent: CancelTimerIntent(), secondaryIntent: RestartTimerIntent(), sound: Settings.shared.systemAlarmToneEnabled ? .default : .named(Settings.shared.alarmTone[.loop].filename) ) ) Log.debug(Alarm scheduled successfully: (identifier.uuidString)) } catch { Log.error(Error scheduling alarm with id (identifier.uuidString), error: (error)) } } I've read some other forum posts where developers reported the same issue: https://developer.apple.com/forums/thread/807335 https://developer.apple.com/forums/thread/812006 I assume, it has something to do with
Replies
1
Boosts
0
Views
120
Activity
1w
Reply to Unlock with Touch ID suggested despite system.login.screensaver being configured with authenticate-session-owner rule
[quote='819454021, oleksandr91, /thread/819454, /profile/oleksandr91'] Is this a known macOS bug? [/quote] I’m pretty sure I’ve seen this before. IIRC the problem was reported by a third-party developer and I found it super hard to reproduce, and thus I’m not sure if a bug got filed. Sorry to be vague about the details; I searched my records but was unable to track down the conversation. Anyway, it sounds like you can easily reproduce this. Given that, I think it make sense for you to file your own bug about it. Please post your bug number, just for the record. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
1w
hapticpatternlibrary.plist error with Text entry fields in Simulator only
When I have a TextField or TextEditor, tapping into it produces these two console entries about 18 times each: CHHapticPattern.mm:487 +[CHHapticPattern patternForKey:error:]: Failed to read pattern library data: Error Domain=NSCocoaErrorDomain Code=260 The file “hapticpatternlibrary.plist” couldn’t be opened because there is no such file. UserInfo={NSFilePath=/Library/Audio/Tunings/Generic/Haptics/Library/hapticpatternlibrary.plist, NSURL=file:///Library/Audio/Tunings/Generic/Haptics/Library/hapticpatternlibrary.plist, NSUnderlyingError=0x600000ca1b30 {Error Domain=NSPOSIXErrorDomain Code=2 No such file or directory}} <_UIKBFeedbackGenerator: 0x600003505290>: Error creating CHHapticPattern: Error Domain=NSCocoaErrorDomain Code=260 The file “hapticpatternlibrary.plist” couldn’t be opened because there is no such file. UserInfo={NSFilePath=/Library/Audio/Tunings/Generic/Haptics/Library/hapticpatternlibrary.plist, NSURL=file:///Library/Audio/Tunings/Generic/Haptics/Libra
Replies
4
Boosts
0
Views
721
Activity
1w
Reply to DriverKit Entitlement Model Has No Viable Path for Open Source and Community-Maintained Drivers
A free or reduced-cost entitlement path for non-commercial volunteer-maintained drivers If you haven't already, please file a bug asking for the dev-only entitlements to be enabled on free developer accounts, and post the bug number back here. I can't promise it will happen, but it's an interesting idea that I don't think we've really considered. Published approval criteria and timelines so projects can plan accordingly Unfortunately, publishing truly formal criteria is much more difficult than it sounds since, in practice, it's very difficult to come up with a criteria set that EXACTLY covers every reasonable use case while also excluding every possible unreasonable use case... and that assumes we could even come up with every use case. However, on this point: Even if the developer is a professional company, some legacy hardware will go unsupported because of a lack of support from the vendor. Providing a way for users who need access to older hardware would be needed. We understand that the nature
Topic: App & System Services SubTopic: Drivers Tags:
Replies
Boosts
Views
Activity
1w
WatchOS: Can a background metronome app coexist with both Runna workout and Spotify playback?
I’m building a standalone Apple Watch metronome app for running. My goal is for these 3 apps to work at the same time: Runna owns the workout session Spotify plays music my app plays a metronome click in the background So far this is what I've found: Using HKWorkoutSession in my metronome app works well with Spotify, but conflicts with Runna and other workout apps, so I removed that. Using watchOS background audio with longFormAudio allows my app run in the background, and it can coexist with Runna. However, it seems to conflict with Spotify playback, and one app tends to stop the other. Is there any supported watchOS audio/background configuration that allows all 3 at once? More specifically this is what I need: another app owns HKWorkoutSession Spotify keeps playing my app keeps generating metronome clicks in the background Or is this simply not supported by current watchOS session/background rules? My metronome uses AVAudioEngine / AVAudioPlayerNode with generated click audio. Th
Replies
4
Boosts
0
Views
319
Activity
1w
Reply to WatchOS: Can a background metronome app coexist with both Runna workout and Spotify playback?
Thanks for the reply! I have also tested AVAudioSession with .playback + .mixWithOthers on watchOS. That works for mixing my metronome with Spotify while the metronome app is in the foreground, which matches the behavior I already see on iPhone. However, on watchOS the metronome stops once the app goes to the background, while longFormAudio keeps it alive but then conflicts with Spotify. So this seems to be a watchOS-specific limitation rather than a general AVAudioSession limitation on Apple platforms. It would be very useful if watchOS supported a way to combine background audio persistence (longFormAudio) with cooperative mixing behavior (mixWithOthers) for lightweight apps like metronomes, cues, or coaching audio. Is there any way I can formally request this feature other than the FB22273077 I have already submitted?
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
1w
Using StoreKit from an AUv3 plugin that can be loaded in-process
I have a bunch of Audio Unit v3 plugins that are approaching release, and I was considering using subscription-model pricing, as I have done in a soon to be released iOS app. However, whether this is possible or not is not at all obvious. Specifically: The plugin can, depending on the host app, be loaded in-process or out-of-process - yes, I know, Logic Pro and Garage Band will not load a plug-in in-process anymore, but I am not going to rule that out for other audio apps and force on them the overhead of IPC (I spent two solid weeks deciphering the process to actually make it possible for an AUv3 to run in-process - see this - https://github.com/timboudreau/audio_unit_rust_demo - example with notes) Depending on how it is loaded, the value of Bundle.main.bundleIdentifier will vary. If I use the StoreKit API, will that return product results for my bundle identifier when being called as a library from a foreign application? I would expect it would be a major security hole if random apps coul
Replies
10
Boosts
0
Views
748
Activity
1w
Reply to SpeechAnalyzer.start(inputSequence:) fails with _GenericObjCError nilError, while the same WAV succeeds with start(inputAudioFile:)
I've been working with SpeechAnalyzer.start(inputSequence:) on macOS 26 and got streaming transcription working. A few things that might help: Make sure the AVAudioFormat you use to create AnalyzerInput buffers exactly matches what bestAvailableAudioFormat() returns. Even subtle mismatches (e.g., interleaved vs non-interleaved, different channel layouts) can cause the nilError without a descriptive message. I found that feeding buffers that are too small (< 4096 frames) occasionally triggers this error. Try using larger chunks â I settled on 8192 frames per buffer. The bufferStartTime parameter needs to be monotonically increasing and consistent with the actual audio duration. If there are gaps or overlaps in the timestamps, the stream mode can fail silently or throw nilError. Instead of replaying a WAV file as chunked buffers, I'd suggest testing with live audio from AVCaptureSession first. In my experience, live capture â AnalyzerInput works more reliably than simulated streaming from a
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
1w
Reply to Using StoreKit from an AUv3 plugin that can be loaded in-process
BTW, however I solve this, if I do, it needs to work on both Mac OS and iOS - I have no idea if there's much market for iOS Audio Units, but it was easy enough to build for both, so I will release both. It's at least likely to be a less saturated market :-)
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
1w
Reply to DriverKit vs MFi for iPad custom hardware serial communication?
> I have a custom hardware board that I want to communicate serially with from an iPad. Should I use the DriverKit route or the MFi route? Depends on exactly what your needs are and the hardware you're working with. Starting with MFi, the biggest advantage is that the software side (ExternalAccessory framework) is far simpler to use and includes support for background access (DriverKit does not). The main downside is that it requires a certain amount of custom hardware and the certification process. Comparing it with DriverKit is... complicated. The software side of DriverKit is FAR more complicated. To start with, the DriverKit API is a somewhat odd derivative of the IOKit kernel API. For someone who's familiar with IOKit, it's similar enough to be understandable, but for a new developer, the learning curve can be quite significant. None of this is helped by the fact that DriverKit is poorly documented[1], to the point that my standard advice to new developers is to study the IOKit kernel API (which has o
Topic: App & System Services SubTopic: Drivers Tags:
Replies
Boosts
Views
Activity
1w
Reply to WatchOS: Can a background metronome app coexist with both Runna workout and Spotify playback?
If you are looking for a way to have multiple apps running their own active HKWorkoutSession on watchOS simultaneously, there is no way to do that. This is documented here: Apple Watch runs one workout session at a time. If a second workout starts while your workout is running, your HKWorkoutSessionDelegate object receives an HKError.Code.errorAnotherWorkoutSessionStarted error, and your session ends. Regarding audio, my limited knowledge is that, with AVAudioSession, you can tell the system how to mix your app's audio with the current now-playing app by setting up the session category. You can play with the categories and see if there is one fitting your use case. Best, —— Ziqiao Chen  Worldwide Developer Relations.
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
2w
How to monitor heart rate in background without affecting Activity Rings?
I'm developing a watchOS nap app that detects when the user falls asleep by monitoring heart rate changes. == Technical Implementation == HKWorkoutSession (.mindAndBody) for background execution HKAnchoredObjectQuery for real-time heart rate data CoreMotion for movement detection == Battery Considerations == Heart rate monitoring ONLY active when user explicitly starts a session Monitoring continues until user is awakened OR 60-minute limit is reached If no sleep detected within 60 minutes, session auto-ends (user may have abandoned or forgotten to stop) App displays clear UI indicating monitoring is active Typical session: 15-30 minutes, keeping battery usage minimal == The Problem == HKWorkoutSession affects Activity Rings during the session. Users receive Exercise goal reached notifications while resting — confusing. == What I've Tried == Not using HKLiveWorkoutBuilder → Activity Rings still affected Using builder but not calling finishWorkout() (per https://developer.apple.com/forums/thread/780220) → Acti
Replies
6
Boosts
0
Views
549
Activity
2w