In iOS 7, CTSubscriber was added to the CoreTelephony . There is no documentation available, only its header file:
CORETELEPHONY_EXTERN NSString * const CTSubscriberTokenRefreshed __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0); CORETELEPHONY_CLASS_AVAILABLE(7_0) @interface CTSubscriber : NSObject @property (nonatomic, readonly, retain) NSData* carrierToken __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0); @end
Also, on What's New in iOS 7 , this is mentioned:
The structure of basic telephony ( CoreTelephony.framework ) provides information on the type of radio technology used by the device. Applications developed in conjunction with the medium can also authenticate against a particular subscriber for that carrier .
I think CTSubscriber refers to the bold part of the text. However, I did not find anything related to how this happens.
I tried using the following code (added to application:didFinishLaunchingWithOptions: to experiment with this API, but the notification never starts and carrierToken returns nil :
CTSubscriber *subscriber = [CTSubscriberInfo subscriber]; NSLog(@"%@", subscriber.carrierToken); [[NSNotificationCenter defaultCenter] addObserverForName:CTSubscriberTokenRefreshed object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note) { NSLog(@"=========="); NSLog(@"%@", note); NSLog(@"%@", subscriber.carrierToken); }];
So, I have the following questions:
ios objective-c ios7 core-telephony
Marcelo fabri
source share