CLLocationSourceInformation
open class CLLocationSourceInformation : NSObject, NSCopying, NSSecureCoding
Contains metadata about the source of a location, including whether it was generated by a simulator or an external accessory. Apple Documentation
-
Indicates whether the location was generated by a software simulator, such as Xcode.
Declaration
Swift
public let isSimulatedBySoftware: Bool
-
Indicates whether the location was generated by an external accessory, such as CarPlay or an MFi accessory.
Declaration
Swift
public let isProducedByAccessory: Bool
-
Indicates that
CLLocationSourceInformation
supports secure coding. Apple DocumentationDeclaration
Swift
public static let supportsSecureCoding: Bool
-
Creates a
CLLocationSourceInformation
instance with the specified source metadata.Declaration
Swift
public init(softwareSimulationState isSoftware: Bool, andExternalAccessoryState isAccessory: Bool)
Parameters
isSoftware
true
if the location was generated by a software simulator, otherwisefalse
.isAccessory
true
if the location was generated by an external accessory, otherwisefalse
. Apple Documentation
-
Creates a copy of this
CLLocationSourceInformation
instance.Declaration
Swift
public func copy(with zone: NSZone? = nil) -> Any
Return Value
A new
CLLocationSourceInformation
object with the same properties. Apple Documentation
-
Initializes a
CLLocationSourceInformation
from anNSCoder
.Declaration
Swift
public required init?(coder: NSCoder)
Parameters
coder
The
NSCoder
instance used to decode the properties. -
Encodes this
CLLocationSourceInformation
into anNSCoder
.Declaration
Swift
public func encode(with coder: NSCoder)
Parameters
coder
The
NSCoder
instance used to encode the properties.