core-telephony

Get CellID, LAC, … on iOS 8.3

只愿长相守 提交于 2019-11-28 21:29:18
问题 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. 回答1: 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

CallStateDisconnected only detected for incoming calls, not for calls made from my app

倖福魔咒の 提交于 2019-11-28 11:01:42
I can't detect end of call (state CallStateDisconnected), if I make call from my app. But if I receive call when my app is active, I can detect that state. I also receive state CTCallStateDialing twice or 3 times when call starts from my app. It used to be working under iOS5, this problems occured with iOS6. My app del code; self.callCenter = [[CTCallCenter alloc] init]; self.callCenter.callEventHandler = ^(CTCall* call) { // anounce that we've had a state change in our call center NSDictionary *dict = [NSDictionary dictionaryWithObject:call.callState forKey:@"callState"]; //BREAKPOINT HERE [

How to detect call incoming programmatically

吃可爱长大的小学妹 提交于 2019-11-28 06:33:55
I need my app to send a notification when there is a call (incoming call, connected, call ended) I registered my viewController with notification. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(callReceived:) name:CTCallStateIncoming object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(callEnded:) name:CTCallStateDisconnected object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(callConnected:) name:CTCallStateConnected object:nil]; I also made a method to check call state -(IBAction)checkForCall:(id

iPhone mobile number using Core telephony

旧城冷巷雨未停 提交于 2019-11-28 06:22:16
问题 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? 回答1: 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

Is it possible to determine if the SIM/Phone number has changed?

。_饼干妹妹 提交于 2019-11-28 06:02:32
We have a product where the user registers by providing their phone number. However after they register they could potentially change their sim. Is it possible to programatically determine if the sim has been removed or inserted? (Thanks if you provide it, but any digression comments on the use of using the phone number in the first place would be irrelevant to this discussion, I don't want to discuss that aspect of things, only the sim aspect). Oleg Trakhman Yes, of course it is possible. Link CoreTelephony.framework to make following code compile: CTTelephonyNetworkInfo* info = [

CTCallCenter is deprecated. What is the alternative?

自闭症网瘾萝莉.ら 提交于 2019-11-28 03:23:43
问题 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? 回答1: 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

How to get user incoming call phone number in iOS device

拥有回忆 提交于 2019-11-28 01:58:45
问题 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

Unhiding a view is very slow in CTCallCenter callEventHandler

落爺英雄遲暮 提交于 2019-11-27 21:23:18
问题 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

How to find out carrier signal strength programmatically

怎甘沉沦 提交于 2019-11-27 15:23:35
问题 Here is the code that I have used to find out carrier signal strength: int getSignalStrength() { void *libHandle = dlopen("/System/Library/Frameworks/CoreTelephony.framework/CoreTelephony", RTLD_LAZY); int (*CTGetSignalStrength)(); CTGetSignalStrength = dlsym(libHandle, "CTGetSignalStrength"); if( CTGetSignalStrength == NULL) NSLog(@"Could not find CTGetSignalStrength"); int result = CTGetSignalStrength(); dlclose(libHandle); return result; } It is giving me values between 60 to 100, but when

Intercepting phone call - iPhone (correct method to hook in CoreTelephony)

 ̄綄美尐妖づ 提交于 2019-11-27 14:14:57
I am new to the jailbreak tweak development scene. I am trying to figure out the appropriate method to 'hook' so I can intercept an incoming call (and then run some code). I have dumped the header files of CoreTelephony framework however no methods seem obvious to hook. I have tried: - (void)broadcastCallStateChangesIfNeededWithFailureLogMessage:(id)arg1; - (BOOL)setUpServerConnection; but neither have worked. By worked I mean - get called when the iPhone receives a call. Any pointers as to the appropriate method to hook? Thanks :) Note: This is going to be a jailbreak tweak using private APIs