core-telephony

CoreTelephony crash

三世轮回 提交于 2019-11-30 04:03:37
I am receiving this backtrace from TestFlight regarding one interesting crash. As far as I understood, the application crashes at some point, when using CoreTelephony . Can this be possible of someone "calling" while the user is using the application? To my knowledge, the application is not using the CoreTelephony Framework . The Exception reason is SIGSEGV and the crash thread is 0 Thank You! PRIMARY THREAD THREAD 0 0 GPIreland 0x00113a1a testflight_backtrace + 238 1 GPIreland 0x00114704 TFSignalHandler + 264 2 libsystem_c.dylib 0x359d1e92 _sigtramp + 42 3 CoreTelephony 0x330078b4 <redacted>

Get CellID, LAC, … on iOS 8.3

淺唱寂寞╮ 提交于 2019-11-30 00:37:53
Since iOS 5.X, I used to get radio information with these methods : Get CellID, MCC, MNC, LAC, and Network in iOS 5.1 But with the iOS 8.3 beta (and 8.3 GM), this private API _CTServerConnectionCellMonitorCopyCellInfo doesn't work anymore. Hlavne Krokozvidze Apple was informed about weakness in their CoreTelephony, so now calls to CoreTelephony fail. They are checking if the caller is sandboxed, so after debug you can see: Caller not allowed to perform action: TelephonyApiTest.240, action = sandboxed lookup, code = 1: Operation not permitted, uid = 501, euid = 501, gid = 501, egid = 501, asid

iPhone mobile number using Core telephony

为君一笑 提交于 2019-11-29 13:04:33
As far as my understanding, there is no public API available in iPhone SDK to find the users mobile number. Can we find the mobile number of iPhone user using the Core telephony framework added in 4.0 SDK? No, the CoreTelephony framework provides some basic information about the carrier and limited info about calls, not much else. The limited information includes things like the amount of current active calls, the call ID (not a mobile number, just a unique ID that the OS uses to track the particular call) and the state of a call, like whether the call is on hold or not. The main feature in

Using CFNotificationCallback in Swift, or, @convention(c) blocks in Swift

▼魔方 西西 提交于 2019-11-29 12:41:20
I am trying to listen to CoreTelephony notifications using the (now private) CTTelephonyCenterAddObserver C function and CFNotificationCallback callback blocks. My bridging header (to extern the private C functions): #include <CoreFoundation/CoreFoundation.h> #if __cplusplus extern "C" { #endif #pragma mark - API /* This API is a mimic of CFNotificationCenter. */ CFNotificationCenterRef CTTelephonyCenterGetDefault(); void CTTelephonyCenterAddObserver(CFNotificationCenterRef center, const void *observer, CFNotificationCallback callBack, CFStringRef name, const void *object,

iPhone - Track cellular data usage

谁都会走 提交于 2019-11-29 12:11:08
问题 Is there a way to track cellular data usage on iPhone ? There are lot of apps which does the same like 'Dataman' and 'DataUsage' Basically I am looking for a programmatic way to get information stored in Settings -> General -> Usage Any help will be appreciated. 回答1: To check Cellular Network Use this - (bool) hasCellular { struct ifaddrs * addrs; const struct ifaddrs * cursor; bool found = false; if (getifaddrs(&addrs) == 0) { cursor = addrs; while (cursor != NULL) { NSString *name =

CTCallCenter is deprecated. What is the alternative?

自作多情 提交于 2019-11-29 10:19:10
I am using CTCallCenter in my project. Now it's deprecated, I would like to know what are alternatives? How to get the event for the voice call? This is poorly documented, but I've found this mention in CTCallCenter public header files: "Replaced by <CallKit/CXCallObserver.h> " So, from iOS 10 you should use CXCallObserver class of new CallKit framework to retrieve info about active calls: CXCallObserver *callObserver = [[CXCallObserver alloc] init]; Provide object, conforming to CXCallObserverDelegate protocol and queue, on which you want to perform delegate callbacks: // If queue is nil,

get phone call states in iOS 10

二次信任 提交于 2019-11-29 09:57:03
问题 I want to get phone call states in my app. After some search I found CoreTelephony framework. But that is deprecated in iOS 10. SO is there any other alternative available? I also found CallKit . A new framework in iOS 10. But didn't getting call states from same as I searched. 回答1: import CallKit into your AppDelegate and add the following code: // AppDelegate var callObserver: CXCallObserver! // add property // in applicationDidFinishLaunching... callObserver = CXCallObserver() callObserver

How to get user incoming call phone number in iOS device

点点圈 提交于 2019-11-29 08:45:48
I used CoreTelephony framework introduced in iOS SDK 4.0 to know about Incoming call & its dropped state. CTTelephonyNetworkInfo *tni = [[CTTelephonyNetworkInfo alloc] init]; callCenter = [[CTCallCenter alloc] init]; crtCarrierName = tni.subscriberCellularProvider.carrierName; [callCenter setCallEventHandler:^(CTCall *call) { if ([[call callState] isEqual:CTCallStateConnected]) { //this call has just connected } else if ([[call callState] isEqual:CTCallStateDisconnected]) { //this call has just ended (dropped/hung up/etc) } }]; Can i use this event handler to track call state when my app is in

iOS 5 - CTCallCenter not working for me

99封情书 提交于 2019-11-29 05:21:01
My phone: iOS 5.1.1 Jailbroken using Absynth2 What I'm trying to do: detect an incoming call or when a call is being dialed... Okay here is my code that i placed inside the AppDelegate under didEnterBackground , also tried in didResignActive - i don't get any errors but i also don't get any results.. callCenter = [[CTCallCenter alloc] init]; [callCenter setCallEventHandler:^(CTCall *call) { NSDictionary *dict = [NSDictionary dictionaryWithObject:call.callState forKey:@"callState"]; [[NSNotificationCenter defaultCenter] postNotificationName:@"CTCallStateDidChange" object:nil userInfo:dict];

Unhiding a view is very slow in CTCallCenter callEventHandler

帅比萌擦擦* 提交于 2019-11-29 00:05:52
Reposting with more concise and focused question after original question went unanswered. Also adding more insight into the problem after another day of research: In my app delegate ( didFinishLaunching ), I set up a callEventHandler on CTCallCenter . The idea is that when a callState changes, I post a notification with a userInfo dict containing the call.callState . In my view, I observe this notification, and when the userInfo dict contains a value of CTCallDisconnected , I want to unhide a view. The problem I'm having is that the unhiding aspect is taking, almost consistenly, ~ 7 seconds.