![]() |
|
[C] iOS detect incoming call? - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C] iOS detect incoming call? (/showthread.php?tid=5558779) |
iOS detect incoming call? - aetherbit - Feb 23, 2017 I am using CXCallObserver in Swift 3 to detect an incoming call. Problem is, it only works when the app is in the foreground. How do I make it work when the app is in the background? This is for legit reasons, so if anyone knows of a way even if it uses other background states, such as location or fetch, please let me know and I will find a way to include that into the application. Code var callObserver = CXCallObserver()Code func callObserver(_ callObserver: CXCallObserver, callChanged call: CXCall) {* - REDRIFLE - Feb 28, 2017 External call notifications are reported to CXProvider, so make sure to use that (or maybe you just didn't include that part in your post?). In general, events propagate through different scopes, so if you handle it at the wrong scope it might cause the kind of problems you are having. * - aetherbit - Mar 1, 2017 I was not using CXProvider. I will take a look, thank you. * - aetherbit - Mar 16, 2017 I see that CXProvider is only for VOIP, whereas I am using normal Telephony. |