1

Are there any Changes which will allow more in the CoreTelephony Framework in iOS 7?! I found the new Headerfiles here:

https://github.com/EthanArbuckle/IOS-7-Headers/tree/master/Frameworks/CoreTelephony.framework

So, does that mean that it is now allowed to use those methods?! Or are they still private?!

davidOhara
  • 1,008
  • 5
  • 17
  • 39
  • [iOS 6.1 to iOS 7.0 API Differences](https://developer.apple.com/library/ios/releasenotes/General/iOS70APIDiffs/index.html#//apple_ref/doc/uid/TP40013203) – Desdenova Sep 23 '13 at 14:07
  • So these Headers which are listed under your Link i can use without getting rejected by Apple?! – davidOhara Sep 23 '13 at 14:13
  • 2
    Yes, of course. Non-public api's are never documented. So if you ever see anything in the official docs, they are free to use. – Desdenova Sep 23 '13 at 14:14
  • write this as an answer, so i can give you your credits! – davidOhara Sep 23 '13 at 15:00

2 Answers2

6

The last available documentation on Apple Dev is from March 15, 2010, covers iOS 4.0, and includes the following classes:

  • CTCall
  • CTCallCenter
  • CTCarrier
  • CTTelephonyNetwork

The only available documentation for iOS 7 updates include what Kogus posted as well as a single line that says "for updates, look at the header files". When you open up the framework in XCode, the following classes are available in iOS 7:

  • CTCall
  • CTCallCenter
  • CTCarrier
  • CTSubscriber
  • CTSubscriberInfo
  • CTTelephonyNetwork

Based on the iOS 7 note about radio technology, it looks like the most pertinent change is within the CTTelephonyNetwork class, with the addition of the currentRadioAccessTechnology property.

It looks like there is actually a LOT more available, just based on the github link. But I'm willing to bet that those are mostly private APIs. I think the safest approach would be to stick to public headers available in Xcode. To that end, the pertinent bits added in iOS 7 would be (with pre iOS 7 code removed):

/*
 * CTSubscriberTokenRefreshed
 *
 * Description:
 *     The name of the NSNotification sent when the carrier token is available.
 */
CORETELEPHONY_EXTERN NSString * const CTSubscriberTokenRefreshed  __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0);

CORETELEPHONY_CLASS_AVAILABLE(7_0)
@interface CTSubscriber : NSObject

/*
 * carrierToken
 *
 * Description:
 *     A data blob containing authorization information about the subscriber.
 *
 *     May return nil if no token is available.
 */
@property (nonatomic, readonly, retain) NSData* carrierToken  __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0);

And...

/*
 *  CTTelephonyNetworkInfo.h
 *  CoreTelephony
 *
 *  Copyright 2009 Apple, Inc. All rights reserved.
 *
 */

#import <Foundation/Foundation.h>
#import <CoreTelephony/CoreTelephonyDefines.h>

/*
 * CTRadioAccessTechnologyDataTechnologyDidChangeNotification
 *
 * Description:
 *     A NSNotification broadcast when radio access technology changes
 */
CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyDidChangeNotification __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0);

/*
 * Radio Access Technology values
 */
CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyGPRS          __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0);
CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyEdge          __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0);
CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyWCDMA         __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0);
CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyHSDPA         __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0);
CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyHSUPA         __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0);
CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyCDMA1x        __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0);
CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyCDMAEVDORev0  __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0);
CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyCDMAEVDORevA  __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0);
CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyCDMAEVDORevB  __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0);
CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyeHRPD         __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0);
CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyLTE           __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0);

/*
 * currentRadioAccessTechnology
 *
 * Discussion:
 *   The current radio access technology the device is registered with. May be NULL
 *   if device is not registered on any network.
 */
@property (nonatomic, readonly, retain) NSString* currentRadioAccessTechnology __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0);

@end

Hope that helps.

Justin Whitney
  • 1,242
  • 11
  • 17
0

From What's New in iOS: iOS 7.0:

The Core Telephony framework (CoreTelephony.framework) lets you get information about the type of radio technology in use by the device. Apps developed in conjunction with a carrier can also authenticate against a particular subscriber for that carrier.

Guy Kogus
  • 7,251
  • 1
  • 27
  • 32