Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Official way to use the new keyboard click sounds in iOS 10

My app contains a custom control that copies the behaviour of the iOS standard keyboard.

I can successfully play the system keyboard click sound with this code:

UIDevice.current.playInputClick()

On iOS 9 and below there is only one click sound and this call is all I need. On iOS 10, there are different click sounds for regular keys, for the backspace key and for other special keys.

What is the official way to play these additional sounds? Do I have to use the alternative way from the linked answer? The documentation for playInputClick() does not mention anything.

There is an answer that suggests to play the new click sounds using AudioServicesPlaySystemSound. But another answer says that these IDs might not point to the latest system click sounds in a future version of iOS. Another problem with the workaround is that there seems to be no way to check if the user has enabled keyboard clicks in the system settings (link).

like image 506
Sebastian Kirsche Avatar asked Sep 23 '16 22:09

Sebastian Kirsche


People also ask

How do I turn on the click Sound on my keyboard?

Open Settings by pressing Windows Key + I or tap the search box on the taskbar. Enter setting and then select Settings in the results. Choose Devices. Click Typing, and then switch off or on Play key sounds as I type under Touch keyboard.

How do I turn on Sounds on my iPhone 10?

Go to Settings > Sounds (or Settings > Sounds & Haptics), and drag the Ringer and Alerts slider back and forth a few times. If you don't hear any sound, or if your speaker button on the Ringer and Alerts slider is dimmed, your speaker might need service.

Can you change Typing Sounds on Apple?

Turn iPhone keyboard sounds on or offGo to Sounds & Haptics > Keyboard Feedback.


1 Answers

The url below could help with finding proper sound: https://github.com/TUNER88/iOSSystemSoundsLibrary

As of October 2019, these are the sound IDs

Press Click - ID: 1104

Press Delete - ID: 1155

Press Modifier - ID: 1156

like image 85
Serge Avatar answered Sep 18 '22 21:09

Serge