Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Objective-C read cellular network provider

Tags:

ios

On iPhone we have Carrier name displayed next to the cellular connection signal strength in a left corner. There are some apps that can modify this name. Is there a way to read this value via APIs? It differs from CTCarrier.carrierName when roaming.

like image 438
user3293778 Avatar asked Jan 26 '26 14:01

user3293778


1 Answers

I really dont understand your question, if you want to get the Carrier Name this is the code:

Prefix: #import <CoreTelephony/CTTelephonyNetworkInfo.h>
        #import <CoreTelephony/CTCarrier.h>


CTTelephonyNetworkInfo *info = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [info subscriberCellularProvider];

NSString *string = [carrier carrierName];

Hope it helps!

like image 177
Karlo A. López Avatar answered Jan 28 '26 06:01

Karlo A. López