I'm currently trying to use the AVSystemController
private framework to mute system noises based on the user's selection. I'm currently muting phone calls by calling: [(AVSystemController object) setVolumeTo:0.0 forCategory:@"Ringtone"];
Is there a command to do that for incoming text messages? I imagine it would be based on a change in the category identified in that call. However, I can't find a list of categories to reference. Of the 10 I've been able to find (Alert, Audio/Video, Ringtone, Voicemail, VoicemailGreeting, PhoneCall, TTYCall, RingtonePreview, Alarm, Record)
, none of them govern text message sounds. Is there a category to do this? If not, is there any other way to mute the sound from incoming texts?
I realize this goes against Apple's no-private-frameworks policy, but this app won't go up on the app store so that's no problem. I'm developing it using the latest version of Xcode for the latest version of IOS, so any method to accomplish this would be doable.