Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play iPhone camera shutter sound when I click a button

How do I play the shutter sound from iPhone when I click a button?

like image 980
user676392 Avatar asked Mar 25 '11 10:03

user676392


People also ask

Why don't I hear a click when I take a picture with my iPhone?

If you have "Live Photo" active when taking a photo then you will not hear the shutter sound of the camera. If you have the Silent Switch (Top Left SIDE) set to ON then you will not hear the camera shutter sound. To hear the camera shutter sounds, Deactivate Live Photo and ensure that the Silent Switch is set to OFF.

Why doesn't my iPhone camera make the shutter sound?

If the camera shutter sound is still not working try to "Adjust the volume of the camera's shutter sound using the volume buttons on the side of your iPhone. Or, when Camera is open, swipe down from the top-right corner of the screen to open Control Center, then drag ." We hope this helps!


1 Answers

You can use AudioToolbox and pure magical number 1108 like this:

Swift:

import AudioToolbox
AudioServicesPlaySystemSound(1108)

Objective-C:

#import <AudioToolbox/AudioToolbox.h>
AudioServicesPlaySystemSound(1108);

Here is full list of these pure magical ids.

like image 127
Valentin Shergin Avatar answered Sep 19 '22 06:09

Valentin Shergin