ios - CallState is never CTCallStateDisconnected? -


i using corelocation framework , trying see whether user in phone call or not. placed code within function in corelocation called every second or so, , finds if user has changed locations. when run application, able detect if call coming in , when call connected, when call hangs up, nothing ever prints. below code:

func locationmanager(manager: cllocationmanager!, didupdatetolocation newlocation: cllocation!, fromlocation oldlocation: cllocation!) {             if let calls = currcall.currentcalls as? set<ctcall> {         call in calls {             if call.callstate == ctcallstatedisconnected{                 println("disconnected")             }             else if call.callstate == ctcallstateconnected{                 println("connected")             }             else if call.callstate == ctcallstateincoming{                 println("incoming")             }         }     }  } 

the print statement "connected" , "incoming" print console when call incoming , connected when call disconnects, "disconnected" never prints. appreciated.

i'm not 100% sure, see disconected calls if hold on reference ctcall. currcall ctcallcenter, right? call set inprogress call set, , disconected calls removed list immediatly.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -