Documentation Archive Developer
Search

CoreTelephony Changes for Swift

CoreTelephony

Modified CTCall
Declaration
From
class CTCall : NSObject {
    var callState: String! { get }
    var callID: String! { get }
}
To
class CTCall : NSObject {
    var callState: String { get }
    var callID: String { get }
}

Modified CTCall.callID
Declaration
From
var callID: String! { get }
To
var callID: String { get }

Declaration
From
var callState: String! { get }
To
var callState: String { get }

Modified CTCallCenter
Declaration
From
class CTCallCenter : NSObject {
    var currentCalls: Set<NSObject>! { get }
    var callEventHandler: ((CTCall!) -> Void)!
}
To
class CTCallCenter : NSObject {
    var currentCalls: Set<CTCall>? { get }
    var callEventHandler: ((CTCall) -> Void)?
}

Declaration
From
var callEventHandler: ((CTCall!) -> Void)!
To
var callEventHandler: ((CTCall) -> Void)?

Declaration
From
var currentCalls: Set<NSObject>! { get }
To
var currentCalls: Set<CTCall>? { get }

Modified CTCarrier
Declaration
From
class CTCarrier : NSObject {
    var carrierName: String! { get }
    var mobileCountryCode: String! { get }
    var mobileNetworkCode: String! { get }
    var isoCountryCode: String! { get }
    var allowsVOIP: Bool { get }
}
To
class CTCarrier : NSObject {
    var carrierName: String? { get }
    var mobileCountryCode: String? { get }
    var mobileNetworkCode: String? { get }
    var isoCountryCode: String? { get }
    var allowsVOIP: Bool { get }
}

Declaration
From
var carrierName: String! { get }
To
var carrierName: String? { get }

Declaration
From
var isoCountryCode: String! { get }
To
var isoCountryCode: String? { get }

Declaration
From
var mobileCountryCode: String! { get }
To
var mobileCountryCode: String? { get }

Declaration
From
var mobileNetworkCode: String! { get }
To
var mobileNetworkCode: String? { get }

Modified CTSubscriber
Declaration
From
class CTSubscriber : NSObject {
    var carrierToken: NSData! { get }
}
To
class CTSubscriber : NSObject {
    var carrierToken: NSData? { get }
}

Declaration
From
var carrierToken: NSData! { get }
To
var carrierToken: NSData? { get }

Declaration
From
class CTSubscriberInfo : NSObject {
    class func subscriber() -> CTSubscriber!
}
To
class CTSubscriberInfo : NSObject {
    class func subscriber() -> CTSubscriber
}

Declaration
From
class func subscriber() -> CTSubscriber!
To
class func subscriber() -> CTSubscriber

Declaration
From
class CTTelephonyNetworkInfo : NSObject {
    var subscriberCellularProvider: CTCarrier! { get }
    var subscriberCellularProviderDidUpdateNotifier: ((CTCarrier!) -> Void)!
    var currentRadioAccessTechnology: String! { get }
}
To
class CTTelephonyNetworkInfo : NSObject {
    var subscriberCellularProvider: CTCarrier? { get }
    var subscriberCellularProviderDidUpdateNotifier: ((CTCarrier) -> Void)?
    var currentRadioAccessTechnology: String? { get }
}

Declaration
From
var currentRadioAccessTechnology: String! { get }
To
var currentRadioAccessTechnology: String? { get }

Declaration
From
var subscriberCellularProvider: CTCarrier! { get }
To
var subscriberCellularProvider: CTCarrier? { get }

Declaration
From
var subscriberCellularProviderDidUpdateNotifier: ((CTCarrier!) -> Void)!
To
var subscriberCellularProviderDidUpdateNotifier: ((CTCarrier) -> Void)?