core-telephony

subscriberCellularProviderDidUpdateNotifier never being called

青春壹個敷衍的年華 提交于 2020-06-23 03:14:00
问题 Following code: CTTelephonyNetworkInfo *info = [[CTTelephonyNetworkInfo alloc] init]; info.subscriberCellularProviderDidUpdateNotifier = ^(CTCarrier *carrier) { dispatch_async(dispatch_get_main_queue(), ^{ NSLog(@"User did change SIM"); }); }; Inside: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions Or no matter where I put the code just to test it. No matter how many sim card I'm replacing on iPad Air Mini Wifi+3G with iSO 7.1.1 the

subscriberCellularProviderDidUpdateNotifier never being called

梦想与她 提交于 2020-06-23 03:12:17
问题 Following code: CTTelephonyNetworkInfo *info = [[CTTelephonyNetworkInfo alloc] init]; info.subscriberCellularProviderDidUpdateNotifier = ^(CTCarrier *carrier) { dispatch_async(dispatch_get_main_queue(), ^{ NSLog(@"User did change SIM"); }); }; Inside: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions Or no matter where I put the code just to test it. No matter how many sim card I'm replacing on iPad Air Mini Wifi+3G with iSO 7.1.1 the

(eSIM Integration iOS) How to use restricted API “addPlan” to enable e-sim profile in iOS device

余生颓废 提交于 2020-05-24 20:08:27
问题 After searching everywhere I found there is a way to add eSIM in iPhone using the following API func addPlan(with: CTCellularPlanProvisioningRequest, completionHandler: (CTCellularPlanProvisioningAddPlanResult) -> Void) I don't know why but completion handler not returning the result of CTCellularPlanProvisioningAddPlanResult just printing the following error. Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo

Objective-C version of serviceSubscriberCellularProvidersDidUpdateNotifier for iOS12+?

。_饼干妹妹 提交于 2020-04-16 04:21:10
问题 There is this link however it leaves out the iOS 12+ Objective C method. Here's what I have attempted: Added to the application delegate: @property (strong, nonatomic) CTTelephonyNetworkInfo *telephonyInfo; Then in - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { ... self.telephonyInfo = [[CTTelephonyNetworkInfo alloc] init]; self.telephonyInfo.serviceSubscriberCellularProvidersDidUpdateNotifier = ^(NSString *entry) { dispatch

How to detect incoming and outgoing call END event in my Iphone app?

孤人 提交于 2020-02-07 07:47:58
问题 Here is a scenario: I make a call from my application .When the call ends i need to fire a event such as calling a web service .How can do with CTcallcenter in core telephony frame work ? Thank you 回答1: you can use Cellular Call States for this purpose CTCallStateDialing The call state, before connection is established, when the user initiates the call. CTCallStateIncoming The call state, before connection is established, when a call is incoming but not yet answered by the user.

How to detect incoming and outgoing call END event in my Iphone app?

只愿长相守 提交于 2020-02-07 07:46:08
问题 Here is a scenario: I make a call from my application .When the call ends i need to fire a event such as calling a web service .How can do with CTcallcenter in core telephony frame work ? Thank you 回答1: you can use Cellular Call States for this purpose CTCallStateDialing The call state, before connection is established, when the user initiates the call. CTCallStateIncoming The call state, before connection is established, when a call is incoming but not yet answered by the user.

How to detect incoming and outgoing call END event in my Iphone app?

守給你的承諾、 提交于 2020-02-07 07:45:53
问题 Here is a scenario: I make a call from my application .When the call ends i need to fire a event such as calling a web service .How can do with CTcallcenter in core telephony frame work ? Thank you 回答1: you can use Cellular Call States for this purpose CTCallStateDialing The call state, before connection is established, when the user initiates the call. CTCallStateIncoming The call state, before connection is established, when a call is incoming but not yet answered by the user.

CoreTelephony eSIM functions not working on device

匆匆过客 提交于 2020-01-22 02:32:11
问题 I've been having some trouble implementing eSIM into an existing iOS carrier-application. The setup The app has received the public-cellular-plan entitlement which I understand is the entitlement giving me access to the eSIM functions of CoreTelephony. I've imported the CoreTelephony framework in the app's target: General > Frameworks, Libraries, and Embedded Content which is marked as Do not Embed , same as other frameworks like CoreData and such. I've imported the library in the class

iPhone - Detecting SIM card availability

谁说胖子不能爱 提交于 2020-01-20 04:07:07
问题 I am using the answer in this topic. iPhone - how to determine carrier of the device (AT&T, Verizon, etc?) which is the same as getting operator details in iphone. Although it works fine when using a sim card, the returned carrier name if there is no SIM card is the old carrier name. It doesn't detect that the SIM is removed. I know this contradicts with Apple documentation that if there is no carrier, CTCarrier object shall be nil. But in my app I logged the carrier info and it gives me the

iOS Get Signal Strength in Swift (Core Telephony)

断了今生、忘了曾经 提交于 2020-01-14 19:53:28
问题 I'm new to iOS, and am learning to code with Swift. My app needs to measure the signal strength. I've found this code working on Objective-C/C, and need some help to implement on Swift. Here is what I got. Hope someone can help me finish it. OBJECTIVE C int getSignalStrength() { void *libHandle = dlopen("/System/Library/Frameworks/CoreTelephony.framework/CoreTelephony", RTLD_LAZY); int (*CTGetSignalStrength)(); CTGetSignalStrength = dlsym(libHandle, "CTGetSignalStrength"); if(