I had this new pair of airpods since 2022 bundled with my iPhone 12. I tried connecting to PC as of now, and what's annoying is that my Airpods keep disconnecting by itself from my Windows PC! I am so upset now, and I need your help!
Sound and Haptics
RSS for tagCreate meaningful and delightful experiences that engage a wider range of senses with sound and haptic design.
Posts under Sound and Haptics tag
21 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Just got my hands on the Apple Pencil Pro, and was looking forward to being able to add tactile feedback to my apps through the Pencil.
Apple appears to have updated their docs to make mention of the possibility of haptic feedback via the pencil and makes vague references to a certain SwiftUI modifier, but doesn't give any pencil-specific guidelines, code or speak about its capabilities at all. I'd like to ask if its possible to use CoreHaptic to queue custom haptic feedback (as of now the standard code which works on iPhone doesn't seem to work on an iPad with a paired Pencil Pro), or if that's not possible if there are any updated resources/example code for triggering predefined Pencil Pro haptics.
Can I use Apple's sound recognition in my augmented reality app to trigger content ? Or is there another source I can use?
Hi, I noticed that several of the top Vision Pro apps such as Disney+ and Max have similar if not identical SFX for basic navigation like Select and Back. I was wondering if Apple has provided an audio SFX library as a resource, or if the similarity is coincidental.
I'm not familiar with Apple providing anything like this in the past, but figured on a totally new platform where they might be trying to establish a paradigm, it was worth looking into!
Hello,
I've encountered a concerning issue while working with Core Haptics which I believe warrants attention from the community and Apples engineering team. When attempting to play a haptic pattern using the ChHapticEngine.playPattern method with a corrupted AHAP file path, I've observed unexpected behavior. Specifically, the player is immediately destroyed, triggering the notifyWhenPlayersFinished callback with nil error before executing the catch block(catch block is eventually executed), Furthermore, this behavior introduces ambiguity regarding the successful playback of haptic patterns, as corrupted files can produce false positives in error notifications.
Current workaround is simple, AHAP files are JSON formated files at the end of the day, so just try to decode data or create Foundation object from given JSON data. and if this fails then data must not be in expected format(or decoding strategy is off), that way you can guarantee the validity of an AHAP file before passing it to your player.
Michaud Reyna,
Senior iOS Engineer
Hi everyone,
I'm currently facing an issue with AVAudioPlayer in my SwiftUI project. Despite ensuring that the sound file "buttonsound.mp3" is properly added to the project's resources (I dragged and dropped it into Xcode), the application is still unable to locate the file when attempting to play it.
Here's the simplified version of the code I'm using:
import SwiftUI
import AVFoundation
struct ContentView: View {
var body: some View {
VStack {
Button("Play sound") {
playSound(named: "buttonsound", ofType: "mp3")
}
}
}
}
func playSound(named name: String, ofType type: String) {
guard let soundURL = Bundle.main.url(forResource: name, withExtension: type) else {
print("Sound file not found")
return
}
do {
let audioPlayer = try AVAudioPlayer(contentsOf: soundURL)
audioPlayer.prepareToPlay()
audioPlayer.play()
} catch let error {
print("Error playing sound: \(error.localizedDescription)")
}
}
Hi,
I'm building a simple game for iOS. I have background music.
The ring/silent switch is not disabling sound when switched to silent.
So far I'm testing on devices through TestFlight (still internal testing, not beta).
Do I need to code this function myself or does iOS know it's a game and disable sound automatically?
and/or
would my game be rejected if the switch doesn't disable sound?
(I have an internal setting to enable/disable sounds in the game)
Due to the way it's coded (capacitor app), I can't access the ring/silent switch to disable/enable sound.
Thanks, this problem makes me feel like a preserved moose.
Is there any way we can add a global setting for sound notifications on MacOS, or an option to have the default for newly installed apps to have sound notifications off by default?
Currently, sound notifications for apps need to be turned off one by one, which can be time intensive if lots of apps are installed.
Generate tones, etc. in code? Is there a way?
Regards, Patrick
I'm involved in development on an iOS app for home security and alarm systems. There is recently a lot of negative feedback from customers about how low the notification sounds are since iOS17. Much of the feedback centers around the inability to control the volume of the notification sounds.
My question is: if our app uses custom notification sounds, are these impacted by the volume changes made in iOS 17? I know previous versions of iOS allow you to control "Ringtone and Alert" volume in settings (with a volume slider). Is this same control still available for custom notification sounds within our app?
Please Teach me.
I wan't to get list of SystemSoundId. (relation can file) (Officially if possible)
(example)
1001 - mail-sent.caf
1002 - Voicemail.caf
・
・
I know where [.caf] file in iPhone.
/System/Library/Audio/UISounds/
but, I don't know relation [.caf] and soundId.
Where are my custom text tones? How do I restore my custom text tones? I want my custom text tones back. Are you planning to fix this or am I going to android?
Hi Developers,
Requesting you to please fix the default notification tone "Rebound", its too low and short. I'm missing most of my notifications.
We've been doing the following in our app for years without issues:
[[NSSound soundSystem:@"Basso"] play]
Suddenly we're seeing hundreds of crashes from macOS 14.0 users and we're not sure what's causing this. There are no memory leaks within the app and all the stack traces are around NSSound:
0 AudioToolbox 0x1f558 MEDeviceStreamClient::RemoveRunningClient(AQIONodeClient&, bool, bool) + 3096
1 AudioToolbox 0x1e8fc AQMEDevice::RemoveRunningClient(AQIONodeClient&, bool) + 108
2 AudioToolbox 0x1e854 AQMixEngine_Base::RemoveRunningClient(AQIONodeClient&, bool) + 76
3 AudioToolbox 0xcdd78 AudioQueueObject::StopRunning(AQIONode*, bool) + 244
4 AudioToolbox 0xcbdd0 AudioQueueObject::Stop(bool, bool, int*) + 736
5 AudioToolbox 0xf1840 AudioQueueXPC_Server::Stop(unsigned int, bool) + 172
6 AudioToolbox 0x1418b4 ___ZN20AudioQueueXPC_Bridge4StopEjb_block_invoke + 72
7 libdispatch.dylib 0x3910 _dispatch_client_callout + 20
8 libdispatch.dylib 0x130f8 _dispatch_sync_invoke_and_complete_recurse + 64
9 AudioToolbox 0x141844 AudioQueueXPC_Bridge::Stop(unsigned int, bool) + 184
10 AudioToolbox 0xa09b0 AQ::API::V2Impl::AudioQueueStop(OpaqueAudioQueue*, unsigned char) + 492
11 AVFAudio 0xbe12c AVAudioPlayerCpp::disposeQueue(bool) + 188
12 AVFAudio 0x341dc -[AudioPlayerImpl dealloc] + 72
13 AVFAudio 0x358a0 -[AVAudioPlayer dealloc] + 36
14 AppKit 0x1b13b4 -[NSAVAudioPlayerSoundEngine dealloc] + 44
15 AppKit 0x1b132c -[NSSound dealloc] + 164
16 libobjc.A.dylib 0xf418 AutoreleasePoolPage::releaseUntil(objc_object**) + 196
17 libobjc.A.dylib 0xbaf0 objc_autoreleasePoolPop + 260
18 CoreFoundation 0x3c57c _CFAutoreleasePoolPop + 32
19 Foundation 0x30e88 -[NSAutoreleasePool drain] + 140
20 Foundation 0x31f94 _NSAppleEventManagerGenericHandler + 92
21 AE 0xbd8c _AppleEventsCheckInAppWithBlock + 13808
22 AE 0xb6b4 _AppleEventsCheckInAppWithBlock + 12056
23 AE 0x4cc4 aeProcessAppleEvent + 488
24 HIToolbox 0x402d4 AEProcessAppleEvent + 68
25 AppKit 0x3a29c _DPSNextEvent + 1440
26 AppKit 0x80db94 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
27 AppKit 0x2d43c -[NSApplication run] + 476
28 AppKit 0x4708 NSApplicationMain + 880
29 ??? 0x180739058 (Missing)
No options for text tones, only whats on phone, can't even buy from store etc
No option for notification sounds on various apps, just the very quiet beep (can never hear it!!)
So disappointed in this, what is going on? more control is it?
Get it changed !!!
I am wondering if it is possible for a watch app to play a haptic alert when it receives a background notification.
I want to send the user a haptic alert if a value in a database reaches a certain threshold.
It is so frustrating and the second time this has happened to me. I found a fix for the first time, but can't seem to find one now. Help!
Anyone know what to do to stop the noise?
Lisa
iPhone 14 Pro Max running iOS 16.5 Bought May 23rd 2023, USA to upgrade
Does not make a sound when receiving a text.
However, it will ring when receiving a phone call.
I have tried turn blue tooth off, reboot IPhone, turn blue tooth back on it lasts for a day then back to no sound when I receive a text. Why?
Any help would be greatly appreciated. I have tried everything I could find on google, reddit changing the sound turning on notifications if you could think of it I have more than likely tried it. Yes, I have a apple watch. That's why the blue tooth is on.
But please give me some suggestions, or is this known about, and they will put a fix in the next update? I have searched till my eyes fell out.
Id like to provide haptic feedback to users on Apple Watch without playing any sound (for my meditation app).
The only way I found to play haptic feedback is
WKInterfaceDevice.current()play(.start)
but this produce sound as well.
Apple's Mindfulness app has haptic feedback without playing any sound. Is there a way how to achieve it?
Thanks!
Hi all,
I'm working on an iOS app that takes a user's input via touch and returns audio and haptic feedback relative to how hard the user touches the screen (i.e., the harder the user touches the screen, the louder the volume and stronger the haptic response will be). The problem is that the tracking of pressure sensitivity only seems to be available on iOS devices with 3D Touch functionality, which Apple discontinued in 2019-2020 in favor of the much simpler Haptic Touch functionality, which does not appear to offer dynamic tracking of touch inputs.
How does this affect my users? Well, those who have an older iPhone between 6s and 11 (excluding SE and XR) will have access to a fully functional immersive environment that provides dynamic audio and haptic responses based on the pressure of their touch inputs - exactly as intended. Unfortunately, the majority of my users who use an iPhone 12 or above will be left with a static environment that provides the same audio and haptic response regardless of the pressure of their touch inputs. Ironically, users with old iPhones will have full access to my app's functionality, while users with new iPhones will be excluded from the experience that I wish to provide.
As a developer who is passionate about providing dynamic and immersive experiences to more than a subset of his users, Apple's dropping of 3D Touch for Haptic Touch feels like a massive downgrade in terms of functionality and performance.
Is there any way to bypass the limitations of the new Haptic Touch iPhones so that I can record touch pressure sensitivity and provide new iPhone users with the same dynamic experience that old iPhone users enjoy?