Search code examples
iphoneios7telephonyiphone-privateapi

Automatic phone dialing application for iPhone


I am trying to develop an application that can dial phone numbers at regular intervals from iPhone without user interaction. The problem is when the phone dialer app comes to foreground then my app goes to background.

I tried using web view to call the phone number but it prompts for the user before calling the number. Is there any way to to dial a number from webview without prompting user?

or is there any other work around to get my application to foreground after call ends.

My app is not going to app store so private api is not a problem.

Edit: I tried using the teleprompt:// but I need no user interaction. I also cannot jail break.


Solution

  • As of iOS7 you can't make phone calls from regular iOS apps. By that I mean calling CTCallDial to dial a phone number without user permission.

    Background/foreground. Your app will move to the background and you can't do anything about it. If you want you could let your app run in the background without suspending. For that you need to add audio background mode and loop silent audio file. If you don't need UI you can continue execute your tasks while in background. If you need UI there is a workaround - post local notification to let user resume your app after phone call ends. You could also try to invoke phone dialer UI from the background. I didn't tried it but it may be possible.