How to display iphone version,IOS version,name of the the Network Provider in my app?
I am developing an iPhone app. In its about page I want to display the iPhone version, iOS version, and the name of the the Network Provider. I want fetch these from开发者_高级运维 the phone itself. How would I do that? Please Help.
Thanks in advance.
Model Version:
NSString *model = [[UIDevice currentDevice] model];
iOS Version:
NSString *systemVersion = [[UIDevice currentDevice] systemVersion];
Carrier name (iOS 4.0 minimum):
#import <CoreTelephony/CTTelephonyNetworkInfo.h>
#import <CoreTelephony/CTCarrier.h>
CTTelephonyNetworkInfo *netInfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [netInfo subscriberCellularProvider];
NSString *carrierName = [carrier carrierName];
[netInfo release];
精彩评论