CoreTelephony框架iOS 7 [英] CoreTelephony Framework iOS 7
问题描述
在iOS 7的CoreTelephony框架中是否有更多允许更多的更改?!我在这里找到了新的Headerfiles:
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?!
推荐答案
关于Apple Dev的最新文档是2010年3月15日,涵盖iOS 4.0,并包括以下课程:
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
- CTCall
- CTCallCenter
- CTCarrier
- CTTelephonyNetwork
iOS 7更新的唯一可用文档包括Kogus发布的内容以及一行说更新,查看头文件。当您在XCode中打开框架时,iOS 7中提供了以下类:
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
- CTCall
- CTCallCenter
- CTCarrier
- CTSubscriber
- CTSubscriberInfo
- CTTelephonyNetwork
根据iOS 7关于无线电技术的说明,它看起来很像最相关的更改是在 CTTelephonyNetwork
类中,添加了 currentRadioAccessTechnology
属性。
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.
看起来实际上有更多可用的,仅基于github链接。但我愿意打赌,那些主要是私人API。我认为最安全的方法是坚持使用Xcode中的公共头文件。为此,iOS 7中添加的相关位将是(删除之前的iOS 7代码):
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);
并且......
/*
* 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
希望有所帮助。
这篇关于CoreTelephony框架iOS 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!