JacquardManagerImplementation
public final class JacquardManagerImplementation : NSObject
extension JacquardManagerImplementation: JacquardManager
Concrete implementation of JacquardManager
.
You access the singleton instance via .shared
.
See JacquardManager
for detailed api documentation.
-
Declaration
Swift
public var connectionTimeoutDuration: TimeInterval { get }
-
Publishes any found Jacquard tags
See
JacquardManager.advertisingTags
for api documentation.Declaration
Swift
lazy public var advertisingTags: AnyPublisher<Publishers.ReceiveOn<Publishers.Buffer<PassthroughSubject<AdvertisedTag, Never>>, DispatchQueue>.Output, Publishers.ReceiveOn<Publishers.Buffer<PassthroughSubject<AdvertisedTag, Never>>, DispatchQueue>.Failure> { get set }
-
Publishes the current state of the
CBPeripheralManager
.See
JacquardManager.centralState
for api documentation.Declaration
Swift
lazy public var centralState: AnyPublisher<Publishers.ReceiveOn<Publishers.Buffer<CurrentValueSubject<CBManagerState, Never>>, DispatchQueue>.Output, Publishers.ReceiveOn<Publishers.Buffer<CurrentValueSubject<CBManagerState, Never>>, DispatchQueue>.Failure> { get set }
-
Convenience initalizer for JacquardManagerImpementation.
You should only create one instance of
JacquardManagerImplementation
.Declaration
Swift
public convenience init( publishQueue: DispatchQueue = .main, options: [String: String]? = nil, config: SDKConfig, restorePeripheralsHandler: (([UUID]) -> Void)? = nil )
Parameters
publishQueue
The dispatch queue on which the events will be dispatched. If
nil
, the main queue will be used.options
An optional dictionary specifying options (CBCentralManagerOptionRestoreIdentifierKey, CBCentralManagerOptionShowPowerAlertKey) for the central manager.
config
Configuration which can be used to identify user by bundleID and api key. See
SDKConfig
restorePeripheralsHandler
Callback with restore peripherals identifier. Peripherals that were connected or pending connection at the time the application was terminated by the system. Using
[UUID]
app can restore these peripherals state. -
Publishes a value whenever the CoreBluetooth scanning state changes.
See
JacquardManager.startScanning()
for api documentation.Declaration
Swift
public var isScanning: AnyPublisher<Bool, Never> { get }
-
Starts scanning for connectable Jacquard tags.
See
JacquardManager.startScanning()
for api documentation.Declaration
Swift
public func startScanning(options: [String : Any]? = nil) throws
-
Stops scanning for connectable Jacquard tags.
See
JacquardManager.stopScanning()
for api documentation.Declaration
Swift
public func stopScanning()
-
Returns any Jacquard tags already connected with the phone.
See
JacquardManager.preConnectedTags
for api documentation.Declaration
Swift
public func preConnectedTags() -> [PreConnectedTag]
-
Connects to a connectable tag.
See
JacquardManager.connect(_ tag:)
for api documentation.Declaration
Swift
public func connect(_ tag: ConnectableTag) -> AnyPublisher<TagConnectionState, Error>
-
Connects to a known tag identifier.
See
JacquardManager.connect(_ identifier:)
for api documentation.Declaration
Swift
public func connect(_ identifier: UUID) -> AnyPublisher<TagConnectionState, Error>
-
Declaration
Swift
public func getConnectedTag(for identifier: UUID) -> AnyPublisher<ConnectedTag?, Never>
-
Disconnect a connected tag.
See
JacquardManager.disconnect(_:)
for api documentation.Declaration
Swift
public func disconnect(_ tag: ConnectedTag) -> AnyPublisher<TagConnectionState, Error>
-
Disconnect a connected tag.
See
JacquardManager.disconnect(_:)
for api documentation.Declaration
Swift
public func disconnect(_ identifier: UUID) -> AnyPublisher<TagConnectionState, Error>