Kelvin
Kelvin

Reputation: 1986

Is there a way to get the carrier information of an iPhone user programmatically?

Aside from using the region to infer which carrier the user is under.

Upvotes: 2

Views: 1763

Answers (5)

Louie
Louie

Reputation: 5940

1st Import #import <CoreTelephony/CTTelephonyNetworkInfo.h> make sure you have the Framework installed too.

CTTelephonyNetworkInfo *phoneInfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *phoneCarrier = [phoneInfo subscriberCellularProvider];
NSLog(@"Carrier = %@", [phoneCarrier carrierName]);
[phoneInfo release];

Upvotes: 2

joneswah
joneswah

Reputation: 2798

I know this is a super old question and at the time there was no mechanism to check which carrier was used. But since iOS4 there is.

See the answers on this previous question which provides solution using CTTelephonyNetworkInfo

Upvotes: 0

massive mobile
massive mobile

Reputation: 1

you can use this product by my company to get the country & operator of mobile handsets: http://werwar.com , i'll set you up with a free trial but you send a post to our server from your app and it returns a string with the carrier (of known) and country.

Upvotes: 0

Taptronic
Taptronic

Reputation: 5150

Would it be possible to inspect the IP address to determine carrier?

Upvotes: 0

August
August

Reputation: 12177

No, there is no API in the SDK to do this.

Upvotes: 0

Related Questions