Documentation Archive Developer
Search

CoreLocation Changes for Swift

CoreLocation

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Modified CLBeacon
DeclarationProtocols
From
class CLBeacon : NSObject, NSCopying, NSSecureCoding, NSCoding {
    var proximityUUID: NSUUID { get }
    var major: NSNumber { get }
    var minor: NSNumber { get }
    var proximity: CLProximity { get }
    var accuracy: CLLocationAccuracy { get }
    var rssi: Int { get }
}
AnyObject, NSCoding, NSCopying, NSSecureCoding
To
class CLBeacon : NSObject, NSCopying, NSSecureCoding {
    var proximityUUID: NSUUID { get }
    var major: NSNumber { get }
    var minor: NSNumber { get }
    var proximity: CLProximity { get }
    var accuracy: CLLocationAccuracy { get }
    var rssi: Int { get }
}
NSCopying, NSSecureCoding

Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--

DeclarationProtocols
From
enum CLError : Int {
    case LocationUnknown
    case Denied
    case Network
    case HeadingFailure
    case RegionMonitoringDenied
    case RegionMonitoringFailure
    case RegionMonitoringSetupDelayed
    case RegionMonitoringResponseDelayed
    case GeocodeFoundNoResult
    case GeocodeFoundPartialResult
    case GeocodeCanceled
    case DeferredFailed
    case DeferredNotUpdatingLocation
    case DeferredAccuracyTooLow
    case DeferredDistanceFiltered
    case DeferredCanceled
    case RangingUnavailable
    case RangingFailure
}
extension CLError : Hashable, Equatable, __BridgedNSError, ErrorType, RawRepresentable, _ObjectiveCBridgeableErrorType, _BridgedNSError {
}
extension CLError : Hashable, Equatable, __BridgedNSError, ErrorType, RawRepresentable, _ObjectiveCBridgeableErrorType, _BridgedNSError {
}
Equatable, ErrorType, Hashable, RawRepresentable
To
enum CLError : Int {
    case LocationUnknown
    case Denied
    case Network
    case HeadingFailure
    case RegionMonitoringDenied
    case RegionMonitoringFailure
    case RegionMonitoringSetupDelayed
    case RegionMonitoringResponseDelayed
    case GeocodeFoundNoResult
    case GeocodeFoundPartialResult
    case GeocodeCanceled
    case DeferredFailed
    case DeferredNotUpdatingLocation
    case DeferredAccuracyTooLow
    case DeferredDistanceFiltered
    case DeferredCanceled
    case RangingUnavailable
    case RangingFailure
}
extension CLError : _BridgedNSError {
}
extension CLError : _BridgedNSError {
}
--

Modified CLFloor
DeclarationProtocols
From
class CLFloor : NSObject, NSCopying, NSSecureCoding, NSCoding {
    var level: Int { get }
}
AnyObject, NSCoding, NSCopying, NSSecureCoding
To
class CLFloor : NSObject, NSCopying, NSSecureCoding {
    var level: Int { get }
}
NSCopying, NSSecureCoding

Modified CLGeocoder
Protocols
FromAnyObject
To--

Modified CLHeading
DeclarationProtocols
From
class CLHeading : NSObject, NSCopying, NSSecureCoding, NSCoding {
    var magneticHeading: CLLocationDirection { get }
    var trueHeading: CLLocationDirection { get }
    var headingAccuracy: CLLocationDirection { get }
    var x: CLHeadingComponentValue { get }
    var y: CLHeadingComponentValue { get }
    var z: CLHeadingComponentValue { get }
    @NSCopying var timestamp: NSDate { get }
    var description: String { get }
}
AnyObject, NSCoding, NSCopying, NSSecureCoding
To
class CLHeading : NSObject, NSCopying, NSSecureCoding {
    var magneticHeading: CLLocationDirection { get }
    var trueHeading: CLLocationDirection { get }
    var headingAccuracy: CLLocationDirection { get }
    var x: CLHeadingComponentValue { get }
    var y: CLHeadingComponentValue { get }
    var z: CLHeadingComponentValue { get }
    @NSCopying var timestamp: NSDate { get }
    var description: String { get }
}
NSCopying, NSSecureCoding

