core-telephony

Is there any way to determine if the iphone is roaming?

大憨熊 提交于 2019-12-17 05:48:25
问题 I am working on an iPhone application and would really like to determine if the device is roaming so that I can intelligently avoid costing my users expensive connections if out of their home network. The application I am writing is for jailbroken phones, however I would prefer to use standard SDKs if possible. Here is what I've already found: 1. Apple SDKs: In the apple documentation, I found the promise in Apple's SCNetworkReachability API. The API provides access to such things as whether

CTServerConnectionGetCellID routine core telephony

风流意气都作罢 提交于 2019-12-13 13:22:06
问题 I want to retrive some cellular network informations such as cellId and LAC. I know that there is no official way to do that, but i still experiencing some CoreTelephony routines such as CTServerConnectionGetCellID. any luck to get this working ? any help ? 回答1: Try this testing iPhone signal with code It gives you CellID but I don't think it shows LAC, I could be misinterpreting some of the output though. 来源: https://stackoverflow.com/questions/5980575/ctserverconnectiongetcellid-routine

How to map MCC + MNC to users phone country code in iOS objective-C without using Location info?

荒凉一梦 提交于 2019-12-13 12:32:42
问题 I want the actual country code of the users phone number without prompting the user for Location Permission. How do I get it? Here is the code I use to get the MCC and MNC CTTelephonyNetworkInfo *networkInfo = [[CTTelephonyNetworkInfo alloc] init]; CTCarrier *carrier = [networkInfo subscriberCellularProvider]; NSString *mcc = [carrier mobileCountryCode]; NSString *mnc = [carrier mobileNetworkCode]; I get MCC - 310 and MNC - 410 which corresponds to AT&T USA. But what I want is '+1' the

incompactable pointer type passing int to parameter of type void(*)(void) in coretelephony obj c

╄→гoц情女王★ 提交于 2019-12-13 07:06:07
问题 The function defined in coreTelephony.h is void _CTServerConnectionRegisterForNotification(CTServerConnectionRef,void *,void(*callback)(void)); Then I tried to call this function int x = 0; //placehoder for callback _CTServerConnectionRegisterForNotification(conn,kCTCellMonitorUpdateNotification,&x); it return the error incompatible pointer type passing int to parameter of type void(*)(void) in coretelephony obj c What am I missing? 回答1: The third argument of

Find carrier info in use, not the SIM one

江枫思渺然 提交于 2019-12-13 03:08:21
问题 Is it possible to get information about the Carrier currently in use? CoreTelefony gives back information about the SIM carrier. I haven't found any article on internet talking about this topic. Since the SIM can be the same also when the user moves in other countries, I would like to check the current network information the phone is using. Any chance to achieve this result? I'm interested in both iOS and Android code. 回答1: I ran into this problem a while back, and I managed to find a way

How detect incoming and outgoing call end state? iphone

爷,独闯天下 提交于 2019-12-12 07:18:35
问题 I have a requirement that is the app should disappear after install and when incoming or outgoing call, soon after the call the app should prompt and display the screen. How disappear app after installation? How detect incoming and outgoing call? How display screen after ending of incoming and outgoing call? The main thing is that i am making this for personal not of app store. So please if you have any idea about then give full suggestion and ideas. Thanks in advance... 回答1: Use following

Intercept incoming calls (not answering state) in iOS

醉酒当歌 提交于 2019-12-12 04:39:45
问题 I'm trying to find out how can I intercept when a phone call received and no one answer and then it goes to voice mail. I looked into CTCall and CTCallCenter but I'm not sure whether they are not answer for my problems or it's not allowed for apps to AppStore. Ideas/thoughts anyone? 回答1: Correct me if I am wrong but there is NO public API by Apple to intercept the call of the Phone application without jailbreak! And it wont be able to see App store if you are going to use Private methods If

How to fix _CTServerConnectionRegisterForNotification crash happening in VAFieldTest application

泪湿孤枕 提交于 2019-12-11 15:04:46
问题 I am trying to run VAFieldTest application in my device, but the application got crashed at this line _CTServerConnectionRegisterForNotification . How can I fix this crash? Here are the parameters I have passed: CTServerConnectionRef conn; void register_notification(){ if (!mach_port || !conn) return; void *libHandle = dlopen("/System/Library/Frameworks/CoreTelephony.framework/CoreTelephony", RTLD_LOCAL | RTLD_LAZY); void *kCTCellMonitorUpdateNotification = dlsym(libHandle,

Signal strength in ios 8.3

≯℡__Kan透↙ 提交于 2019-12-11 11:48:24
问题 Apple has restricted API to fetch signal strength but there is a way to get this i found here.Is it a correct way to get signal strength. I am developing for iTunes store submission. Will apple reject my app? Solution provided by @Mateusz Mirkowski as follow : UIApplication *app = [UIApplication sharedApplication]; NSArray *subviews = [[[app valueForKey:@"statusBar"] valueForKey:@"foregroundView"] subviews]; NSString *dataNetworkItemView = nil; for (id subview in subviews) { if([subview

Getting mobile number from log to the app

泪湿孤枕 提交于 2019-12-11 05:28:52
问题 My app deals with phone calls.I want to send an auto textmessage(sms) to the dialer when the line is busy or else user is busy or else call is in hold....Here I want to get the mobile no of the dialer to my app..Is it possible???? 回答1: No it's not posible. You can't interact with the dialer on iOS. 来源: https://stackoverflow.com/questions/7255267/getting-mobile-number-from-log-to-the-app