Muhammad Usman
Muhammad Usman

Reputation: 95

Detect hardware mute button

How to mute application sound when hardware mute button on iPhone and iPad is on.I want to detect that whenever hardware mute button is turned on and off my application sound will be turned on and off.

Upvotes: 0

Views: 868

Answers (1)

KudoCC
KudoCC

Reputation: 6952

You need not listen to the event, just use appropriate audio session category. AVAudioSessionCategoryAmbient or AVAudioSessionCategorySoloAmbient

Upvotes: 1

Related Questions