while using app I want to block all incoming calls and sms. How can I do this? I know example link http://tech.ruimaninfo.com/?p=83. But there are errors in code.It should work at least on jailbroken iphone.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Below is some code that I’ve adapted from that website, and works for me on my non jailbroken device:
Firstly add “CoreTelephony.framework” to your project then import it into your view controller like so:
Next, add the following code:
And in viewDidLoad or some other appropriate method, add the following:
For now this code is merely a proof of concept and would have to be expanded upon for error handling and whatnot, but you should get the idea.