What's New / Connectivity & Hardware

What's new in CoreTelephony

+3 NewiOS

CoreTelephony gives apps read access to cellular telephony state on iOS, including carrier and radio access technology information through CTTelephonyNetworkInfo.

The 27 SDK adds 3 APIs with no deprecations or removals. It adds a Delegate protocol, touches CTTelephonyNetworkInfo, and adds a NotificationCenter.MessageIdentifier entry.

New

3
extension

CTTelephonyNetworkInfo

NewiOS
extension CTTelephonyNetworkInfo
Declaration
extension CTTelephonyNetworkInfo {

    /// A message that posts when the radio access technology changes for one of the services.
    ///
    /// Use the ``serviceIdentifier`` property  as the key in ``CTTelephonyNetworkInfo/serviceCurrentRadioAccessTechnology`` to get the value of the new radio access technology for the service.
    public struct RadioAccessTechnologyDidChangeMessage : NotificationCenter.AsyncMessage {

        /// A type which you can optionally post and observe along with this `AsyncMessage`.
        public typealias Subject = String

        /// A optional name corresponding to this type, used to interoperate with notification posters and observers.
        public static var name: Notification.Name { get }

        /// The service identifier for which the radio access technology changed.
        public var serviceIdentifier: String

        /// Converts a posted notification into this asynchronous message type for any observers.
        ///
        /// To implement this method in your own `AsyncMessage` conformance, retrieve values from the ``Notification``'s ``Notification/userInfo`` and set them as properties on the message.
        /// - Parameter notification: The posted ``Notification``.
        /// - Returns: The converted `AsyncMessage`, or `nil` if conversion is not possible.
        public static func makeMessage(_ notification: Notification) -> CTTelephonyNetworkInfo.RadioAccessTechnologyDidChangeMessage?

        /// Converts a posted asynchronous message into a notification for any observers.
        ///
        /// To implement this method in your own `AsyncMessage` conformance, use the properties defined by the message to populate the ``Notification``'s ``Notification/userInfo``.
        /// - Parameters:
        ///   - message: The posted `AsyncMessage`.
        /// - Returns: The converted ``Notification``.
        public static func makeNotification(_ message: CTTelephonyNetworkInfo.RadioAccessTechnologyDidChangeMessage) -> Notification
    }
}
extension

NotificationCenter.MessageIdentifier

NewiOS
extension NotificationCenter.MessageIdentifier where Self == NotificationCenter.BaseMessageIdentifier<CTTelephonyNetworkInfo.RadioAccessTechnologyDidChangeMessage>
Declaration
extension NotificationCenter.MessageIdentifier where Self == NotificationCenter.BaseMessageIdentifier<CTTelephonyNetworkInfo.RadioAccessTechnologyDidChangeMessage> {

    public static var radioAccessTechnologyDidChange: NotificationCenter.BaseMessageIdentifier<CTTelephonyNetworkInfo.RadioAccessTechnologyDidChangeMessage> { get }
}
protocol

CTQuickSwitchManager.Delegate

NewiOS
public protocol Delegate : NSObjectProtocol
Declaration
public protocol Delegate : NSObjectProtocol {

    optional func quickSwitchManager(_ quickSwitchManager: CTQuickSwitchManager, didChangeTo state: CTQuickSwitchState)
}

No APIs match your filter.

← More in Connectivity & Hardware