core-telephony

How to identify when SIM changed in iPhone?

会有一股神秘感。 提交于 2019-12-04 22:16:57
问题 How to find if a user changes his SIM card from his phone(iPhone). we can find "mobileCountryCode,isoCountryCode,mobileCountryCode and mobileNetworkCode" through programatically these are not specific to particular SIM, these are specific to operator, is there any way to identify when user changes his SIM card from his iPhone. Please any one help me on this. Thanks in advance. 回答1: You are able to sign up for a notification using subscriberCellularProviderDidUpdateNotifier in

Call events in iPhone

无人久伴 提交于 2019-12-04 21:09:57
I am trying to get Call events (call received, call ended etc) I tried to run sample code of CoreTelephonyDemo, but I am not getting any call events. Can anybody guide me for the same. I tried this code in applicationWillResignActive but I am not getting any events. Am I missing anything or doing anything wrong? Please guide . - (void)applicationWillResignActive:(UIApplication *)application { CTCallCenter *callCenter1 = [[CTCallCenter alloc] init]; callCenter1.callEventHandler=^(CTCall* call) { if (call.callState == CTCallStateDisconnected) { NSLog(@"Call has been disconnected"); } else if

How does the Navita TEM app get call log information?

半腔热情 提交于 2019-12-04 18:07:33
问题 How does Navita https://itunes.apple.com/us/app/navita-t.e.m.-personal/id590228620?mt=8 manage to display a call log? If I swipe the app out of the task manager then it misses the calls, this indicates that it must presumably be using CTCallCenter's callEventHandler and is creating its own call log by saving the time/duration in response to the callEventHandler callbacks. However if that is the case then how does it manage to do this in the background? I was under the impression that

iOS 5 - CTCallCenter not working for me

风格不统一 提交于 2019-12-03 18:00:46
问题 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"]; [

How to troubleshoot/resolve “Signal strength query returned error” logs that are appearing in Xcode 10.1/iOS 12.1?

℡╲_俬逩灬. 提交于 2019-12-03 17:02:54
问题 Recently updated to iOS 12.1 (from 12.0), Xcode 10.1 (from 10.0) and seeing a flood of error messages in the Xcode console when debugging on my physical device like the following: [NetworkInfo] Signal strength query returned error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied", descriptor: <CTServiceDescriptor 0x28051d700, domain=1, instance=1> I get a couple of these logs every couple seconds, the only thing that changes is the hex value for the CTServiceDescriptor. There have

How to identify when SIM changed in iPhone?

可紊 提交于 2019-12-03 14:45:33
How to find if a user changes his SIM card from his phone(iPhone). we can find "mobileCountryCode,isoCountryCode,mobileCountryCode and mobileNetworkCode" through programatically these are not specific to particular SIM, these are specific to operator, is there any way to identify when user changes his SIM card from his iPhone. Please any one help me on this. Thanks in advance. You are able to sign up for a notification using subscriberCellularProviderDidUpdateNotifier in CTTelephonyNetworkInfo However you will only be notified if the swap occurs while your app is running. You will still be

How to get Mobile Country and Network code on an iPhone

荒凉一梦 提交于 2019-12-03 12:43:10
Is there any way of getting the mnc and mcc numbers on an iPhone? honcheng You need the CoreTelephony framework CTTelephonyNetworkInfo *networkInfo = [[CTTelephonyNetworkInfo alloc] init]; CTCarrier *carrier = [networkInfo subscriberCellularProvider]; to get MNC, NSString *mnc = [carrier mobileNetworkCode]; to get MCC, NSString *mcc = [carrier mobileCountryCode]; You can use the methods of the CTCarrier class to retrieve Country and network code. However this is only for the home provider (=SIM Card) and not the provider the phone is currently booked in, 来源: https://stackoverflow.com/questions

How does the Navita TEM app get call log information?

空扰寡人 提交于 2019-12-03 11:33:12
How does Navita https://itunes.apple.com/us/app/navita-t.e.m.-personal/id590228620?mt=8 manage to display a call log? If I swipe the app out of the task manager then it misses the calls, this indicates that it must presumably be using CTCallCenter's callEventHandler and is creating its own call log by saving the time/duration in response to the callEventHandler callbacks. However if that is the case then how does it manage to do this in the background? I was under the impression that callEventHandler can only be used by apps in the foreground and not in the background? The app is using

iPhone - how to determine carrier of the device (AT&T, Verizon, etc?)

两盒软妹~` 提交于 2019-12-03 05:48:41
问题 Is there a way to get information about the carrier of iPhones programmatically? 回答1: 1st Import #import <CoreTelephony/CTTelephonyNetworkInfo.h> as well as #import <CoreTelephony/CTCarrier.h> (make sure you have the CoreTelephone.framework installed too). CTTelephonyNetworkInfo *phoneInfo = [[CTTelephonyNetworkInfo alloc] init]; CTCarrier *phoneCarrier = [phoneInfo subscriberCellularProvider]; NSLog(@"Carrier = %@", [phoneCarrier carrierName]); [phoneInfo release]; 回答2: Heres the Swift

Sending an iMessage as simple as possible iOS

本小妞迷上赌 提交于 2019-12-03 04:33:09
问题 I want to be able to programmatically send an iMessage without anything else being done except calling a function that will send a text to a number with a message, both of which are text boxes. I'd really appreciate some sample code as I've hunted the net but nothing I've found will help. This is not for a commercial app, just me so it can use Private frameworks, or anything that will do the job. Thanks. 回答1: The only way to send a message is to the MessageUI framework. There is an example of