Modified CLLocation
DeclarationProtocols
From
class CLLocation : NSObject, NSCopying, NSSecureCoding, NSCoding {
    init(latitude latitude: CLLocationDegrees, longitude longitude: CLLocationDegrees)
    init(coordinate coordinate: CLLocationCoordinate2D, altitude altitude: CLLocationDistance, horizontalAccuracy hAccuracy: CLLocationAccuracy, verticalAccuracy vAccuracy: CLLocationAccuracy, timestamp timestamp: NSDate)
    init(coordinate coordinate: CLLocationCoordinate2D, altitude altitude: CLLocationDistance, horizontalAccuracy hAccuracy: CLLocationAccuracy, verticalAccuracy vAccuracy: CLLocationAccuracy, course course: CLLocationDirection, speed speed: CLLocationSpeed, timestamp timestamp: NSDate)
    var coordinate: CLLocationCoordinate2D { get }
    var altitude: CLLocationDistance { get }
    var horizontalAccuracy: CLLocationAccuracy { get }
    var verticalAccuracy: CLLocationAccuracy { get }
    var course: CLLocationDirection { get }
    var speed: CLLocationSpeed { get }
    @NSCopying var timestamp: NSDate { get }
    @NSCopying var floor: CLFloor? { get }
    var description: String { get }
    func getDistanceFrom(_ location: CLLocation) -> CLLocationDistance
    func distanceFromLocation(_ location: CLLocation) -> CLLocationDistance
}
extension CLLocation : CKRecordValue {
}
AnyObject, CKRecordValue, NSCoding, NSCopying, NSObjectProtocol, NSSecureCoding
To
class CLLocation : NSObject, NSCopying, NSSecureCoding {
    init(latitude latitude: CLLocationDegrees, longitude longitude: CLLocationDegrees)
    init(coordinate coordinate: CLLocationCoordinate2D, altitude altitude: CLLocationDistance, horizontalAccuracy hAccuracy: CLLocationAccuracy, verticalAccuracy vAccuracy: CLLocationAccuracy, timestamp timestamp: NSDate)
    init(coordinate coordinate: CLLocationCoordinate2D, altitude altitude: CLLocationDistance, horizontalAccuracy hAccuracy: CLLocationAccuracy, verticalAccuracy vAccuracy: CLLocationAccuracy, course course: CLLocationDirection, speed speed: CLLocationSpeed, timestamp timestamp: NSDate)
    var coordinate: CLLocationCoordinate2D { get }
    var altitude: CLLocationDistance { get }
    var horizontalAccuracy: CLLocationAccuracy { get }
    var verticalAccuracy: CLLocationAccuracy { get }
    var course: CLLocationDirection { get }
    var speed: CLLocationSpeed { get }
    @NSCopying var timestamp: NSDate { get }
    @NSCopying var floor: CLFloor? { get }
    var description: String { get }
    func getDistanceFrom(_ location: CLLocation) -> CLLocationDistance
    func distanceFromLocation(_ location: CLLocation) -> CLLocationDistance
}
extension CLLocation : CKRecordValue {
}
CKRecordValue, NSCopying, NSSecureCoding

Protocols
FromAnyObject
To--

Modified CLPlacemark
DeclarationProtocols
From
class CLPlacemark : NSObject, NSCopying, NSSecureCoding, NSCoding {
    init(placemark placemark: CLPlacemark)
    @NSCopying var location: CLLocation? { get }
    @NSCopying var region: CLRegion? { get }
    @NSCopying var timeZone: NSTimeZone? { get }
    var addressDictionary: [NSObject : AnyObject]? { get }
    var name: String? { get }
    var thoroughfare: String? { get }
    var subThoroughfare: String? { get }
    var locality: String? { get }
    var subLocality: String? { get }
    var administrativeArea: String? { get }
    var subAdministrativeArea: String? { get }
    var postalCode: String? { get }
    var ISOcountryCode: String? { get }
    var country: String? { get }
    var inlandWater: String? { get }
    var ocean: String? { get }
    var areasOfInterest: [String]? { get }
}
AnyObject, NSCoding, NSCopying, NSSecureCoding
To
class CLPlacemark : NSObject, NSCopying, NSSecureCoding {
    init(placemark placemark: CLPlacemark)
    @NSCopying var location: CLLocation? { get }
    @NSCopying var region: CLRegion? { get }
    @NSCopying var timeZone: NSTimeZone? { get }
    var addressDictionary: [NSObject : AnyObject]? { get }
    var name: String? { get }
    var thoroughfare: String? { get }
    var subThoroughfare: String? { get }
    var locality: String? { get }
    var subLocality: String? { get }
    var administrativeArea: String? { get }
    var subAdministrativeArea: String? { get }
    var postalCode: String? { get }
    var ISOcountryCode: String? { get }
    var country: String? { get }
    var inlandWater: String? { get }
    var ocean: String? { get }
    var areasOfInterest: [String]? { get }
}
NSCopying, NSSecureCoding

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Modified CLRegion
DeclarationProtocols
From
class CLRegion : NSObject, NSCopying, NSSecureCoding, NSCoding {
    init(circularRegionWithCenter center: CLLocationCoordinate2D, radius radius: CLLocationDistance, identifier identifier: String)
    var center: CLLocationCoordinate2D { get }
    var radius: CLLocationDistance { get }
    var identifier: String { get }
    var notifyOnEntry: Bool
    var notifyOnExit: Bool
    func containsCoordinate(_ coordinate: CLLocationCoordinate2D) -> Bool
}
AnyObject, NSCoding, NSCopying, NSSecureCoding
To
class CLRegion : NSObject, NSCopying, NSSecureCoding {
    init(circularRegionWithCenter center: CLLocationCoordinate2D, radius radius: CLLocationDistance, identifier identifier: String)
    var center: CLLocationCoordinate2D { get }
    var radius: CLLocationDistance { get }
    var identifier: String { get }
    var notifyOnEntry: Bool
    var notifyOnExit: Bool
    func containsCoordinate(_ coordinate: CLLocationCoordinate2D) -> Bool
}
NSCopying, NSSecureCoding

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Modified CLVisit
DeclarationProtocols
From
class CLVisit : NSObject, NSSecureCoding, NSCoding, NSCopying {
    @NSCopying var arrivalDate: NSDate { get }
    @NSCopying var departureDate: NSDate { get }
    var coordinate: CLLocationCoordinate2D { get }
    var horizontalAccuracy: CLLocationAccuracy { get }
}
AnyObject, NSCoding, NSCopying, NSSecureCoding
To
class CLVisit : NSObject, NSSecureCoding, NSCopying {
    @NSCopying var arrivalDate: NSDate { get }
    @NSCopying var departureDate: NSDate { get }
    var coordinate: CLLocationCoordinate2D { get }
    var horizontalAccuracy: CLLocationAccuracy { get }
}
NSCopying, NSSecureCoding