Core Telephony

RSS for tag

Access information about a user’s cellular service provider, such as its unique identifier and whether the carrier allows VoIP, using Core Telephony.

Posts under Core Telephony tag

36 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Cannot get eSim implementation although followed everything also getting false for supportsEmbeddedSIM and supportsCellularPlan
Hi Everyone, I have enabled eSIM entitlements to check eSIM, but I am always getting false for supportsCellularPlan and supportsEmbeddedSIM although my device having the esim feature. I followed each step from this stack overflow answer https://stackoverflow.com/a/60162323 Can anyone help me out here? below is the code I used:- private let provisioning = CTCellularPlanProvisioning() let ctpr = CTCellularPlanProvisioningRequest() ctpr.address = "address$" ctpr.matchingID = "string$" let supportsESIM = provisioning.supportsCellularPlan() if #available(iOS 12.0, *) { let ctcp = CTCellularPlanProvisioning() ctcp.addPlan(with: ctpr) { (result) in switch result { case .unknown: print("Sorry unknown error") case .fail: print("Oops! something went wrong") case .success: print("Yay! eSIM installed successfully") @unknown default: print("Oops! something went wrong") } } } print(provisioning.supportsEmbeddedSIM) print(supportsESIM) this is the entitlements SS this is the info.plist SS
2
0
844
Oct ’23
CTCarrier Deprecation issue
Our app is payment related app & we are doing device binding. So, based on sim detection we have implemented feature for device binding. If sim is not present in device then, we have to show alert to the user for "No sim found". As per current deprecation in CTCareer, We are always getting static details for sim card, so we are not able to detect, either sim is there or not in device. Is there any solution to detect sim is there or not in device?
1
1
856
Aug ’23
Using Bluetooth microphone while controlling audio with A2DP profile.
Hi I'm developing a full-duplex iPhone voice chat application and I'd like to intercept bluetooth headset button events to perform certain actions in my app while maintaining a full-duplex audio. I'm using the MediaPlay to intercept remote bluetooth AVRCP MPRemoteCommandEvent play/pause events as well setting AVAudioSession to use the BluetoothA2DP category, however, when I do this, I can't seem to use the bluetooth microphone as an audio input. Specifically, when I query AVAudioSession for available inputs, bluetooth is not returned. I'm guessing this is because A2DP is a half-duplex protocol, but my understanding is that AVRCP events are only available with A2DP. The other bluetooth profile choice is HSP (AVAudioSession category Bluetooth), which works for full-duplex audio, but does not appear to provide a way to intercept the various AT commands from this profile unless I'm in an actual telephone call. For example, when I use HSP and press a button on my headset, I see in the logs the AT+CHUP command being sent from the headset to the phone. Two questions: Is there a way to use a bluetooth microphone while using A2DP for output at the same time? If the above can't be done, is there a way to intercept the HSP AT control commands from a headset without being in a telephone call? Thanks.
0
0
822
Jul ’23
eSIM Access Entitlement
I am working for an MVNE/MVNA In September 2022, I filed an eSIM Access Entitlement request through the Apple Developer Portal. I didn't receive any feedback from Apple, and we can't see access given as yet. how do I follow up with this? Who do I contact? We have a customer going live in 2 weeks and we need this enabled. We have reached out to our partner carrier and they have not heard anything either. Thank you
5
1
1.8k
Jul ’23
Using mixToTelephonyUplink to allow speech synthesizer to be audible during a phone call
I'd like to allow the speech synthesizer to play on the device speaker while simultaneously mixing with a phone call. I've worked with a number of different configurations but am unable to find a configuration that achieves the functionality I am trying to achieve - or allows mixing with a phone call at all. There is a flag: mixToTelephonyUplink that seems to suggest that at least some mixing with a phone call is possible using the speech synthesizer, but I'm currently unable to find almost any documentation about this flag besides basic API docs. I've had some some luck at least getting the synthesizer to always play to the speaker with the following audio session configuration - but the sound never is mixed with a phone call. Instead, it is ducked and muted while the phone call takes place. I've tried quite a few configuration combinations for the category and overrides, but nothings seems to work quite as I'd expect it to. synthesizer.mixToTelephonyUplink = true try? audioSession.setCategory(.playback, mode: .voicePrompt, options: [.mixWithOthers, .defaultToSpeaker]) try? audioSession.setActive(true, options: []) try? audioSession.overrideOutputAudioPort(.speaker) Is there some kind of documentation for this that's off the beaten path that I'm somehow missing? I'm going to continue with guess and check, but I'm starting to think this flag - and the functionality it implies, actually wasn't ever fully implemented.
1
0
1.1k
Mar ’24
iOS Network Signal Strength
This issue has cropped up many times here on DevForums. Someone recently opened a DTS tech support incident about it, and I used that as an opportunity to post a definitive response here. If you have questions or comments about this, start a new thread and tag it with Network so that I see it. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" iOS Network Signal Strength The iOS SDK has no general-purpose API that returns Wi-Fi or cellular signal strength in real time. Given that this has been the case for more than 10 years, it’s safe to assume that it’s not an accidental omission but a deliberate design choice. For information about the Wi-Fi APIs that are available on iOS, see TN3111 iOS Wi-Fi API overview. Network performance Most folks who ask about this are trying to use the signal strength to estimate network performance. This is a technique that I specifically recommend against. That’s because it produces both false positives and false negatives: The network signal might be weak and yet your app has excellent connectivity. For example, an iOS device on stage at WWDC might have terrible WWAN and Wi-Fi signal but that doesn’t matter because it’s connected to the Ethernet. The network signal might be strong and yet your app has very poor connectivity. For example, if you’re on a train, Wi-Fi signal might be strong in each carriage but the overall connection to the Internet is poor because it’s provided by a single over-stretched WWAN. The only good way to determine whether connectivity is good is to run a network request and see how it performs. If you’re issuing a lot of requests, use the performance of those requests to build a running estimate of how well the network is doing. Indeed, Apple practices what we preach here: This is exactly how HTTP Live Streaming works. Keep in mind that network performance can change from moment to moment. The user’s train might enter or leave a tunnel, the user might walk into a lift, and so on. If you build code to estimate the network performance, make sure it reacts to such changes. But what about this code I found on the ’net? Over the years various folks have used various unsupported techniques to get around this limitation. If you find code on the ’net that, say, uses KVC to read undocumented properties, or grovels through system logs, or walks the view hierarchy of the status bar, don’t use it. Such techniques are unsupported and, assuming they haven’t broken yet, are likely to break in the future. But what about Hotspot Helper? Hotspot Helper does have an API to read Wi-Fi signal strength, namely, the signalStrength property. However, this is not a general-purpose API. Like the rest of Hotspot Helper, this is tied to the specific use case for which it was designed. This value only updates in real time for networks that your hotspot helper is managing, as indicated by the isChosenHelper property. But what about MetricKit? MetricKit is so cool. Amongst other things, it supports the MXCellularConditionMetric payload, which holds a summary of the cellular conditions while your app was running. However, this is not a real-time signal strength value. But what if I’m working for a carrier? This post is about APIs in the iOS SDK. If you’re working for a carrier, discuss your requirements with your carrier’s contact at Apple.
0
0
1.9k
Jan ’24
iOS 16 CTCarrier deprecation
For iOS 16.X, CTCarrier will be deprecated. https://developer.apple.com/documentation/coretelephony/ctcarrier ①Could someone tell me why CTCarrier will be deprecated? ②What will be the correct way, going forward, to receive information regarding carrier information such as mobileCountryCode, mobileNetworkCode?
32
7
18k
Sep ’23
CTTelephonyNetworkInfo Crash in iOS 13.3.1, iPhone 8 Plus
Here is the crash message, can anyone help me to sovle it?# Version: 7.1.0 (200.2003091736)# Issue ID: 0c524b3dc585196cbe7ed564a4d841f3# Session ID: 30ad28258bdf47d4873df879a4e534cf_DNE_0_v2# Date: 2020-03-14T08:36:00Z# OS Version: 13.3.1 (17D50)# Device: iPhone 8 Plus# RAM Free: 1.5%# Disk Free: 22.3%#0. Crashed: com.apple.main-thread0 CoreFoundation 0x1adf9e444 -[__NSDictionaryM objectForKeyedSubscript:] + 1441 CoreTelephony 0x1b2862640 -[CTTelephonyNetworkInfo updateRat:descriptor:] + 1402 CoreTelephony 0x1b2862534 -[CTTelephonyNetworkInfo queryRatForDescriptor:] + 3923 CoreTelephony 0x1b28622f0 -[CTTelephonyNetworkInfo queryRat] + 2364 CoreTelephony 0x1b285ff90 -[CTTelephonyNetworkInfo initWithClient:] + 9285 CoreTelephony 0x1b285fb90 -[CTTelephonyNetworkInfo init] + 92Here is a part of core codes:CTTelephonyNetworkInfo *telephonyNetworkInfo = [[CTTelephonyNetworkInfo alloc] init];CTCarrier *carrier = telephonyNetworkInfo.subscriberCellularProvider;NSString *serviceCarrierName = carrier.carrierName;I use telephonyNetworkInfo, which is a temporary variable, to get the carrier's name. When I need a new carrier's name, I will use CTTelephonyNetworkInfo class to initialize a new one again. Is there a problem?
16
0
7.2k
Oct ’23
Use iphone antenna without sim card
Hi I am trying to make mobile app my question Is there any way to use iphone antenna without sim card? I am trying to send data to another iphone with antenna no wifi or bluetooth signal thanks. (kind of virtual sim, and antenna menaing that signal such is LTE is receiveing and sending or we are using to call) I search a lot. if it must be done in kernel please tell.
3
0
1.2k
Aug ’23