Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone: is it possible to enable/disable phone features programmatically?

I want to lock / unlock some features of iPhone such as send/receive text message, make the phone silent for incoming call etc while using my application.

Is it possible? If possible, How?

like image 653
Aumit Avatar asked Oct 11 '22 01:10

Aumit


1 Answers

There is not an Apple-approved way of controlling this. However, you can "prevent" your phone from locking when your app is running. [UIApplication sharedApplication].idleTimerDisabled = YES should do it.

like image 141
Maulik Avatar answered Oct 13 '22 01:10

Maulik