JacquardManager
public protocol JacquardManager
                Discovers and connects to Jacquard tags.
In normal use, you will obtain a singleton instance via sharedJacquardManager.
- 
                  
                  
Convenience initializer.
You should only create one instance of
JacquardManagerImplementation.Declaration
Swift
init( publishQueue: DispatchQueue, options: [String: String]?, config: SDKConfig, restorePeripheralsHandler: (([UUID]) -> Void)? ) - 
                  
                  
Publishes the current state of the
CBPeripheralManager.This will immediately publish the current state as well as any future changes.
Declaration
Swift
var centralState: AnyPublisher<CBManagerState, Never> { get } - 
                  
                  
Publishes a value whenever the CoreBluetooth scanning state changes.
Declaration
Swift
var isScanning: AnyPublisher<Bool, Never> { get } - 
                  
                  
Default connection timeout is 60 seconds. In future, SDK will allow to set connection timeout using an api. http://b/222397075 Allow SDK User to set connection timeout.
Declaration
Swift
var connectionTimeoutDuration: TimeInterval { get } - 
                  
                  
Start scanning for connectable Jacquard tags.
Discovered tags will be published to
advertisingTags. EnsurecentralStateisCBManagerState.poweredOnbefore calling this method.You should call
stopScanning()when you no longer need to observe advertising tags.Throws
Throws
JacquardManagerScanningError.Declaration
Swift
func startScanning(options: [String : Any]?) throwsParameters
optionsAn optional dictionary specifying options (CBCentralManagerScanOptionAllowDuplicatesKey, CBCentralManagerScanOptionSolicitedServiceUUIDsKey) for the scan.
 - 
                  
                  
Stops scanning for connectable Jacquard tags.
Declaration
Swift
func stopScanning() - 
                  
                  
Publishes any found Jacquard tags.
Tags will be discovered once
startScanning()is called. You can pass an instance ofAdvertisedTagto.connect(_:).Declaration
Swift
var advertisingTags: AnyPublisher<AdvertisedTag, Never> { get } - 
                  
                  
Returns any Jacquard tags already connected to the phone.
You can pass UUID
PreConnectedTag.identifierto.connect(_:)Declaration
Swift
func preConnectedTags() -> [PreConnectedTag] - 
                  
                  
Connects to a connectable tag.
The publisher returned by this method will always publish the current state (which includes the current
ConnectedTaginstance in the case of.connected) when any new subscription is made.Declaration
Swift
func connect(_ tag: ConnectableTag) -> AnyPublisher<TagConnectionState, Error>Parameters
tagan instance that conforms to
ConnectableTag(which you can obtain either via.advertisedTagsor.preConnectedTags(). - 
                  
                  
Connect to a known tag by identifier.
connect(_ tag:)should be used in preference when you have obtained anAdvertisedTaginstance from scanning, or have aPreConnectedTaginstance frompreConnectedTags(). This method is useful when you have persisted a UUID and wish to attempt a connection.If a bluetooth with this UUID is not known to Core Bluetooth, the publisher will complete with error
TagConnectionError.bluetoothDeviceNotFound.The publisher returned by this method will always publish the current state (which includes the current
ConnectedTaginstance in the case of.connected) when any new subscription is made.Declaration
Swift
func connect(_ identifier: UUID) -> AnyPublisher<TagConnectionState, Error>Parameters
identifierUUID from
JacquardTag.identifier. - 
                  
                  
Provides
ConnectedTagif available.The publisher returned by this method will have a
ConnectedTaginstance if the current state of the tag is.connectedornilotherwise.Declaration
Swift
func getConnectedTag(for identifier: UUID) -> AnyPublisher<ConnectedTag?, Never>Parameters
identifieran identifier for the required
ConnectedTag. - 
                  
                  
Disconnect to a known tag.
If this peripheral is not known to Core Bluetooth, the publisher will complete with error
TagConnectionError.bluetoothDeviceNotFound.Declaration
Swift
func disconnect(_ tag: ConnectedTag) -> AnyPublisher<TagConnectionState, Error>Parameters
taga connected tag
 - 
                  
                  
Disconnect to a known tag by identifier.
If this peripheral is not known to Core Bluetooth, the publisher will complete with error
TagConnectionError.bluetoothDeviceNotFound.Declaration
Swift
func disconnect(_ identifier: UUID) -> AnyPublisher<TagConnectionState, Error>Parameters
identifierthe CoreBluetooth identifier of a connected tag
 
            View on GitHub
          
      JacquardManager Protocol Reference