Is there any way to shut off ring tones on the phone (mute the iPhone) via code in iOS 7? -


is there way shut off ring tones on phone (mute iphone) via code in ios 7?

there 1 app in appstore found has logic shuts off phones ringer when iphone ringer switch set on. https://itunes.apple.com/us/app/silentalert/id506092189?mt=8

some piece of code or reference highly appreciated. went through many stack-overflow post without success.

first, can specify have tried , have not been able working ?

also see this related , possibly duplicate stackoverflow question. says isn't possible , mentions private apis apple appstore won't approve.

for more information on private apis see this stackoverflow question.

specifically need call toggleactivecategorymuted celestial private api or setmuted in avcontroller, rejected apple in terms of appstore submission.

based on reading api documentation believe way referenced application works setting avaudiosessioncategory avaudiosessioncategoryaudioprocessing , making active session.

if doesn't continue silence when application becomes background , want request more time, see this stackoverflow question. alternatively, see this code example , supporting blogpost plays silent sound repeatedly. note apple app store review frowns on method apparently. code newer fork supposed work better on new ios versions.

it has handling being background application, playing music / silence in background, , handling interruptions. usage of location services can use (void)locationmanager:(cllocationmanager *)manager didupdatelocations:(nsarray *)locations trigger application relaunching using region monitoring or significant-change location service.

code examples of concepts linked below :

references:


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -