Steno
Steno

Reputation: 41

Incoming call wakes iOS background App?

is it possible to wake an App in the background up, when a call comes in, and access CoreTelephony to send some infos over the web?

I'm practically a n00b in iOS development right now, but got asked a question if iOS is capable to do this. I searched in the iOS reference too, but with no luck.

It would be great if someone with more experience could answer it. Thanks a lot!

Steno

Upvotes: 4

Views: 2143

Answers (2)

Nick Bull
Nick Bull

Reputation: 4276

It is not possible to have your code run when a call is received.

Upvotes: 0

sergio
sergio

Reputation: 69027

Please, have a look at the document about executing code in the background.

If you go to section "Implementing a VoIP Application", you will see that it is actually possible for your app to be awaken periodically so that it can check if it has anything to do (in your case, if I understand you correctly you would use CTCall to check for calling state).

So, basically, when awaken, your app could check for any incoming call and then use Core Telephony, as you say.

The only trouble about this is that if your app cannot be considered to a a VOIP app, Apple will not let it into the App Store.

Upvotes: 4

Related Questions