Build Information
Successful build of CoreBluetoothMock, reference main (96a8c7), with Swift 6.1 for macOS (SPM) on 8 Nov 2026 15:33:59 UTC.
Swift 6 data race errors: 30
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCapturesBuild Log
90 |
91 | /// The permissions of the characteristic value.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:379:74: warning: capture of 'central' with non-sendable type 'CBMCentralMock' in an isolated closure; this is an error in the Swift 6 language mode
377 | guard let self = self, self.state == .poweredOn, spec.isConnected,
378 | self.mutex.sync(execute: {
379 | self.owns(characteristic) && self.isSubscribed(central, to: characteristic)
| `- warning: capture of 'central' with non-sendable type 'CBMCentralMock' in an isolated closure; this is an error in the Swift 6 language mode
380 | }) else {
381 | return
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMCentral.swift:90:14: note: class 'CBMCentralMock' does not conform to the 'Sendable' protocol
88 | /// Each mock central is based on a ``CBMCentralSpec`` which is used to simulate the
89 | /// central's behavior.
90 | public class CBMCentralMock: CBMCentral {
| `- note: class 'CBMCentralMock' does not conform to the 'Sendable' protocol
91 | /// The specification of the simulated central.
92 | internal let spec: CBMCentralSpec
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:379:74: warning: implicit capture of 'central' requires that 'CBMCentralMock' conforms to 'Sendable'; this is an error in the Swift 6 language mode
377 | guard let self = self, self.state == .poweredOn, spec.isConnected,
378 | self.mutex.sync(execute: {
379 | self.owns(characteristic) && self.isSubscribed(central, to: characteristic)
| `- warning: implicit capture of 'central' requires that 'CBMCentralMock' conforms to 'Sendable'; this is an error in the Swift 6 language mode
380 | }) else {
381 | return
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMCentral.swift:90:14: note: class 'CBMCentralMock' does not conform to the 'Sendable' protocol
88 | /// Each mock central is based on a ``CBMCentralSpec`` which is used to simulate the
89 | /// central's behavior.
90 | public class CBMCentralMock: CBMCentral {
| `- note: class 'CBMCentralMock' does not conform to the 'Sendable' protocol
91 | /// The specification of the simulated central.
92 | internal let spec: CBMCentralSpec
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:379:87: warning: implicit capture of 'characteristic' requires that 'CBMMutableCharacteristic' conforms to 'Sendable'; this is an error in the Swift 6 language mode
377 | guard let self = self, self.state == .poweredOn, spec.isConnected,
378 | self.mutex.sync(execute: {
379 | self.owns(characteristic) && self.isSubscribed(central, to: characteristic)
| `- warning: implicit capture of 'characteristic' requires that 'CBMMutableCharacteristic' conforms to 'Sendable'; this is an error in the Swift 6 language mode
380 | }) else {
381 | return
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:89:12: note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
87 | /// characteristic must be read-only. Read requests for such characteristics are handled
88 | /// automatically without calling the peripheral manager's delegate.
89 | open class CBMMutableCharacteristic: CBMCharacteristic {
| `- note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
90 |
91 | /// The permissions of the characteristic value.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:415:27: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
413 | NSLog("[CoreBluetoothMock] L2CAP channels are not implemented in the mock. Publishing a channel failed.")
414 | queue.async { [weak self] in
415 | if let self = self, self.state == .poweredOn {
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
416 | self.delegate?.peripheralManager(self,
417 | didPublishL2CAPChannel: 0,
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:429:27: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
427 | NSLog("[CoreBluetoothMock] L2CAP channels are not implemented in the mock. Unpublishing channel with PSM \(PSM) failed.")
428 | queue.async { [weak self] in
429 | if let self = self, self.state == .poweredOn {
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
430 | self.delegate?.peripheralManager(self,
431 | didUnpublishL2CAPChannel: PSM,
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:449:20: warning: capture of 'manager' with non-sendable type 'CBMPeripheralManagerMock' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
447 | self.existingManagers.forEach { manager in
448 | manager.queue.async {
449 | if manager.state != .poweredOn {
| `- warning: capture of 'manager' with non-sendable type 'CBMPeripheralManagerMock' in a '@Sendable' closure
450 | // ...stop advertising and remove all services if state changed
451 | // to any other state than `.poweredOn`.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:510:30: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
508 | didSubscribeTo characteristic: CBMMutableCharacteristic) {
509 | queue.asyncAfter(deadline: .now() + spec.connectionInterval) { [weak self] in
510 | guard let self = self, self.state == .poweredOn, spec.isConnected else {
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
511 | NSLog("Warning: Central \(spec.identifier) is not connected")
512 | return
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:510:62: warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
508 | didSubscribeTo characteristic: CBMMutableCharacteristic) {
509 | queue.asyncAfter(deadline: .now() + spec.connectionInterval) { [weak self] in
510 | guard let self = self, self.state == .poweredOn, spec.isConnected else {
| `- warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
511 | NSLog("Warning: Central \(spec.identifier) is not connected")
512 | return
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CentralPeer/CBMCentralSpec.swift:46:14: note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
44 | /// Notifications and indications sent by the peripheral manager are delivered
45 | /// to the ``CBMCentralSpec/delegate``.
46 | public class CBMCentralSpec {
| `- note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
47 | /// The central identifier.
48 | public let identifier: UUID
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:515:33: warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in a '@Sendable' closure
513 | }
514 | let subscribedCentral: CBMCentralMock? = self.mutex.sync {
515 | guard self.owns(characteristic) else {
| `- warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in a '@Sendable' closure
516 | return nil
517 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:89:12: note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
87 | /// characteristic must be read-only. Read requests for such characteristics are handled
88 | /// automatically without calling the peripheral manager's delegate.
89 | open class CBMMutableCharacteristic: CBMCharacteristic {
| `- note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
90 |
91 | /// The permissions of the characteristic value.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:515:33: warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in an isolated closure; this is an error in the Swift 6 language mode
513 | }
514 | let subscribedCentral: CBMCentralMock? = self.mutex.sync {
515 | guard self.owns(characteristic) else {
| `- warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in an isolated closure; this is an error in the Swift 6 language mode
516 | return nil
517 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:89:12: note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
87 | /// characteristic must be read-only. Read requests for such characteristics are handled
88 | /// automatically without calling the peripheral manager's delegate.
89 | open class CBMMutableCharacteristic: CBMCharacteristic {
| `- note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
90 |
91 | /// The permissions of the characteristic value.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:518:49: warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in an isolated closure; this is an error in the Swift 6 language mode
516 | return nil
517 | }
518 | let central = self.central(for: spec)
| `- warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in an isolated closure; this is an error in the Swift 6 language mode
519 | guard !self.isSubscribed(central, to: characteristic) else {
520 | return nil
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CentralPeer/CBMCentralSpec.swift:46:14: note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
44 | /// Notifications and indications sent by the peripheral manager are delivered
45 | /// to the ``CBMCentralSpec/delegate``.
46 | public class CBMCentralSpec {
| `- note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
47 | /// The central identifier.
48 | public let identifier: UUID
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:537:30: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
535 | didUnsubscribeFrom characteristic: CBMMutableCharacteristic) {
536 | queue.asyncAfter(deadline: .now() + spec.connectionInterval) { [weak self] in
537 | guard let self = self, self.state == .poweredOn, spec.isConnected else {
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
538 | NSLog("Warning: Central \(spec.identifier) is not connected")
539 | return
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:537:62: warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
535 | didUnsubscribeFrom characteristic: CBMMutableCharacteristic) {
536 | queue.asyncAfter(deadline: .now() + spec.connectionInterval) { [weak self] in
537 | guard let self = self, self.state == .poweredOn, spec.isConnected else {
| `- warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
538 | NSLog("Warning: Central \(spec.identifier) is not connected")
539 | return
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CentralPeer/CBMCentralSpec.swift:46:14: note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
44 | /// Notifications and indications sent by the peripheral manager are delivered
45 | /// to the ``CBMCentralSpec/delegate``.
46 | public class CBMCentralSpec {
| `- note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
47 | /// The central identifier.
48 | public let identifier: UUID
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:542:33: warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in a '@Sendable' closure
540 | }
541 | let unsubscribedCentral: CBMCentralMock? = self.mutex.sync {
542 | guard self.owns(characteristic),
| `- warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in a '@Sendable' closure
543 | let central = self.centrals[spec.identifier],
544 | self.isSubscribed(central, to: characteristic) else {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:89:12: note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
87 | /// characteristic must be read-only. Read requests for such characteristics are handled
88 | /// automatically without calling the peripheral manager's delegate.
89 | open class CBMMutableCharacteristic: CBMCharacteristic {
| `- note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
90 |
91 | /// The permissions of the characteristic value.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:542:33: warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in an isolated closure; this is an error in the Swift 6 language mode
540 | }
541 | let unsubscribedCentral: CBMCentralMock? = self.mutex.sync {
542 | guard self.owns(characteristic),
| `- warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in an isolated closure; this is an error in the Swift 6 language mode
543 | let central = self.centrals[spec.identifier],
544 | self.isSubscribed(central, to: characteristic) else {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:89:12: note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
87 | /// characteristic must be read-only. Read requests for such characteristics are handled
88 | /// automatically without calling the peripheral manager's delegate.
89 | open class CBMMutableCharacteristic: CBMCharacteristic {
| `- note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
90 |
91 | /// The permissions of the characteristic value.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:543:51: warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in an isolated closure; this is an error in the Swift 6 language mode
541 | let unsubscribedCentral: CBMCentralMock? = self.mutex.sync {
542 | guard self.owns(characteristic),
543 | let central = self.centrals[spec.identifier],
| `- warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in an isolated closure; this is an error in the Swift 6 language mode
544 | self.isSubscribed(central, to: characteristic) else {
545 | return nil
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CentralPeer/CBMCentralSpec.swift:46:14: note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
44 | /// Notifications and indications sent by the peripheral manager are delivered
45 | /// to the ``CBMCentralSpec/delegate``.
46 | public class CBMCentralSpec {
| `- note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
47 | /// The central identifier.
48 | public let identifier: UUID
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:565:17: warning: capture of 'completion' with non-sendable type '(Result<Data, any Error>) -> Void' in a '@Sendable' closure
563 | let reply: (Result<Data, Error>) -> Void = { result in
564 | queue.asyncAfter(deadline: .now() + interval) {
565 | completion(result)
| |- warning: capture of 'completion' with non-sendable type '(Result<Data, any Error>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
566 | }
567 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:602:30: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
600 | }
601 | queue.asyncAfter(deadline: .now() + interval) { [weak self] in
602 | guard let self = self, self.state == .poweredOn, spec.isConnected,
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
603 | self.mutex.sync(execute: { () -> Bool in
604 | guard self.owns(characteristic) else {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:602:62: warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
600 | }
601 | queue.asyncAfter(deadline: .now() + interval) { [weak self] in
602 | guard let self = self, self.state == .poweredOn, spec.isConnected,
| `- warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
603 | self.mutex.sync(execute: { () -> Bool in
604 | guard self.owns(characteristic) else {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CentralPeer/CBMCentralSpec.swift:46:14: note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
44 | /// Notifications and indications sent by the peripheral manager are delivered
45 | /// to the ``CBMCentralSpec/delegate``.
46 | public class CBMCentralSpec {
| `- note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
47 | /// The central identifier.
48 | public let identifier: UUID
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:604:39: warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in a '@Sendable' closure
602 | guard let self = self, self.state == .poweredOn, spec.isConnected,
603 | self.mutex.sync(execute: { () -> Bool in
604 | guard self.owns(characteristic) else {
| `- warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in a '@Sendable' closure
605 | return false
606 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:89:12: note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
87 | /// characteristic must be read-only. Read requests for such characteristics are handled
88 | /// automatically without calling the peripheral manager's delegate.
89 | open class CBMMutableCharacteristic: CBMCharacteristic {
| `- note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
90 |
91 | /// The permissions of the characteristic value.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:607:51: warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in a '@Sendable' closure
605 | return false
606 | }
607 | self.pendingRequests.append(request)
| `- warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in a '@Sendable' closure
608 | return true
609 | }) else {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMATTRequest.swift:117:14: note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
115 | /// Such requests are created when a mock central, defined using ``CBMCentralSpec``,
116 | /// reads or writes a characteristic value.
117 | public class CBMATTRequestMock: CBMATTRequest {
| `- note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
118 | private let _central: CBMCentral
119 | private let _characteristic: CBMCharacteristic
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:610:17: warning: capture of 'reply' with non-sendable type '(Result<Data, any Error>) -> Void' in a '@Sendable' closure
608 | return true
609 | }) else {
610 | reply(.failure(CBMError(.notConnected)))
| |- warning: capture of 'reply' with non-sendable type '(Result<Data, any Error>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
611 | return
612 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:604:39: warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in an isolated closure; this is an error in the Swift 6 language mode
602 | guard let self = self, self.state == .poweredOn, spec.isConnected,
603 | self.mutex.sync(execute: { () -> Bool in
604 | guard self.owns(characteristic) else {
| `- warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in an isolated closure; this is an error in the Swift 6 language mode
605 | return false
606 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:89:12: note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
87 | /// characteristic must be read-only. Read requests for such characteristics are handled
88 | /// automatically without calling the peripheral manager's delegate.
89 | open class CBMMutableCharacteristic: CBMCharacteristic {
| `- note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
90 |
91 | /// The permissions of the characteristic value.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:607:51: warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in an isolated closure; this is an error in the Swift 6 language mode
605 | return false
606 | }
607 | self.pendingRequests.append(request)
| `- warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in an isolated closure; this is an error in the Swift 6 language mode
608 | return true
609 | }) else {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMATTRequest.swift:117:14: note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
115 | /// Such requests are created when a mock central, defined using ``CBMCentralSpec``,
116 | /// reads or writes a characteristic value.
117 | public class CBMATTRequestMock: CBMATTRequest {
| `- note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
118 | private let _central: CBMCentral
119 | private let _characteristic: CBMCharacteristic
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:627:17: warning: capture of 'withResponseCompletion' with non-sendable type '((Result<Void, any Error>) -> Void)?' in a '@Sendable' closure
625 | let reply: (Result<Void, Error>) -> Void = { result in
626 | queue.asyncAfter(deadline: .now() + interval) {
627 | withResponseCompletion?(result)
| |- warning: capture of 'withResponseCompletion' with non-sendable type '((Result<Void, any Error>) -> Void)?' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
628 | }
629 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:671:30: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
669 | } : nil)
670 | queue.asyncAfter(deadline: .now() + interval) { [weak self] in
671 | guard let self = self, self.state == .poweredOn, spec.isConnected,
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
672 | self.mutex.sync(execute: { () -> Bool in
673 | guard self.owns(characteristic) else {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:671:62: warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
669 | } : nil)
670 | queue.asyncAfter(deadline: .now() + interval) { [weak self] in
671 | guard let self = self, self.state == .poweredOn, spec.isConnected,
| `- warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
672 | self.mutex.sync(execute: { () -> Bool in
673 | guard self.owns(characteristic) else {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CentralPeer/CBMCentralSpec.swift:46:14: note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
44 | /// Notifications and indications sent by the peripheral manager are delivered
45 | /// to the ``CBMCentralSpec/delegate``.
46 | public class CBMCentralSpec {
| `- note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
47 | /// The central identifier.
48 | public let identifier: UUID
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:673:39: warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in a '@Sendable' closure
671 | guard let self = self, self.state == .poweredOn, spec.isConnected,
672 | self.mutex.sync(execute: { () -> Bool in
673 | guard self.owns(characteristic) else {
| `- warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in a '@Sendable' closure
674 | return false
675 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:89:12: note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
87 | /// characteristic must be read-only. Read requests for such characteristics are handled
88 | /// automatically without calling the peripheral manager's delegate.
89 | open class CBMMutableCharacteristic: CBMCharacteristic {
| `- note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
90 |
91 | /// The permissions of the characteristic value.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:677:55: warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in a '@Sendable' closure
675 | }
676 | if isWithResponse {
677 | self.pendingRequests.append(request)
| `- warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in a '@Sendable' closure
678 | }
679 | return true
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMATTRequest.swift:117:14: note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
115 | /// Such requests are created when a mock central, defined using ``CBMCentralSpec``,
116 | /// reads or writes a characteristic value.
117 | public class CBMATTRequestMock: CBMATTRequest {
| `- note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
118 | private let _central: CBMCentral
119 | private let _characteristic: CBMCharacteristic
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:682:21: warning: capture of 'reply' with non-sendable type '(Result<Void, any Error>) -> Void' in a '@Sendable' closure
680 | }) else {
681 | if isWithResponse {
682 | reply(.failure(CBMError(.notConnected)))
| |- warning: capture of 'reply' with non-sendable type '(Result<Void, any Error>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
683 | } else {
684 | NSLog("[CoreBluetoothMock] Write command to characteristic \(characteristic.uuid) dropped: not connected")
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:673:39: warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in an isolated closure; this is an error in the Swift 6 language mode
671 | guard let self = self, self.state == .poweredOn, spec.isConnected,
672 | self.mutex.sync(execute: { () -> Bool in
673 | guard self.owns(characteristic) else {
| `- warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in an isolated closure; this is an error in the Swift 6 language mode
674 | return false
675 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:89:12: note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
87 | /// characteristic must be read-only. Read requests for such characteristics are handled
88 | /// automatically without calling the peripheral manager's delegate.
89 | open class CBMMutableCharacteristic: CBMCharacteristic {
| `- note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
90 |
91 | /// The permissions of the characteristic value.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:677:55: warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in an isolated closure; this is an error in the Swift 6 language mode
675 | }
676 | if isWithResponse {
677 | self.pendingRequests.append(request)
| `- warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in an isolated closure; this is an error in the Swift 6 language mode
678 | }
679 | return true
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMATTRequest.swift:117:14: note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
115 | /// Such requests are created when a mock central, defined using ``CBMCentralSpec``,
116 | /// reads or writes a characteristic value.
117 | public class CBMATTRequestMock: CBMATTRequest {
| `- note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
118 | private let _central: CBMCentral
119 | private let _characteristic: CBMCharacteristic
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:724:27: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
722 | private func initialize() {
723 | queue.async { [weak self] in
724 | if let self = self {
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
725 | CBMPeripheralManagerMock.mutex.sync {
726 | CBMPeripheralManagerMock.managers.append(WeakRef(self))
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:747:27: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
745 | private func notifyDidAddServiceCallback(_ service: CBMMutableService, error: Error?) {
746 | queue.async { [weak self] in
747 | if let self = self, self.state == .poweredOn {
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
748 | self.delegate?.peripheralManager(self, didAdd: service, error: error)
749 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:748:64: warning: capture of 'service' with non-sendable type 'CBMMutableService' in a '@Sendable' closure
746 | queue.async { [weak self] in
747 | if let self = self, self.state == .poweredOn {
748 | self.delegate?.peripheralManager(self, didAdd: service, error: error)
| `- warning: capture of 'service' with non-sendable type 'CBMMutableService' in a '@Sendable' closure
749 | }
750 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:38:12: note: class 'CBMMutableService' does not conform to the 'Sendable' protocol
36 | /// ``CBMPeripheralManager``. The characteristics of a mutable service must be
37 | /// ``CBMMutableCharacteristic`` objects.
38 | open class CBMMutableService: CBMService {
| `- note: class 'CBMMutableService' does not conform to the 'Sendable' protocol
39 |
40 | /// A list of included services.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:756:30: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
754 | private func scheduleTimeout(of request: CBMATTRequestMock, for spec: CBMCentralSpec) {
755 | queue.asyncAfter(deadline: .now() + spec.attributeProtocolTimeout) { [weak self] in
756 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
757 | let isPending: Bool = self.mutex.sync {
758 | guard let index = self.pendingRequests.firstIndex(where: { $0 === request }) else {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:758:83: warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in a '@Sendable' closure
756 | guard let self = self else { return }
757 | let isPending: Bool = self.mutex.sync {
758 | guard let index = self.pendingRequests.firstIndex(where: { $0 === request }) else {
| `- warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in a '@Sendable' closure
759 | return false
760 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMATTRequest.swift:117:14: note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
115 | /// Such requests are created when a mock central, defined using ``CBMCentralSpec``,
116 | /// reads or writes a characteristic value.
117 | public class CBMATTRequestMock: CBMATTRequest {
| `- note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
118 | private let _central: CBMCentral
119 | private let _characteristic: CBMCharacteristic
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:758:83: warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in an isolated closure; this is an error in the Swift 6 language mode
756 | guard let self = self else { return }
757 | let isPending: Bool = self.mutex.sync {
758 | guard let index = self.pendingRequests.firstIndex(where: { $0 === request }) else {
| `- warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in an isolated closure; this is an error in the Swift 6 language mode
759 | return false
760 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMATTRequest.swift:117:14: note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
115 | /// Such requests are created when a mock central, defined using ``CBMCentralSpec``,
116 | /// reads or writes a characteristic value.
117 | public class CBMATTRequestMock: CBMATTRequest {
| `- note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
118 | private let _central: CBMCentral
119 | private let _characteristic: CBMCharacteristic
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:758:83: warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in an isolated closure; this is an error in the Swift 6 language mode
756 | guard let self = self else { return }
757 | let isPending: Bool = self.mutex.sync {
758 | guard let index = self.pendingRequests.firstIndex(where: { $0 === request }) else {
| `- warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in an isolated closure; this is an error in the Swift 6 language mode
759 | return false
760 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMATTRequest.swift:117:14: note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
115 | /// Such requests are created when a mock central, defined using ``CBMCentralSpec``,
116 | /// reads or writes a characteristic value.
117 | public class CBMATTRequestMock: CBMATTRequest {
| `- note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
118 | private let _central: CBMCentral
119 | private let _characteristic: CBMCharacteristic
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:830:30: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
828 | private func central(didDisconnect spec: CBMCentralSpec) {
829 | queue.async { [weak self] in
830 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
831 | return
832 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:836:71: warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
834 | let disconnected: (central: CBMCentralMock,
835 | characteristics: [CBMMutableCharacteristic])? = self.mutex.sync {
836 | guard let central = self.centrals.removeValue(forKey: spec.identifier) else {
| `- warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
837 | return nil
838 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CentralPeer/CBMCentralSpec.swift:46:14: note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
44 | /// Notifications and indications sent by the peripheral manager are delivered
45 | /// to the ``CBMCentralSpec/delegate``.
46 | public class CBMCentralSpec {
| `- note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
47 | /// The central identifier.
48 | public let identifier: UUID
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:836:71: warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in an isolated closure; this is an error in the Swift 6 language mode
834 | let disconnected: (central: CBMCentralMock,
835 | characteristics: [CBMMutableCharacteristic])? = self.mutex.sync {
836 | guard let central = self.centrals.removeValue(forKey: spec.identifier) else {
| `- warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in an isolated closure; this is an error in the Swift 6 language mode
837 | return nil
838 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CentralPeer/CBMCentralSpec.swift:46:14: note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
44 | /// Notifications and indications sent by the peripheral manager are delivered
45 | /// to the ``CBMCentralSpec/delegate``.
46 | public class CBMCentralSpec {
| `- note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
47 | /// The central identifier.
48 | public let identifier: UUID
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:839:90: warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in an isolated closure; this is an error in the Swift 6 language mode
837 | return nil
838 | }
839 | abortedRequests = self.pendingRequests.filter { $0.central.identifier == spec.identifier }
| `- warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in an isolated closure; this is an error in the Swift 6 language mode
840 | self.pendingRequests.removeAll { $0.central.identifier == spec.identifier }
841 | let characteristics = self.services
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CentralPeer/CBMCentralSpec.swift:46:14: note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
44 | /// Notifications and indications sent by the peripheral manager are delivered
45 | /// to the ``CBMCentralSpec/delegate``.
46 | public class CBMCentralSpec {
| `- note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
47 | /// The central identifier.
48 | public let identifier: UUID
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:840:75: warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in an isolated closure; this is an error in the Swift 6 language mode
838 | }
839 | abortedRequests = self.pendingRequests.filter { $0.central.identifier == spec.identifier }
840 | self.pendingRequests.removeAll { $0.central.identifier == spec.identifier }
| `- warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in an isolated closure; this is an error in the Swift 6 language mode
841 | let characteristics = self.services
842 | .flatMap { $0.characteristics ?? [] }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CentralPeer/CBMCentralSpec.swift:46:14: note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
44 | /// Notifications and indications sent by the peripheral manager are delivered
45 | /// to the ``CBMCentralSpec/delegate``.
46 | public class CBMCentralSpec {
| `- note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
47 | /// The central identifier.
48 | public let identifier: UUID
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerNative.swift:157:11: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerNative?' in a '@Sendable' closure
32 | import CoreBluetooth
33 |
34 | public class CBMPeripheralManagerNative: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerNative' does not conform to the 'Sendable' protocol
35 | private var observation: NSKeyValueObservation?
36 | @objc dynamic private var manager: CBPeripheralManager!
:
155 | observation = observe(\.manager?.isAdvertising, options: [.new]) { [weak self] _, change in
156 | if let new = change.newValue ?? nil {
157 | self?.isAdvertising = new
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerNative?' in a '@Sendable' closure
158 | }
159 | }
[14/33] Compiling CoreBluetoothMock CBMPeripheralManagerNative.swift
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:41:24: warning: static property 'managers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
| |- warning: static property 'managers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'managers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'managers' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
43 | private static let mutex: DispatchQueue = DispatchQueue(label: "Mutex")
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:42:24: warning: static property 'centrals' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
| |- warning: static property 'centrals' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'centrals' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'centrals' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
43 | private static let mutex: DispatchQueue = DispatchQueue(label: "Mutex")
44 |
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:105:23: warning: static property 'simulateStateRestoration' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
103 | /// - SeeAlso: ``CBMPeripheralManagerRestoredStateServicesKey``
104 | /// - SeeAlso: ``CBMPeripheralManagerRestoredStateAdvertisementDataKey``
105 | public static var simulateStateRestoration: ((_ identifierKey: String) -> [String : Any]?)?
| |- warning: static property 'simulateStateRestoration' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'simulateStateRestoration' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'simulateStateRestoration' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
106 |
107 | public init() {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:204:31: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
202 | guard !alreadyAdvertising else {
203 | queue.async { [weak self] in
204 | if let self = self {
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
205 | self.delegate?.peripheralManagerDidStartAdvertising(self, error: CBMError(.alreadyAdvertising))
206 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:219:30: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
217 |
218 | queue.async { [weak self] in
219 | guard let self = self, self.state == .poweredOn else {
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
220 | return
221 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:377:34: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
375 | queue.asyncAfter(deadline: .now() + spec.connectionInterval) { [weak self] in
376 | defer { delivery.leave() }
377 | guard let self = self, self.state == .poweredOn, spec.isConnected,
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
378 | self.mutex.sync(execute: {
379 | self.owns(characteristic) && self.isSubscribed(central, to: characteristic)
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:377:66: warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
375 | queue.asyncAfter(deadline: .now() + spec.connectionInterval) { [weak self] in
376 | defer { delivery.leave() }
377 | guard let self = self, self.state == .poweredOn, spec.isConnected,
| `- warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
378 | self.mutex.sync(execute: {
379 | self.owns(characteristic) && self.isSubscribed(central, to: characteristic)
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CentralPeer/CBMCentralSpec.swift:46:14: note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
44 | /// Notifications and indications sent by the peripheral manager are delivered
45 | /// to the ``CBMCentralSpec/delegate``.
46 | public class CBMCentralSpec {
| `- note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
47 | /// The central identifier.
48 | public let identifier: UUID
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:379:37: warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in a '@Sendable' closure
377 | guard let self = self, self.state == .poweredOn, spec.isConnected,
378 | self.mutex.sync(execute: {
379 | self.owns(characteristic) && self.isSubscribed(central, to: characteristic)
| `- warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in a '@Sendable' closure
380 | }) else {
381 | return
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:89:12: note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
87 | /// characteristic must be read-only. Read requests for such characteristics are handled
88 | /// automatically without calling the peripheral manager's delegate.
89 | open class CBMMutableCharacteristic: CBMCharacteristic {
| `- note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
90 |
91 | /// The permissions of the characteristic value.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:379:74: warning: capture of 'central' with non-sendable type 'CBMCentralMock' in a '@Sendable' closure
377 | guard let self = self, self.state == .poweredOn, spec.isConnected,
378 | self.mutex.sync(execute: {
379 | self.owns(characteristic) && self.isSubscribed(central, to: characteristic)
| `- warning: capture of 'central' with non-sendable type 'CBMCentralMock' in a '@Sendable' closure
380 | }) else {
381 | return
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMCentral.swift:90:14: note: class 'CBMCentralMock' does not conform to the 'Sendable' protocol
88 | /// Each mock central is based on a ``CBMCentralSpec`` which is used to simulate the
89 | /// central's behavior.
90 | public class CBMCentralMock: CBMCentral {
| `- note: class 'CBMCentralMock' does not conform to the 'Sendable' protocol
91 | /// The specification of the simulated central.
92 | internal let spec: CBMCentralSpec
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:379:37: warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in an isolated closure; this is an error in the Swift 6 language mode
377 | guard let self = self, self.state == .poweredOn, spec.isConnected,
378 | self.mutex.sync(execute: {
379 | self.owns(characteristic) && self.isSubscribed(central, to: characteristic)
| `- warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in an isolated closure; this is an error in the Swift 6 language mode
380 | }) else {
381 | return
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:89:12: note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
87 | /// characteristic must be read-only. Read requests for such characteristics are handled
88 | /// automatically without calling the peripheral manager's delegate.
89 | open class CBMMutableCharacteristic: CBMCharacteristic {
| `- note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
90 |
91 | /// The permissions of the characteristic value.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:379:74: warning: capture of 'central' with non-sendable type 'CBMCentralMock' in an isolated closure; this is an error in the Swift 6 language mode
377 | guard let self = self, self.state == .poweredOn, spec.isConnected,
378 | self.mutex.sync(execute: {
379 | self.owns(characteristic) && self.isSubscribed(central, to: characteristic)
| `- warning: capture of 'central' with non-sendable type 'CBMCentralMock' in an isolated closure; this is an error in the Swift 6 language mode
380 | }) else {
381 | return
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMCentral.swift:90:14: note: class 'CBMCentralMock' does not conform to the 'Sendable' protocol
88 | /// Each mock central is based on a ``CBMCentralSpec`` which is used to simulate the
89 | /// central's behavior.
90 | public class CBMCentralMock: CBMCentral {
| `- note: class 'CBMCentralMock' does not conform to the 'Sendable' protocol
91 | /// The specification of the simulated central.
92 | internal let spec: CBMCentralSpec
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:379:74: warning: implicit capture of 'central' requires that 'CBMCentralMock' conforms to 'Sendable'; this is an error in the Swift 6 language mode
377 | guard let self = self, self.state == .poweredOn, spec.isConnected,
378 | self.mutex.sync(execute: {
379 | self.owns(characteristic) && self.isSubscribed(central, to: characteristic)
| `- warning: implicit capture of 'central' requires that 'CBMCentralMock' conforms to 'Sendable'; this is an error in the Swift 6 language mode
380 | }) else {
381 | return
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMCentral.swift:90:14: note: class 'CBMCentralMock' does not conform to the 'Sendable' protocol
88 | /// Each mock central is based on a ``CBMCentralSpec`` which is used to simulate the
89 | /// central's behavior.
90 | public class CBMCentralMock: CBMCentral {
| `- note: class 'CBMCentralMock' does not conform to the 'Sendable' protocol
91 | /// The specification of the simulated central.
92 | internal let spec: CBMCentralSpec
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:379:87: warning: implicit capture of 'characteristic' requires that 'CBMMutableCharacteristic' conforms to 'Sendable'; this is an error in the Swift 6 language mode
377 | guard let self = self, self.state == .poweredOn, spec.isConnected,
378 | self.mutex.sync(execute: {
379 | self.owns(characteristic) && self.isSubscribed(central, to: characteristic)
| `- warning: implicit capture of 'characteristic' requires that 'CBMMutableCharacteristic' conforms to 'Sendable'; this is an error in the Swift 6 language mode
380 | }) else {
381 | return
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:89:12: note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
87 | /// characteristic must be read-only. Read requests for such characteristics are handled
88 | /// automatically without calling the peripheral manager's delegate.
89 | open class CBMMutableCharacteristic: CBMCharacteristic {
| `- note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
90 |
91 | /// The permissions of the characteristic value.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:415:27: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
413 | NSLog("[CoreBluetoothMock] L2CAP channels are not implemented in the mock. Publishing a channel failed.")
414 | queue.async { [weak self] in
415 | if let self = self, self.state == .poweredOn {
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
416 | self.delegate?.peripheralManager(self,
417 | didPublishL2CAPChannel: 0,
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:429:27: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
427 | NSLog("[CoreBluetoothMock] L2CAP channels are not implemented in the mock. Unpublishing channel with PSM \(PSM) failed.")
428 | queue.async { [weak self] in
429 | if let self = self, self.state == .poweredOn {
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
430 | self.delegate?.peripheralManager(self,
431 | didUnpublishL2CAPChannel: PSM,
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:449:20: warning: capture of 'manager' with non-sendable type 'CBMPeripheralManagerMock' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
447 | self.existingManagers.forEach { manager in
448 | manager.queue.async {
449 | if manager.state != .poweredOn {
| `- warning: capture of 'manager' with non-sendable type 'CBMPeripheralManagerMock' in a '@Sendable' closure
450 | // ...stop advertising and remove all services if state changed
451 | // to any other state than `.poweredOn`.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:510:30: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
508 | didSubscribeTo characteristic: CBMMutableCharacteristic) {
509 | queue.asyncAfter(deadline: .now() + spec.connectionInterval) { [weak self] in
510 | guard let self = self, self.state == .poweredOn, spec.isConnected else {
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
511 | NSLog("Warning: Central \(spec.identifier) is not connected")
512 | return
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:510:62: warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
508 | didSubscribeTo characteristic: CBMMutableCharacteristic) {
509 | queue.asyncAfter(deadline: .now() + spec.connectionInterval) { [weak self] in
510 | guard let self = self, self.state == .poweredOn, spec.isConnected else {
| `- warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
511 | NSLog("Warning: Central \(spec.identifier) is not connected")
512 | return
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CentralPeer/CBMCentralSpec.swift:46:14: note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
44 | /// Notifications and indications sent by the peripheral manager are delivered
45 | /// to the ``CBMCentralSpec/delegate``.
46 | public class CBMCentralSpec {
| `- note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
47 | /// The central identifier.
48 | public let identifier: UUID
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:515:33: warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in a '@Sendable' closure
513 | }
514 | let subscribedCentral: CBMCentralMock? = self.mutex.sync {
515 | guard self.owns(characteristic) else {
| `- warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in a '@Sendable' closure
516 | return nil
517 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:89:12: note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
87 | /// characteristic must be read-only. Read requests for such characteristics are handled
88 | /// automatically without calling the peripheral manager's delegate.
89 | open class CBMMutableCharacteristic: CBMCharacteristic {
| `- note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
90 |
91 | /// The permissions of the characteristic value.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:515:33: warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in an isolated closure; this is an error in the Swift 6 language mode
513 | }
514 | let subscribedCentral: CBMCentralMock? = self.mutex.sync {
515 | guard self.owns(characteristic) else {
| `- warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in an isolated closure; this is an error in the Swift 6 language mode
516 | return nil
517 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:89:12: note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
87 | /// characteristic must be read-only. Read requests for such characteristics are handled
88 | /// automatically without calling the peripheral manager's delegate.
89 | open class CBMMutableCharacteristic: CBMCharacteristic {
| `- note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
90 |
91 | /// The permissions of the characteristic value.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:518:49: warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in an isolated closure; this is an error in the Swift 6 language mode
516 | return nil
517 | }
518 | let central = self.central(for: spec)
| `- warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in an isolated closure; this is an error in the Swift 6 language mode
519 | guard !self.isSubscribed(central, to: characteristic) else {
520 | return nil
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CentralPeer/CBMCentralSpec.swift:46:14: note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
44 | /// Notifications and indications sent by the peripheral manager are delivered
45 | /// to the ``CBMCentralSpec/delegate``.
46 | public class CBMCentralSpec {
| `- note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
47 | /// The central identifier.
48 | public let identifier: UUID
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:537:30: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
535 | didUnsubscribeFrom characteristic: CBMMutableCharacteristic) {
536 | queue.asyncAfter(deadline: .now() + spec.connectionInterval) { [weak self] in
537 | guard let self = self, self.state == .poweredOn, spec.isConnected else {
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
538 | NSLog("Warning: Central \(spec.identifier) is not connected")
539 | return
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:537:62: warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
535 | didUnsubscribeFrom characteristic: CBMMutableCharacteristic) {
536 | queue.asyncAfter(deadline: .now() + spec.connectionInterval) { [weak self] in
537 | guard let self = self, self.state == .poweredOn, spec.isConnected else {
| `- warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
538 | NSLog("Warning: Central \(spec.identifier) is not connected")
539 | return
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CentralPeer/CBMCentralSpec.swift:46:14: note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
44 | /// Notifications and indications sent by the peripheral manager are delivered
45 | /// to the ``CBMCentralSpec/delegate``.
46 | public class CBMCentralSpec {
| `- note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
47 | /// The central identifier.
48 | public let identifier: UUID
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:542:33: warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in a '@Sendable' closure
540 | }
541 | let unsubscribedCentral: CBMCentralMock? = self.mutex.sync {
542 | guard self.owns(characteristic),
| `- warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in a '@Sendable' closure
543 | let central = self.centrals[spec.identifier],
544 | self.isSubscribed(central, to: characteristic) else {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:89:12: note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
87 | /// characteristic must be read-only. Read requests for such characteristics are handled
88 | /// automatically without calling the peripheral manager's delegate.
89 | open class CBMMutableCharacteristic: CBMCharacteristic {
| `- note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
90 |
91 | /// The permissions of the characteristic value.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:542:33: warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in an isolated closure; this is an error in the Swift 6 language mode
540 | }
541 | let unsubscribedCentral: CBMCentralMock? = self.mutex.sync {
542 | guard self.owns(characteristic),
| `- warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in an isolated closure; this is an error in the Swift 6 language mode
543 | let central = self.centrals[spec.identifier],
544 | self.isSubscribed(central, to: characteristic) else {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:89:12: note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
87 | /// characteristic must be read-only. Read requests for such characteristics are handled
88 | /// automatically without calling the peripheral manager's delegate.
89 | open class CBMMutableCharacteristic: CBMCharacteristic {
| `- note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
90 |
91 | /// The permissions of the characteristic value.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:543:51: warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in an isolated closure; this is an error in the Swift 6 language mode
541 | let unsubscribedCentral: CBMCentralMock? = self.mutex.sync {
542 | guard self.owns(characteristic),
543 | let central = self.centrals[spec.identifier],
| `- warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in an isolated closure; this is an error in the Swift 6 language mode
544 | self.isSubscribed(central, to: characteristic) else {
545 | return nil
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CentralPeer/CBMCentralSpec.swift:46:14: note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
44 | /// Notifications and indications sent by the peripheral manager are delivered
45 | /// to the ``CBMCentralSpec/delegate``.
46 | public class CBMCentralSpec {
| `- note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
47 | /// The central identifier.
48 | public let identifier: UUID
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:565:17: warning: capture of 'completion' with non-sendable type '(Result<Data, any Error>) -> Void' in a '@Sendable' closure
563 | let reply: (Result<Data, Error>) -> Void = { result in
564 | queue.asyncAfter(deadline: .now() + interval) {
565 | completion(result)
| |- warning: capture of 'completion' with non-sendable type '(Result<Data, any Error>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
566 | }
567 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:602:30: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
600 | }
601 | queue.asyncAfter(deadline: .now() + interval) { [weak self] in
602 | guard let self = self, self.state == .poweredOn, spec.isConnected,
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
603 | self.mutex.sync(execute: { () -> Bool in
604 | guard self.owns(characteristic) else {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:602:62: warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
600 | }
601 | queue.asyncAfter(deadline: .now() + interval) { [weak self] in
602 | guard let self = self, self.state == .poweredOn, spec.isConnected,
| `- warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
603 | self.mutex.sync(execute: { () -> Bool in
604 | guard self.owns(characteristic) else {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CentralPeer/CBMCentralSpec.swift:46:14: note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
44 | /// Notifications and indications sent by the peripheral manager are delivered
45 | /// to the ``CBMCentralSpec/delegate``.
46 | public class CBMCentralSpec {
| `- note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
47 | /// The central identifier.
48 | public let identifier: UUID
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:604:39: warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in a '@Sendable' closure
602 | guard let self = self, self.state == .poweredOn, spec.isConnected,
603 | self.mutex.sync(execute: { () -> Bool in
604 | guard self.owns(characteristic) else {
| `- warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in a '@Sendable' closure
605 | return false
606 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:89:12: note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
87 | /// characteristic must be read-only. Read requests for such characteristics are handled
88 | /// automatically without calling the peripheral manager's delegate.
89 | open class CBMMutableCharacteristic: CBMCharacteristic {
| `- note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
90 |
91 | /// The permissions of the characteristic value.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:607:51: warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in a '@Sendable' closure
605 | return false
606 | }
607 | self.pendingRequests.append(request)
| `- warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in a '@Sendable' closure
608 | return true
609 | }) else {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMATTRequest.swift:117:14: note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
115 | /// Such requests are created when a mock central, defined using ``CBMCentralSpec``,
116 | /// reads or writes a characteristic value.
117 | public class CBMATTRequestMock: CBMATTRequest {
| `- note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
118 | private let _central: CBMCentral
119 | private let _characteristic: CBMCharacteristic
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:610:17: warning: capture of 'reply' with non-sendable type '(Result<Data, any Error>) -> Void' in a '@Sendable' closure
608 | return true
609 | }) else {
610 | reply(.failure(CBMError(.notConnected)))
| |- warning: capture of 'reply' with non-sendable type '(Result<Data, any Error>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
611 | return
612 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:604:39: warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in an isolated closure; this is an error in the Swift 6 language mode
602 | guard let self = self, self.state == .poweredOn, spec.isConnected,
603 | self.mutex.sync(execute: { () -> Bool in
604 | guard self.owns(characteristic) else {
| `- warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in an isolated closure; this is an error in the Swift 6 language mode
605 | return false
606 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:89:12: note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
87 | /// characteristic must be read-only. Read requests for such characteristics are handled
88 | /// automatically without calling the peripheral manager's delegate.
89 | open class CBMMutableCharacteristic: CBMCharacteristic {
| `- note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
90 |
91 | /// The permissions of the characteristic value.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:607:51: warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in an isolated closure; this is an error in the Swift 6 language mode
605 | return false
606 | }
607 | self.pendingRequests.append(request)
| `- warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in an isolated closure; this is an error in the Swift 6 language mode
608 | return true
609 | }) else {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMATTRequest.swift:117:14: note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
115 | /// Such requests are created when a mock central, defined using ``CBMCentralSpec``,
116 | /// reads or writes a characteristic value.
117 | public class CBMATTRequestMock: CBMATTRequest {
| `- note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
118 | private let _central: CBMCentral
119 | private let _characteristic: CBMCharacteristic
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:627:17: warning: capture of 'withResponseCompletion' with non-sendable type '((Result<Void, any Error>) -> Void)?' in a '@Sendable' closure
625 | let reply: (Result<Void, Error>) -> Void = { result in
626 | queue.asyncAfter(deadline: .now() + interval) {
627 | withResponseCompletion?(result)
| |- warning: capture of 'withResponseCompletion' with non-sendable type '((Result<Void, any Error>) -> Void)?' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
628 | }
629 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:671:30: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
669 | } : nil)
670 | queue.asyncAfter(deadline: .now() + interval) { [weak self] in
671 | guard let self = self, self.state == .poweredOn, spec.isConnected,
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
672 | self.mutex.sync(execute: { () -> Bool in
673 | guard self.owns(characteristic) else {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:671:62: warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
669 | } : nil)
670 | queue.asyncAfter(deadline: .now() + interval) { [weak self] in
671 | guard let self = self, self.state == .poweredOn, spec.isConnected,
| `- warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
672 | self.mutex.sync(execute: { () -> Bool in
673 | guard self.owns(characteristic) else {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CentralPeer/CBMCentralSpec.swift:46:14: note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
44 | /// Notifications and indications sent by the peripheral manager are delivered
45 | /// to the ``CBMCentralSpec/delegate``.
46 | public class CBMCentralSpec {
| `- note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
47 | /// The central identifier.
48 | public let identifier: UUID
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:673:39: warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in a '@Sendable' closure
671 | guard let self = self, self.state == .poweredOn, spec.isConnected,
672 | self.mutex.sync(execute: { () -> Bool in
673 | guard self.owns(characteristic) else {
| `- warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in a '@Sendable' closure
674 | return false
675 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:89:12: note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
87 | /// characteristic must be read-only. Read requests for such characteristics are handled
88 | /// automatically without calling the peripheral manager's delegate.
89 | open class CBMMutableCharacteristic: CBMCharacteristic {
| `- note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
90 |
91 | /// The permissions of the characteristic value.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:677:55: warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in a '@Sendable' closure
675 | }
676 | if isWithResponse {
677 | self.pendingRequests.append(request)
| `- warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in a '@Sendable' closure
678 | }
679 | return true
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMATTRequest.swift:117:14: note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
115 | /// Such requests are created when a mock central, defined using ``CBMCentralSpec``,
116 | /// reads or writes a characteristic value.
117 | public class CBMATTRequestMock: CBMATTRequest {
| `- note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
118 | private let _central: CBMCentral
119 | private let _characteristic: CBMCharacteristic
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:682:21: warning: capture of 'reply' with non-sendable type '(Result<Void, any Error>) -> Void' in a '@Sendable' closure
680 | }) else {
681 | if isWithResponse {
682 | reply(.failure(CBMError(.notConnected)))
| |- warning: capture of 'reply' with non-sendable type '(Result<Void, any Error>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
683 | } else {
684 | NSLog("[CoreBluetoothMock] Write command to characteristic \(characteristic.uuid) dropped: not connected")
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:673:39: warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in an isolated closure; this is an error in the Swift 6 language mode
671 | guard let self = self, self.state == .poweredOn, spec.isConnected,
672 | self.mutex.sync(execute: { () -> Bool in
673 | guard self.owns(characteristic) else {
| `- warning: capture of 'characteristic' with non-sendable type 'CBMMutableCharacteristic' in an isolated closure; this is an error in the Swift 6 language mode
674 | return false
675 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:89:12: note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
87 | /// characteristic must be read-only. Read requests for such characteristics are handled
88 | /// automatically without calling the peripheral manager's delegate.
89 | open class CBMMutableCharacteristic: CBMCharacteristic {
| `- note: class 'CBMMutableCharacteristic' does not conform to the 'Sendable' protocol
90 |
91 | /// The permissions of the characteristic value.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:677:55: warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in an isolated closure; this is an error in the Swift 6 language mode
675 | }
676 | if isWithResponse {
677 | self.pendingRequests.append(request)
| `- warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in an isolated closure; this is an error in the Swift 6 language mode
678 | }
679 | return true
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMATTRequest.swift:117:14: note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
115 | /// Such requests are created when a mock central, defined using ``CBMCentralSpec``,
116 | /// reads or writes a characteristic value.
117 | public class CBMATTRequestMock: CBMATTRequest {
| `- note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
118 | private let _central: CBMCentral
119 | private let _characteristic: CBMCharacteristic
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:724:27: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
722 | private func initialize() {
723 | queue.async { [weak self] in
724 | if let self = self {
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
725 | CBMPeripheralManagerMock.mutex.sync {
726 | CBMPeripheralManagerMock.managers.append(WeakRef(self))
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:747:27: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
745 | private func notifyDidAddServiceCallback(_ service: CBMMutableService, error: Error?) {
746 | queue.async { [weak self] in
747 | if let self = self, self.state == .poweredOn {
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
748 | self.delegate?.peripheralManager(self, didAdd: service, error: error)
749 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:748:64: warning: capture of 'service' with non-sendable type 'CBMMutableService' in a '@Sendable' closure
746 | queue.async { [weak self] in
747 | if let self = self, self.state == .poweredOn {
748 | self.delegate?.peripheralManager(self, didAdd: service, error: error)
| `- warning: capture of 'service' with non-sendable type 'CBMMutableService' in a '@Sendable' closure
749 | }
750 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMMutableAttributes.swift:38:12: note: class 'CBMMutableService' does not conform to the 'Sendable' protocol
36 | /// ``CBMPeripheralManager``. The characteristics of a mutable service must be
37 | /// ``CBMMutableCharacteristic`` objects.
38 | open class CBMMutableService: CBMService {
| `- note: class 'CBMMutableService' does not conform to the 'Sendable' protocol
39 |
40 | /// A list of included services.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:756:30: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
754 | private func scheduleTimeout(of request: CBMATTRequestMock, for spec: CBMCentralSpec) {
755 | queue.asyncAfter(deadline: .now() + spec.attributeProtocolTimeout) { [weak self] in
756 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
757 | let isPending: Bool = self.mutex.sync {
758 | guard let index = self.pendingRequests.firstIndex(where: { $0 === request }) else {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:758:83: warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in a '@Sendable' closure
756 | guard let self = self else { return }
757 | let isPending: Bool = self.mutex.sync {
758 | guard let index = self.pendingRequests.firstIndex(where: { $0 === request }) else {
| `- warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in a '@Sendable' closure
759 | return false
760 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMATTRequest.swift:117:14: note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
115 | /// Such requests are created when a mock central, defined using ``CBMCentralSpec``,
116 | /// reads or writes a characteristic value.
117 | public class CBMATTRequestMock: CBMATTRequest {
| `- note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
118 | private let _central: CBMCentral
119 | private let _characteristic: CBMCharacteristic
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:758:83: warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in an isolated closure; this is an error in the Swift 6 language mode
756 | guard let self = self else { return }
757 | let isPending: Bool = self.mutex.sync {
758 | guard let index = self.pendingRequests.firstIndex(where: { $0 === request }) else {
| `- warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in an isolated closure; this is an error in the Swift 6 language mode
759 | return false
760 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMATTRequest.swift:117:14: note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
115 | /// Such requests are created when a mock central, defined using ``CBMCentralSpec``,
116 | /// reads or writes a characteristic value.
117 | public class CBMATTRequestMock: CBMATTRequest {
| `- note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
118 | private let _central: CBMCentral
119 | private let _characteristic: CBMCharacteristic
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:758:83: warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in an isolated closure; this is an error in the Swift 6 language mode
756 | guard let self = self else { return }
757 | let isPending: Bool = self.mutex.sync {
758 | guard let index = self.pendingRequests.firstIndex(where: { $0 === request }) else {
| `- warning: capture of 'request' with non-sendable type 'CBMATTRequestMock' in an isolated closure; this is an error in the Swift 6 language mode
759 | return false
760 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMATTRequest.swift:117:14: note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
115 | /// Such requests are created when a mock central, defined using ``CBMCentralSpec``,
116 | /// reads or writes a characteristic value.
117 | public class CBMATTRequestMock: CBMATTRequest {
| `- note: class 'CBMATTRequestMock' does not conform to the 'Sendable' protocol
118 | private let _central: CBMCentral
119 | private let _characteristic: CBMCharacteristic
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:830:30: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
38 | /// ``CBMCentralManagerMock/simulatePowerOn()``, ``CBMCentralManagerMock/simulatePowerOff()``
39 | /// and other simulation methods.
40 | open class CBMPeripheralManagerMock: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerMock' does not conform to the 'Sendable' protocol
41 | private static var managers: [WeakRef<CBMPeripheralManagerMock>] = []
42 | private static var centrals: [WeakRef<CBMCentralSpec>] = []
:
828 | private func central(didDisconnect spec: CBMCentralSpec) {
829 | queue.async { [weak self] in
830 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerMock?' in a '@Sendable' closure
831 | return
832 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:836:71: warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
834 | let disconnected: (central: CBMCentralMock,
835 | characteristics: [CBMMutableCharacteristic])? = self.mutex.sync {
836 | guard let central = self.centrals.removeValue(forKey: spec.identifier) else {
| `- warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in a '@Sendable' closure
837 | return nil
838 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CentralPeer/CBMCentralSpec.swift:46:14: note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
44 | /// Notifications and indications sent by the peripheral manager are delivered
45 | /// to the ``CBMCentralSpec/delegate``.
46 | public class CBMCentralSpec {
| `- note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
47 | /// The central identifier.
48 | public let identifier: UUID
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:836:71: warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in an isolated closure; this is an error in the Swift 6 language mode
834 | let disconnected: (central: CBMCentralMock,
835 | characteristics: [CBMMutableCharacteristic])? = self.mutex.sync {
836 | guard let central = self.centrals.removeValue(forKey: spec.identifier) else {
| `- warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in an isolated closure; this is an error in the Swift 6 language mode
837 | return nil
838 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CentralPeer/CBMCentralSpec.swift:46:14: note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
44 | /// Notifications and indications sent by the peripheral manager are delivered
45 | /// to the ``CBMCentralSpec/delegate``.
46 | public class CBMCentralSpec {
| `- note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
47 | /// The central identifier.
48 | public let identifier: UUID
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:839:90: warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in an isolated closure; this is an error in the Swift 6 language mode
837 | return nil
838 | }
839 | abortedRequests = self.pendingRequests.filter { $0.central.identifier == spec.identifier }
| `- warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in an isolated closure; this is an error in the Swift 6 language mode
840 | self.pendingRequests.removeAll { $0.central.identifier == spec.identifier }
841 | let characteristics = self.services
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CentralPeer/CBMCentralSpec.swift:46:14: note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
44 | /// Notifications and indications sent by the peripheral manager are delivered
45 | /// to the ``CBMCentralSpec/delegate``.
46 | public class CBMCentralSpec {
| `- note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
47 | /// The central identifier.
48 | public let identifier: UUID
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerMock.swift:840:75: warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in an isolated closure; this is an error in the Swift 6 language mode
838 | }
839 | abortedRequests = self.pendingRequests.filter { $0.central.identifier == spec.identifier }
840 | self.pendingRequests.removeAll { $0.central.identifier == spec.identifier }
| `- warning: capture of 'spec' with non-sendable type 'CBMCentralSpec' in an isolated closure; this is an error in the Swift 6 language mode
841 | let characteristics = self.services
842 | .flatMap { $0.characteristics ?? [] }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CentralPeer/CBMCentralSpec.swift:46:14: note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
44 | /// Notifications and indications sent by the peripheral manager are delivered
45 | /// to the ``CBMCentralSpec/delegate``.
46 | public class CBMCentralSpec {
| `- note: class 'CBMCentralSpec' does not conform to the 'Sendable' protocol
47 | /// The central identifier.
48 | public let identifier: UUID
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Peripheral/CBMPeripheralManagerNative.swift:157:11: warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerNative?' in a '@Sendable' closure
32 | import CoreBluetooth
33 |
34 | public class CBMPeripheralManagerNative: CBMPeripheralManager {
| `- note: class 'CBMPeripheralManagerNative' does not conform to the 'Sendable' protocol
35 | private var observation: NSKeyValueObservation?
36 | @objc dynamic private var manager: CBPeripheralManager!
:
155 | observation = observe(\.manager?.isAdvertising, options: [.new]) { [weak self] _, change in
156 | if let new = change.newValue ?? nil {
157 | self?.isAdvertising = new
| `- warning: capture of 'self' with non-sendable type 'CBMPeripheralManagerNative?' in a '@Sendable' closure
158 | }
159 | }
[15/33] Compiling CoreBluetoothMock Blinky.swift
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:140:23: warning: static property 'serviceUUID' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
138 | /// - seeAlso: ``simulateButtonToggle()``, ``simulateReset()``, ``BlinkyDelegate``
139 | open class Blinky {
140 | public static let serviceUUID = CBMUUID.ledButtonService
| |- warning: static property 'serviceUUID' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'serviceUUID' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
141 |
142 | /// The peripheral specification that defines the behavior of this Blinky peripheral.
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h:85:28: note: class 'CBUUID' does not conform to the 'Sendable' protocol
83 | */
84 | NS_CLASS_AVAILABLE(10_7, 5_0)
85 | CB_EXTERN_CLASS @interface CBUUID : NSObject <NSCopying>
| `- note: class 'CBUUID' does not conform to the 'Sendable' protocol
86 |
87 | /*!
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:337:16: warning: static property 'ledButtonService' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
335 |
336 | private extension CBMUUID {
337 | static let ledButtonService: CBMUUID! = CBMUUID(string: "00001523-1212-EFDE-1523-785FEABCD123")
| |- warning: static property 'ledButtonService' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'ledButtonService' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
338 |
339 | static let buttonCharacteristic: CBMUUID! = CBMUUID(string: "00001524-1212-EFDE-1523-785FEABCD123")
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h:85:28: note: class 'CBUUID' does not conform to the 'Sendable' protocol
83 | */
84 | NS_CLASS_AVAILABLE(10_7, 5_0)
85 | CB_EXTERN_CLASS @interface CBUUID : NSObject <NSCopying>
| `- note: class 'CBUUID' does not conform to the 'Sendable' protocol
86 |
87 | /*!
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:339:16: warning: static property 'buttonCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
337 | static let ledButtonService: CBMUUID! = CBMUUID(string: "00001523-1212-EFDE-1523-785FEABCD123")
338 |
339 | static let buttonCharacteristic: CBMUUID! = CBMUUID(string: "00001524-1212-EFDE-1523-785FEABCD123")
| |- warning: static property 'buttonCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'buttonCharacteristic' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
340 | static let ledCharacteristic: CBMUUID! = CBMUUID(string: "00001525-1212-EFDE-1523-785FEABCD123")
341 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h:85:28: note: class 'CBUUID' does not conform to the 'Sendable' protocol
83 | */
84 | NS_CLASS_AVAILABLE(10_7, 5_0)
85 | CB_EXTERN_CLASS @interface CBUUID : NSObject <NSCopying>
| `- note: class 'CBUUID' does not conform to the 'Sendable' protocol
86 |
87 | /*!
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:340:16: warning: static property 'ledCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
338 |
339 | static let buttonCharacteristic: CBMUUID! = CBMUUID(string: "00001524-1212-EFDE-1523-785FEABCD123")
340 | static let ledCharacteristic: CBMUUID! = CBMUUID(string: "00001525-1212-EFDE-1523-785FEABCD123")
| |- warning: static property 'ledCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'ledCharacteristic' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
341 | }
342 |
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h:85:28: note: class 'CBUUID' does not conform to the 'Sendable' protocol
83 | */
84 | NS_CLASS_AVAILABLE(10_7, 5_0)
85 | CB_EXTERN_CLASS @interface CBUUID : NSObject <NSCopying>
| `- note: class 'CBUUID' does not conform to the 'Sendable' protocol
86 |
87 | /*!
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:345:16: warning: static property 'blinkyService' is not concurrency-safe because non-'Sendable' type 'CBMServiceMock' may have shared mutable state; this is an error in the Swift 6 language mode
343 | private extension CBMServiceMock {
344 |
345 | static let blinkyService = CBMServiceMock(
| |- warning: static property 'blinkyService' is not concurrency-safe because non-'Sendable' type 'CBMServiceMock' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'blinkyService' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
346 | type: .ledButtonService,
347 | primary: true,
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:184:12: note: class 'CBMServiceMock' does not conform to the 'Sendable' protocol
182 |
183 | /// Mock implementation of ``CBMService``.
184 | open class CBMServiceMock: CBMService {
| `- note: class 'CBMServiceMock' does not conform to the 'Sendable' protocol
185 |
186 | /// Returns a service, initialized with a service type and UUID.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:355:16: warning: static property 'buttonCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicMock' may have shared mutable state; this is an error in the Swift 6 language mode
353 | private extension CBMCharacteristicMock {
354 |
355 | static let buttonCharacteristic = CBMCharacteristicMock(
| |- warning: static property 'buttonCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicMock' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'buttonCharacteristic' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
356 | type: .buttonCharacteristic,
357 | properties: [.notify, .read],
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:339:12: note: class 'CBMCharacteristicMock' does not conform to the 'Sendable' protocol
337 |
338 | /// Mock implementation of ``CBMCharacteristic``.
339 | open class CBMCharacteristicMock: CBMCharacteristic {
| `- note: class 'CBMCharacteristicMock' does not conform to the 'Sendable' protocol
340 |
341 | open override var descriptors: [CBMDescriptor]? {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:361:16: warning: static property 'ledCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicMock' may have shared mutable state; this is an error in the Swift 6 language mode
359 | )
360 |
361 | static let ledCharacteristic = CBMCharacteristicMock(
| |- warning: static property 'ledCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicMock' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'ledCharacteristic' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
362 | type: .ledCharacteristic,
363 | properties: [.write, .read]
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:339:12: note: class 'CBMCharacteristicMock' does not conform to the 'Sendable' protocol
337 |
338 | /// Mock implementation of ``CBMCharacteristic``.
339 | open class CBMCharacteristicMock: CBMCharacteristic {
| `- note: class 'CBMCharacteristicMock' does not conform to the 'Sendable' protocol
340 |
341 | open override var descriptors: [CBMDescriptor]? {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/UART.swift:116:16: warning: static property 'uart' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
114 |
115 | private extension CBMUUID {
116 | static let uart: CBMUUID! = CBMUUID(string: "6E400001-B5A3-F393-E0A9-E50E24DCCA9E")
| |- warning: static property 'uart' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'uart' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
117 | static let uartRx: CBMUUID! = CBMUUID(string: "6E400002-B5A3-F393-E0A9-E50E24DCCA9E")
118 | static let uartTx: CBMUUID! = CBMUUID(string: "6E400003-B5A3-F393-E0A9-E50E24DCCA9E")
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h:85:28: note: class 'CBUUID' does not conform to the 'Sendable' protocol
83 | */
84 | NS_CLASS_AVAILABLE(10_7, 5_0)
85 | CB_EXTERN_CLASS @interface CBUUID : NSObject <NSCopying>
| `- note: class 'CBUUID' does not conform to the 'Sendable' protocol
86 |
87 | /*!
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/UART.swift:117:16: warning: static property 'uartRx' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
115 | private extension CBMUUID {
116 | static let uart: CBMUUID! = CBMUUID(string: "6E400001-B5A3-F393-E0A9-E50E24DCCA9E")
117 | static let uartRx: CBMUUID! = CBMUUID(string: "6E400002-B5A3-F393-E0A9-E50E24DCCA9E")
| |- warning: static property 'uartRx' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'uartRx' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
118 | static let uartTx: CBMUUID! = CBMUUID(string: "6E400003-B5A3-F393-E0A9-E50E24DCCA9E")
119 |
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h:85:28: note: class 'CBUUID' does not conform to the 'Sendable' protocol
83 | */
84 | NS_CLASS_AVAILABLE(10_7, 5_0)
85 | CB_EXTERN_CLASS @interface CBUUID : NSObject <NSCopying>
| `- note: class 'CBUUID' does not conform to the 'Sendable' protocol
86 |
87 | /*!
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/UART.swift:118:16: warning: static property 'uartTx' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
116 | static let uart: CBMUUID! = CBMUUID(string: "6E400001-B5A3-F393-E0A9-E50E24DCCA9E")
117 | static let uartRx: CBMUUID! = CBMUUID(string: "6E400002-B5A3-F393-E0A9-E50E24DCCA9E")
118 | static let uartTx: CBMUUID! = CBMUUID(string: "6E400003-B5A3-F393-E0A9-E50E24DCCA9E")
| |- warning: static property 'uartTx' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'uartTx' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
119 |
120 | static let cccd = CBMUUID(string: "2902")
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h:85:28: note: class 'CBUUID' does not conform to the 'Sendable' protocol
83 | */
84 | NS_CLASS_AVAILABLE(10_7, 5_0)
85 | CB_EXTERN_CLASS @interface CBUUID : NSObject <NSCopying>
| `- note: class 'CBUUID' does not conform to the 'Sendable' protocol
86 |
87 | /*!
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/UART.swift:120:16: warning: static property 'cccd' is not concurrency-safe because non-'Sendable' type 'CBMUUID' (aka 'CBUUID') may have shared mutable state; this is an error in the Swift 6 language mode
118 | static let uartTx: CBMUUID! = CBMUUID(string: "6E400003-B5A3-F393-E0A9-E50E24DCCA9E")
119 |
120 | static let cccd = CBMUUID(string: "2902")
| |- warning: static property 'cccd' is not concurrency-safe because non-'Sendable' type 'CBMUUID' (aka 'CBUUID') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'cccd' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
121 | }
122 |
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h:85:28: note: class 'CBUUID' does not conform to the 'Sendable' protocol
83 | */
84 | NS_CLASS_AVAILABLE(10_7, 5_0)
85 | CB_EXTERN_CLASS @interface CBUUID : NSObject <NSCopying>
| `- note: class 'CBUUID' does not conform to the 'Sendable' protocol
86 |
87 | /*!
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/UART.swift:124:16: warning: static property 'cccd' is not concurrency-safe because non-'Sendable' type 'CBMDescriptorMock' may have shared mutable state; this is an error in the Swift 6 language mode
122 |
123 | private extension CBMDescriptorMock {
124 | static let cccd = CBMDescriptorMock(type: .cccd)
| |- warning: static property 'cccd' is not concurrency-safe because non-'Sendable' type 'CBMDescriptorMock' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'cccd' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
125 | }
126 |
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:448:12: note: class 'CBMDescriptorMock' does not conform to the 'Sendable' protocol
446 |
447 | /// Mock implementation of ``CBMDescriptor``.
448 | open class CBMDescriptorMock: CBMDescriptor {
| `- note: class 'CBMDescriptorMock' does not conform to the 'Sendable' protocol
449 |
450 | public override init(type uuid: CBMUUID) {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/UART.swift:129:16: warning: static property 'uartTx' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicMock' may have shared mutable state; this is an error in the Swift 6 language mode
127 | private extension CBMCharacteristicMock {
128 |
129 | static let uartTx = CBMCharacteristicMock(
| |- warning: static property 'uartTx' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicMock' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'uartTx' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
130 | type: .uartTx, properties: .notify, descriptors: .cccd
131 | )
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:339:12: note: class 'CBMCharacteristicMock' does not conform to the 'Sendable' protocol
337 |
338 | /// Mock implementation of ``CBMCharacteristic``.
339 | open class CBMCharacteristicMock: CBMCharacteristic {
| `- note: class 'CBMCharacteristicMock' does not conform to the 'Sendable' protocol
340 |
341 | open override var descriptors: [CBMDescriptor]? {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/UART.swift:133:16: warning: static property 'uartRx' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicMock' may have shared mutable state; this is an error in the Swift 6 language mode
131 | )
132 |
133 | static let uartRx = CBMCharacteristicMock(
| |- warning: static property 'uartRx' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicMock' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'uartRx' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
134 | type: .uartRx, properties: [.write],
135 | )
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:339:12: note: class 'CBMCharacteristicMock' does not conform to the 'Sendable' protocol
337 |
338 | /// Mock implementation of ``CBMCharacteristic``.
339 | open class CBMCharacteristicMock: CBMCharacteristic {
| `- note: class 'CBMCharacteristicMock' does not conform to the 'Sendable' protocol
340 |
341 | open override var descriptors: [CBMDescriptor]? {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/UART.swift:140:16: warning: static property 'uart' is not concurrency-safe because non-'Sendable' type 'CBMServiceMock' may have shared mutable state; this is an error in the Swift 6 language mode
138 | private extension CBMServiceMock {
139 |
140 | static let uart = CBMServiceMock(
| |- warning: static property 'uart' is not concurrency-safe because non-'Sendable' type 'CBMServiceMock' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'uart' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
141 | type: .uart, primary: true,
142 | characteristics: .uartRx, .uartTx,
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:184:12: note: class 'CBMServiceMock' does not conform to the 'Sendable' protocol
182 |
183 | /// Mock implementation of ``CBMService``.
184 | open class CBMServiceMock: CBMService {
| `- note: class 'CBMServiceMock' does not conform to the 'Sendable' protocol
185 |
186 | /// Returns a service, initialized with a service type and UUID.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:84:23: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
82 | open func blinky(_ blinky: Blinky, didChangeButtonSubscriptionState isSubscribed: Bool) {
83 | DispatchQueue.main.async { [weak self] in
84 | guard let self else { return }
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
85 | if isSubscribed {
86 | self.startTimer(for: blinky)
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:86:38: warning: sending 'blinky' risks causing data races; this is an error in the Swift 6 language mode
84 | guard let self else { return }
85 | if isSubscribed {
86 | self.startTimer(for: blinky)
| |- warning: sending 'blinky' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'blinky' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | } else {
88 | self.stopTimer()
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:106:27: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
104 | // Schedule release after pressDuration.
105 | DispatchQueue.main.asyncAfter(deadline: .now() + self.pressedDuration) { [weak self, weak blinky] in
106 | guard let self, let blinky, self.timer != nil else { return }
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
107 | blinky.simulateButtonToggle()
108 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:106:37: warning: sending 'blinky' risks causing data races; this is an error in the Swift 6 language mode
104 | // Schedule release after pressDuration.
105 | DispatchQueue.main.asyncAfter(deadline: .now() + self.pressedDuration) { [weak self, weak blinky] in
106 | guard let self, let blinky, self.timer != nil else { return }
| |- warning: sending 'blinky' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'blinky' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
107 | blinky.simulateButtonToggle()
108 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:228:23: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
226 | fileprivate func blinkyImpl(didChangeLedState isOn: Bool) {
227 | DispatchQueue.main.async { [weak self] in
228 | guard let self else { return }
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
229 | delegate?.blinky(self, didChangeLedState: isOn)
230 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:235:23: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
233 | fileprivate func blinkyImpl(didChangeButtonSubscriptionState isSubscribed: Bool) {
234 | DispatchQueue.main.async { [weak self] in
235 | guard let self else { return }
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
236 | delegate?.blinky(self, didChangeButtonSubscriptionState: isSubscribed)
237 | }
[16/33] Compiling CoreBluetoothMock UART.swift
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:140:23: warning: static property 'serviceUUID' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
138 | /// - seeAlso: ``simulateButtonToggle()``, ``simulateReset()``, ``BlinkyDelegate``
139 | open class Blinky {
140 | public static let serviceUUID = CBMUUID.ledButtonService
| |- warning: static property 'serviceUUID' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'serviceUUID' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
141 |
142 | /// The peripheral specification that defines the behavior of this Blinky peripheral.
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h:85:28: note: class 'CBUUID' does not conform to the 'Sendable' protocol
83 | */
84 | NS_CLASS_AVAILABLE(10_7, 5_0)
85 | CB_EXTERN_CLASS @interface CBUUID : NSObject <NSCopying>
| `- note: class 'CBUUID' does not conform to the 'Sendable' protocol
86 |
87 | /*!
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:337:16: warning: static property 'ledButtonService' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
335 |
336 | private extension CBMUUID {
337 | static let ledButtonService: CBMUUID! = CBMUUID(string: "00001523-1212-EFDE-1523-785FEABCD123")
| |- warning: static property 'ledButtonService' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'ledButtonService' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
338 |
339 | static let buttonCharacteristic: CBMUUID! = CBMUUID(string: "00001524-1212-EFDE-1523-785FEABCD123")
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h:85:28: note: class 'CBUUID' does not conform to the 'Sendable' protocol
83 | */
84 | NS_CLASS_AVAILABLE(10_7, 5_0)
85 | CB_EXTERN_CLASS @interface CBUUID : NSObject <NSCopying>
| `- note: class 'CBUUID' does not conform to the 'Sendable' protocol
86 |
87 | /*!
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:339:16: warning: static property 'buttonCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
337 | static let ledButtonService: CBMUUID! = CBMUUID(string: "00001523-1212-EFDE-1523-785FEABCD123")
338 |
339 | static let buttonCharacteristic: CBMUUID! = CBMUUID(string: "00001524-1212-EFDE-1523-785FEABCD123")
| |- warning: static property 'buttonCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'buttonCharacteristic' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
340 | static let ledCharacteristic: CBMUUID! = CBMUUID(string: "00001525-1212-EFDE-1523-785FEABCD123")
341 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h:85:28: note: class 'CBUUID' does not conform to the 'Sendable' protocol
83 | */
84 | NS_CLASS_AVAILABLE(10_7, 5_0)
85 | CB_EXTERN_CLASS @interface CBUUID : NSObject <NSCopying>
| `- note: class 'CBUUID' does not conform to the 'Sendable' protocol
86 |
87 | /*!
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:340:16: warning: static property 'ledCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
338 |
339 | static let buttonCharacteristic: CBMUUID! = CBMUUID(string: "00001524-1212-EFDE-1523-785FEABCD123")
340 | static let ledCharacteristic: CBMUUID! = CBMUUID(string: "00001525-1212-EFDE-1523-785FEABCD123")
| |- warning: static property 'ledCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'ledCharacteristic' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
341 | }
342 |
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h:85:28: note: class 'CBUUID' does not conform to the 'Sendable' protocol
83 | */
84 | NS_CLASS_AVAILABLE(10_7, 5_0)
85 | CB_EXTERN_CLASS @interface CBUUID : NSObject <NSCopying>
| `- note: class 'CBUUID' does not conform to the 'Sendable' protocol
86 |
87 | /*!
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:345:16: warning: static property 'blinkyService' is not concurrency-safe because non-'Sendable' type 'CBMServiceMock' may have shared mutable state; this is an error in the Swift 6 language mode
343 | private extension CBMServiceMock {
344 |
345 | static let blinkyService = CBMServiceMock(
| |- warning: static property 'blinkyService' is not concurrency-safe because non-'Sendable' type 'CBMServiceMock' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'blinkyService' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
346 | type: .ledButtonService,
347 | primary: true,
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:184:12: note: class 'CBMServiceMock' does not conform to the 'Sendable' protocol
182 |
183 | /// Mock implementation of ``CBMService``.
184 | open class CBMServiceMock: CBMService {
| `- note: class 'CBMServiceMock' does not conform to the 'Sendable' protocol
185 |
186 | /// Returns a service, initialized with a service type and UUID.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:355:16: warning: static property 'buttonCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicMock' may have shared mutable state; this is an error in the Swift 6 language mode
353 | private extension CBMCharacteristicMock {
354 |
355 | static let buttonCharacteristic = CBMCharacteristicMock(
| |- warning: static property 'buttonCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicMock' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'buttonCharacteristic' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
356 | type: .buttonCharacteristic,
357 | properties: [.notify, .read],
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:339:12: note: class 'CBMCharacteristicMock' does not conform to the 'Sendable' protocol
337 |
338 | /// Mock implementation of ``CBMCharacteristic``.
339 | open class CBMCharacteristicMock: CBMCharacteristic {
| `- note: class 'CBMCharacteristicMock' does not conform to the 'Sendable' protocol
340 |
341 | open override var descriptors: [CBMDescriptor]? {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:361:16: warning: static property 'ledCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicMock' may have shared mutable state; this is an error in the Swift 6 language mode
359 | )
360 |
361 | static let ledCharacteristic = CBMCharacteristicMock(
| |- warning: static property 'ledCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicMock' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'ledCharacteristic' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
362 | type: .ledCharacteristic,
363 | properties: [.write, .read]
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:339:12: note: class 'CBMCharacteristicMock' does not conform to the 'Sendable' protocol
337 |
338 | /// Mock implementation of ``CBMCharacteristic``.
339 | open class CBMCharacteristicMock: CBMCharacteristic {
| `- note: class 'CBMCharacteristicMock' does not conform to the 'Sendable' protocol
340 |
341 | open override var descriptors: [CBMDescriptor]? {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/UART.swift:116:16: warning: static property 'uart' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
114 |
115 | private extension CBMUUID {
116 | static let uart: CBMUUID! = CBMUUID(string: "6E400001-B5A3-F393-E0A9-E50E24DCCA9E")
| |- warning: static property 'uart' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'uart' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
117 | static let uartRx: CBMUUID! = CBMUUID(string: "6E400002-B5A3-F393-E0A9-E50E24DCCA9E")
118 | static let uartTx: CBMUUID! = CBMUUID(string: "6E400003-B5A3-F393-E0A9-E50E24DCCA9E")
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h:85:28: note: class 'CBUUID' does not conform to the 'Sendable' protocol
83 | */
84 | NS_CLASS_AVAILABLE(10_7, 5_0)
85 | CB_EXTERN_CLASS @interface CBUUID : NSObject <NSCopying>
| `- note: class 'CBUUID' does not conform to the 'Sendable' protocol
86 |
87 | /*!
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/UART.swift:117:16: warning: static property 'uartRx' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
115 | private extension CBMUUID {
116 | static let uart: CBMUUID! = CBMUUID(string: "6E400001-B5A3-F393-E0A9-E50E24DCCA9E")
117 | static let uartRx: CBMUUID! = CBMUUID(string: "6E400002-B5A3-F393-E0A9-E50E24DCCA9E")
| |- warning: static property 'uartRx' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'uartRx' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
118 | static let uartTx: CBMUUID! = CBMUUID(string: "6E400003-B5A3-F393-E0A9-E50E24DCCA9E")
119 |
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h:85:28: note: class 'CBUUID' does not conform to the 'Sendable' protocol
83 | */
84 | NS_CLASS_AVAILABLE(10_7, 5_0)
85 | CB_EXTERN_CLASS @interface CBUUID : NSObject <NSCopying>
| `- note: class 'CBUUID' does not conform to the 'Sendable' protocol
86 |
87 | /*!
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/UART.swift:118:16: warning: static property 'uartTx' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
116 | static let uart: CBMUUID! = CBMUUID(string: "6E400001-B5A3-F393-E0A9-E50E24DCCA9E")
117 | static let uartRx: CBMUUID! = CBMUUID(string: "6E400002-B5A3-F393-E0A9-E50E24DCCA9E")
118 | static let uartTx: CBMUUID! = CBMUUID(string: "6E400003-B5A3-F393-E0A9-E50E24DCCA9E")
| |- warning: static property 'uartTx' is not concurrency-safe because non-'Sendable' type 'CBMUUID?' (aka 'Optional<CBUUID>') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'uartTx' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
119 |
120 | static let cccd = CBMUUID(string: "2902")
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h:85:28: note: class 'CBUUID' does not conform to the 'Sendable' protocol
83 | */
84 | NS_CLASS_AVAILABLE(10_7, 5_0)
85 | CB_EXTERN_CLASS @interface CBUUID : NSObject <NSCopying>
| `- note: class 'CBUUID' does not conform to the 'Sendable' protocol
86 |
87 | /*!
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/UART.swift:120:16: warning: static property 'cccd' is not concurrency-safe because non-'Sendable' type 'CBMUUID' (aka 'CBUUID') may have shared mutable state; this is an error in the Swift 6 language mode
118 | static let uartTx: CBMUUID! = CBMUUID(string: "6E400003-B5A3-F393-E0A9-E50E24DCCA9E")
119 |
120 | static let cccd = CBMUUID(string: "2902")
| |- warning: static property 'cccd' is not concurrency-safe because non-'Sendable' type 'CBMUUID' (aka 'CBUUID') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'cccd' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
121 | }
122 |
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h:85:28: note: class 'CBUUID' does not conform to the 'Sendable' protocol
83 | */
84 | NS_CLASS_AVAILABLE(10_7, 5_0)
85 | CB_EXTERN_CLASS @interface CBUUID : NSObject <NSCopying>
| `- note: class 'CBUUID' does not conform to the 'Sendable' protocol
86 |
87 | /*!
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/UART.swift:124:16: warning: static property 'cccd' is not concurrency-safe because non-'Sendable' type 'CBMDescriptorMock' may have shared mutable state; this is an error in the Swift 6 language mode
122 |
123 | private extension CBMDescriptorMock {
124 | static let cccd = CBMDescriptorMock(type: .cccd)
| |- warning: static property 'cccd' is not concurrency-safe because non-'Sendable' type 'CBMDescriptorMock' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'cccd' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
125 | }
126 |
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:448:12: note: class 'CBMDescriptorMock' does not conform to the 'Sendable' protocol
446 |
447 | /// Mock implementation of ``CBMDescriptor``.
448 | open class CBMDescriptorMock: CBMDescriptor {
| `- note: class 'CBMDescriptorMock' does not conform to the 'Sendable' protocol
449 |
450 | public override init(type uuid: CBMUUID) {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/UART.swift:129:16: warning: static property 'uartTx' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicMock' may have shared mutable state; this is an error in the Swift 6 language mode
127 | private extension CBMCharacteristicMock {
128 |
129 | static let uartTx = CBMCharacteristicMock(
| |- warning: static property 'uartTx' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicMock' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'uartTx' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
130 | type: .uartTx, properties: .notify, descriptors: .cccd
131 | )
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:339:12: note: class 'CBMCharacteristicMock' does not conform to the 'Sendable' protocol
337 |
338 | /// Mock implementation of ``CBMCharacteristic``.
339 | open class CBMCharacteristicMock: CBMCharacteristic {
| `- note: class 'CBMCharacteristicMock' does not conform to the 'Sendable' protocol
340 |
341 | open override var descriptors: [CBMDescriptor]? {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/UART.swift:133:16: warning: static property 'uartRx' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicMock' may have shared mutable state; this is an error in the Swift 6 language mode
131 | )
132 |
133 | static let uartRx = CBMCharacteristicMock(
| |- warning: static property 'uartRx' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicMock' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'uartRx' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
134 | type: .uartRx, properties: [.write],
135 | )
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:339:12: note: class 'CBMCharacteristicMock' does not conform to the 'Sendable' protocol
337 |
338 | /// Mock implementation of ``CBMCharacteristic``.
339 | open class CBMCharacteristicMock: CBMCharacteristic {
| `- note: class 'CBMCharacteristicMock' does not conform to the 'Sendable' protocol
340 |
341 | open override var descriptors: [CBMDescriptor]? {
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/UART.swift:140:16: warning: static property 'uart' is not concurrency-safe because non-'Sendable' type 'CBMServiceMock' may have shared mutable state; this is an error in the Swift 6 language mode
138 | private extension CBMServiceMock {
139 |
140 | static let uart = CBMServiceMock(
| |- warning: static property 'uart' is not concurrency-safe because non-'Sendable' type 'CBMServiceMock' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'uart' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
141 | type: .uart, primary: true,
142 | characteristics: .uartRx, .uartTx,
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:184:12: note: class 'CBMServiceMock' does not conform to the 'Sendable' protocol
182 |
183 | /// Mock implementation of ``CBMService``.
184 | open class CBMServiceMock: CBMService {
| `- note: class 'CBMServiceMock' does not conform to the 'Sendable' protocol
185 |
186 | /// Returns a service, initialized with a service type and UUID.
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:84:23: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
82 | open func blinky(_ blinky: Blinky, didChangeButtonSubscriptionState isSubscribed: Bool) {
83 | DispatchQueue.main.async { [weak self] in
84 | guard let self else { return }
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
85 | if isSubscribed {
86 | self.startTimer(for: blinky)
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:86:38: warning: sending 'blinky' risks causing data races; this is an error in the Swift 6 language mode
84 | guard let self else { return }
85 | if isSubscribed {
86 | self.startTimer(for: blinky)
| |- warning: sending 'blinky' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'blinky' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | } else {
88 | self.stopTimer()
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:106:27: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
104 | // Schedule release after pressDuration.
105 | DispatchQueue.main.asyncAfter(deadline: .now() + self.pressedDuration) { [weak self, weak blinky] in
106 | guard let self, let blinky, self.timer != nil else { return }
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
107 | blinky.simulateButtonToggle()
108 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:106:37: warning: sending 'blinky' risks causing data races; this is an error in the Swift 6 language mode
104 | // Schedule release after pressDuration.
105 | DispatchQueue.main.asyncAfter(deadline: .now() + self.pressedDuration) { [weak self, weak blinky] in
106 | guard let self, let blinky, self.timer != nil else { return }
| |- warning: sending 'blinky' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'blinky' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
107 | blinky.simulateButtonToggle()
108 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:228:23: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
226 | fileprivate func blinkyImpl(didChangeLedState isOn: Bool) {
227 | DispatchQueue.main.async { [weak self] in
228 | guard let self else { return }
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
229 | delegate?.blinky(self, didChangeLedState: isOn)
230 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Specs/Blinky.swift:235:23: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
233 | fileprivate func blinkyImpl(didChangeButtonSubscriptionState isSubscribed: Bool) {
234 | DispatchQueue.main.async { [weak self] in
235 | guard let self else { return }
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
236 | delegate?.blinky(self, didChangeButtonSubscriptionState: isSubscribed)
237 | }
[17/33] Compiling CoreBluetoothMock CBMCentral.swift
[18/33] Compiling CoreBluetoothMock CBMPeripheralManager.swift
[19/33] Compiling CoreBluetoothMock CBMPeripheralManagerDelegate.swift
[20/33] Compiling CoreBluetoothMock CBMCentralManagerNative.swift
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Central/CBMCentralManagerNative.swift:366:46: warning: capture of 'self' with non-sendable type 'CBMCentralManagerNative' in a '@Sendable' closure
35 | ///
36 | /// This manager can only interact with physical Bluetooth LE devices.
37 | public class CBMCentralManagerNative: CBMCentralManager {
| `- note: class 'CBMCentralManagerNative' does not conform to the 'Sendable' protocol
38 | var observation: NSKeyValueObservation?
39 | @objc dynamic private var manager: CBCentralManager!
:
364 | private func addManagerObserver() {
365 | observation = observe(\.manager?.isScanning, options: [.old, .new]) { _, change in
366 | change.newValue?.flatMap { [weak self] new in
| `- warning: capture of 'self' with non-sendable type 'CBMCentralManagerNative' in a '@Sendable' closure
367 | self?.isScanning = new
368 | }
[21/33] Compiling CoreBluetoothMock CBMPeripheralDelegate.swift
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Central/CBMCentralManagerNative.swift:366:46: warning: capture of 'self' with non-sendable type 'CBMCentralManagerNative' in a '@Sendable' closure
35 | ///
36 | /// This manager can only interact with physical Bluetooth LE devices.
37 | public class CBMCentralManagerNative: CBMCentralManager {
| `- note: class 'CBMCentralManagerNative' does not conform to the 'Sendable' protocol
38 | var observation: NSKeyValueObservation?
39 | @objc dynamic private var manager: CBCentralManager!
:
364 | private func addManagerObserver() {
365 | observation = observe(\.manager?.isScanning, options: [.old, .new]) { _, change in
366 | change.newValue?.flatMap { [weak self] new in
| `- warning: capture of 'self' with non-sendable type 'CBMCentralManagerNative' in a '@Sendable' closure
367 | self?.isScanning = new
368 | }
[22/33] Compiling CoreBluetoothMock CBMPeripheralDelegateProxy.swift
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/Central/CBMCentralManagerNative.swift:366:46: warning: capture of 'self' with non-sendable type 'CBMCentralManagerNative' in a '@Sendable' closure
35 | ///
36 | /// This manager can only interact with physical Bluetooth LE devices.
37 | public class CBMCentralManagerNative: CBMCentralManager {
| `- note: class 'CBMCentralManagerNative' does not conform to the 'Sendable' protocol
38 | var observation: NSKeyValueObservation?
39 | @objc dynamic private var manager: CBCentralManager!
:
364 | private func addManagerObserver() {
365 | observation = observe(\.manager?.isScanning, options: [.old, .new]) { _, change in
366 | change.newValue?.flatMap { [weak self] new in
| `- warning: capture of 'self' with non-sendable type 'CBMCentralManagerNative' in a '@Sendable' closure
367 | self?.isScanning = new
368 | }
[23/33] Compiling CoreBluetoothMock CBMCentralSpec.swift
[24/33] Compiling CoreBluetoothMock CBMCentralSpecDelegate.swift
[25/33] Compiling CoreBluetoothMock CBMMutableAttributes.swift
[26/33] Compiling CoreBluetoothMock CBMPeer.swift
[27/33] Compiling CoreBluetoothMock CBMPeripheral.swift
[28/33] Compiling CoreBluetoothMock CBMAttributes.swift
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:513:17: warning: let 'uninitializedPeripheral' is not concurrency-safe because non-'Sendable' type 'CBMPeripheralUninitialized' may have shared mutable state; this is an error in the Swift 6 language mode
511 | // MARK: - Mocking uninitialized objects
512 |
513 | fileprivate let uninitializedPeripheral = CBMPeripheralUninitialized()
| |- warning: let 'uninitializedPeripheral' is not concurrency-safe because non-'Sendable' type 'CBMPeripheralUninitialized' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make let 'uninitializedPeripheral' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
514 | fileprivate let uninitializedService = CBMServiceUninitialized()
515 | fileprivate let uninitializedCharacteristic = CBMCharacteristicUninitialized()
516 |
517 | fileprivate class CBMPeripheralUninitialized: CBMPeripheral, CustomDebugStringConvertible {
| `- note: class 'CBMPeripheralUninitialized' does not conform to the 'Sendable' protocol
518 | let debugDescription: String = "<uninitialized>"
519 |
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:514:17: warning: let 'uninitializedService' is not concurrency-safe because non-'Sendable' type 'CBMServiceUninitialized' may have shared mutable state; this is an error in the Swift 6 language mode
512 |
513 | fileprivate let uninitializedPeripheral = CBMPeripheralUninitialized()
514 | fileprivate let uninitializedService = CBMServiceUninitialized()
| |- warning: let 'uninitializedService' is not concurrency-safe because non-'Sendable' type 'CBMServiceUninitialized' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make let 'uninitializedService' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
515 | fileprivate let uninitializedCharacteristic = CBMCharacteristicUninitialized()
516 |
:
586 | }
587 |
588 | fileprivate class CBMServiceUninitialized: CBMService {
| `- note: class 'CBMServiceUninitialized' does not conform to the 'Sendable' protocol
589 | override var debugDescription: String { return "<uninitialized>" }
590 | override var uuid: CBMUUID { uninitialized() }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:515:17: warning: let 'uninitializedCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicUninitialized' may have shared mutable state; this is an error in the Swift 6 language mode
513 | fileprivate let uninitializedPeripheral = CBMPeripheralUninitialized()
514 | fileprivate let uninitializedService = CBMServiceUninitialized()
515 | fileprivate let uninitializedCharacteristic = CBMCharacteristicUninitialized()
| |- warning: let 'uninitializedCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicUninitialized' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make let 'uninitializedCharacteristic' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
516 |
517 | fileprivate class CBMPeripheralUninitialized: CBMPeripheral, CustomDebugStringConvertible {
:
604 | }
605 |
606 | fileprivate class CBMCharacteristicUninitialized: CBMCharacteristic {
| `- note: class 'CBMCharacteristicUninitialized' does not conform to the 'Sendable' protocol
607 | override var debugDescription: String { return "<uninitialized>" }
608 | override var uuid: CBMUUID { uninitialized() }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMDictionary.swift:56:17: warning: capture of 'self' with non-sendable type 'CBMDictionary<Key, Value>?' in a '@Sendable' closure
35 | /// - Note: This dictionary wrapper does not implement every possible operation and can be expanded as needed
36 | /// for future use.
37 | internal class CBMDictionary<Key: Hashable, Value> {
| `- note: generic class 'CBMDictionary' does not conform to the 'Sendable' protocol
38 | private var dictStorage = [Key: Value]()
39 |
:
54 | set {
55 | queue.async(flags: .barrier) { [weak self] in
56 | self?.dictStorage[key] = newValue
| `- warning: capture of 'self' with non-sendable type 'CBMDictionary<Key, Value>?' in a '@Sendable' closure
57 | }
58 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMDictionary.swift:56:35: warning: capture of 'key' with non-sendable type 'Key' in a '@Sendable' closure
35 | /// - Note: This dictionary wrapper does not implement every possible operation and can be expanded as needed
36 | /// for future use.
37 | internal class CBMDictionary<Key: Hashable, Value> {
| `- note: consider making generic parameter 'Key' conform to the 'Sendable' protocol
38 | private var dictStorage = [Key: Value]()
39 |
:
54 | set {
55 | queue.async(flags: .barrier) { [weak self] in
56 | self?.dictStorage[key] = newValue
| `- warning: capture of 'key' with non-sendable type 'Key' in a '@Sendable' closure
57 | }
58 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMDictionary.swift:56:42: warning: capture of 'newValue' with non-sendable type 'Value?' in a '@Sendable' closure
35 | /// - Note: This dictionary wrapper does not implement every possible operation and can be expanded as needed
36 | /// for future use.
37 | internal class CBMDictionary<Key: Hashable, Value> {
| `- note: consider making generic parameter 'Value' conform to the 'Sendable' protocol
38 | private var dictStorage = [Key: Value]()
39 |
:
54 | set {
55 | queue.async(flags: .barrier) { [weak self] in
56 | self?.dictStorage[key] = newValue
| `- warning: capture of 'newValue' with non-sendable type 'Value?' in a '@Sendable' closure
57 | }
58 | }
[29/33] Compiling CoreBluetoothMock CBMDictionary.swift
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:513:17: warning: let 'uninitializedPeripheral' is not concurrency-safe because non-'Sendable' type 'CBMPeripheralUninitialized' may have shared mutable state; this is an error in the Swift 6 language mode
511 | // MARK: - Mocking uninitialized objects
512 |
513 | fileprivate let uninitializedPeripheral = CBMPeripheralUninitialized()
| |- warning: let 'uninitializedPeripheral' is not concurrency-safe because non-'Sendable' type 'CBMPeripheralUninitialized' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make let 'uninitializedPeripheral' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
514 | fileprivate let uninitializedService = CBMServiceUninitialized()
515 | fileprivate let uninitializedCharacteristic = CBMCharacteristicUninitialized()
516 |
517 | fileprivate class CBMPeripheralUninitialized: CBMPeripheral, CustomDebugStringConvertible {
| `- note: class 'CBMPeripheralUninitialized' does not conform to the 'Sendable' protocol
518 | let debugDescription: String = "<uninitialized>"
519 |
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:514:17: warning: let 'uninitializedService' is not concurrency-safe because non-'Sendable' type 'CBMServiceUninitialized' may have shared mutable state; this is an error in the Swift 6 language mode
512 |
513 | fileprivate let uninitializedPeripheral = CBMPeripheralUninitialized()
514 | fileprivate let uninitializedService = CBMServiceUninitialized()
| |- warning: let 'uninitializedService' is not concurrency-safe because non-'Sendable' type 'CBMServiceUninitialized' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make let 'uninitializedService' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
515 | fileprivate let uninitializedCharacteristic = CBMCharacteristicUninitialized()
516 |
:
586 | }
587 |
588 | fileprivate class CBMServiceUninitialized: CBMService {
| `- note: class 'CBMServiceUninitialized' does not conform to the 'Sendable' protocol
589 | override var debugDescription: String { return "<uninitialized>" }
590 | override var uuid: CBMUUID { uninitialized() }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:515:17: warning: let 'uninitializedCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicUninitialized' may have shared mutable state; this is an error in the Swift 6 language mode
513 | fileprivate let uninitializedPeripheral = CBMPeripheralUninitialized()
514 | fileprivate let uninitializedService = CBMServiceUninitialized()
515 | fileprivate let uninitializedCharacteristic = CBMCharacteristicUninitialized()
| |- warning: let 'uninitializedCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicUninitialized' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make let 'uninitializedCharacteristic' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
516 |
517 | fileprivate class CBMPeripheralUninitialized: CBMPeripheral, CustomDebugStringConvertible {
:
604 | }
605 |
606 | fileprivate class CBMCharacteristicUninitialized: CBMCharacteristic {
| `- note: class 'CBMCharacteristicUninitialized' does not conform to the 'Sendable' protocol
607 | override var debugDescription: String { return "<uninitialized>" }
608 | override var uuid: CBMUUID { uninitialized() }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMDictionary.swift:56:17: warning: capture of 'self' with non-sendable type 'CBMDictionary<Key, Value>?' in a '@Sendable' closure
35 | /// - Note: This dictionary wrapper does not implement every possible operation and can be expanded as needed
36 | /// for future use.
37 | internal class CBMDictionary<Key: Hashable, Value> {
| `- note: generic class 'CBMDictionary' does not conform to the 'Sendable' protocol
38 | private var dictStorage = [Key: Value]()
39 |
:
54 | set {
55 | queue.async(flags: .barrier) { [weak self] in
56 | self?.dictStorage[key] = newValue
| `- warning: capture of 'self' with non-sendable type 'CBMDictionary<Key, Value>?' in a '@Sendable' closure
57 | }
58 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMDictionary.swift:56:35: warning: capture of 'key' with non-sendable type 'Key' in a '@Sendable' closure
35 | /// - Note: This dictionary wrapper does not implement every possible operation and can be expanded as needed
36 | /// for future use.
37 | internal class CBMDictionary<Key: Hashable, Value> {
| `- note: consider making generic parameter 'Key' conform to the 'Sendable' protocol
38 | private var dictStorage = [Key: Value]()
39 |
:
54 | set {
55 | queue.async(flags: .barrier) { [weak self] in
56 | self?.dictStorage[key] = newValue
| `- warning: capture of 'key' with non-sendable type 'Key' in a '@Sendable' closure
57 | }
58 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMDictionary.swift:56:42: warning: capture of 'newValue' with non-sendable type 'Value?' in a '@Sendable' closure
35 | /// - Note: This dictionary wrapper does not implement every possible operation and can be expanded as needed
36 | /// for future use.
37 | internal class CBMDictionary<Key: Hashable, Value> {
| `- note: consider making generic parameter 'Value' conform to the 'Sendable' protocol
38 | private var dictStorage = [Key: Value]()
39 |
:
54 | set {
55 | queue.async(flags: .barrier) { [weak self] in
56 | self?.dictStorage[key] = newValue
| `- warning: capture of 'newValue' with non-sendable type 'Value?' in a '@Sendable' closure
57 | }
58 | }
[30/33] Compiling CoreBluetoothMock CBMManagerTypes.swift
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:513:17: warning: let 'uninitializedPeripheral' is not concurrency-safe because non-'Sendable' type 'CBMPeripheralUninitialized' may have shared mutable state; this is an error in the Swift 6 language mode
511 | // MARK: - Mocking uninitialized objects
512 |
513 | fileprivate let uninitializedPeripheral = CBMPeripheralUninitialized()
| |- warning: let 'uninitializedPeripheral' is not concurrency-safe because non-'Sendable' type 'CBMPeripheralUninitialized' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make let 'uninitializedPeripheral' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
514 | fileprivate let uninitializedService = CBMServiceUninitialized()
515 | fileprivate let uninitializedCharacteristic = CBMCharacteristicUninitialized()
516 |
517 | fileprivate class CBMPeripheralUninitialized: CBMPeripheral, CustomDebugStringConvertible {
| `- note: class 'CBMPeripheralUninitialized' does not conform to the 'Sendable' protocol
518 | let debugDescription: String = "<uninitialized>"
519 |
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:514:17: warning: let 'uninitializedService' is not concurrency-safe because non-'Sendable' type 'CBMServiceUninitialized' may have shared mutable state; this is an error in the Swift 6 language mode
512 |
513 | fileprivate let uninitializedPeripheral = CBMPeripheralUninitialized()
514 | fileprivate let uninitializedService = CBMServiceUninitialized()
| |- warning: let 'uninitializedService' is not concurrency-safe because non-'Sendable' type 'CBMServiceUninitialized' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make let 'uninitializedService' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
515 | fileprivate let uninitializedCharacteristic = CBMCharacteristicUninitialized()
516 |
:
586 | }
587 |
588 | fileprivate class CBMServiceUninitialized: CBMService {
| `- note: class 'CBMServiceUninitialized' does not conform to the 'Sendable' protocol
589 | override var debugDescription: String { return "<uninitialized>" }
590 | override var uuid: CBMUUID { uninitialized() }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMAttributes.swift:515:17: warning: let 'uninitializedCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicUninitialized' may have shared mutable state; this is an error in the Swift 6 language mode
513 | fileprivate let uninitializedPeripheral = CBMPeripheralUninitialized()
514 | fileprivate let uninitializedService = CBMServiceUninitialized()
515 | fileprivate let uninitializedCharacteristic = CBMCharacteristicUninitialized()
| |- warning: let 'uninitializedCharacteristic' is not concurrency-safe because non-'Sendable' type 'CBMCharacteristicUninitialized' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make let 'uninitializedCharacteristic' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
516 |
517 | fileprivate class CBMPeripheralUninitialized: CBMPeripheral, CustomDebugStringConvertible {
:
604 | }
605 |
606 | fileprivate class CBMCharacteristicUninitialized: CBMCharacteristic {
| `- note: class 'CBMCharacteristicUninitialized' does not conform to the 'Sendable' protocol
607 | override var debugDescription: String { return "<uninitialized>" }
608 | override var uuid: CBMUUID { uninitialized() }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMDictionary.swift:56:17: warning: capture of 'self' with non-sendable type 'CBMDictionary<Key, Value>?' in a '@Sendable' closure
35 | /// - Note: This dictionary wrapper does not implement every possible operation and can be expanded as needed
36 | /// for future use.
37 | internal class CBMDictionary<Key: Hashable, Value> {
| `- note: generic class 'CBMDictionary' does not conform to the 'Sendable' protocol
38 | private var dictStorage = [Key: Value]()
39 |
:
54 | set {
55 | queue.async(flags: .barrier) { [weak self] in
56 | self?.dictStorage[key] = newValue
| `- warning: capture of 'self' with non-sendable type 'CBMDictionary<Key, Value>?' in a '@Sendable' closure
57 | }
58 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMDictionary.swift:56:35: warning: capture of 'key' with non-sendable type 'Key' in a '@Sendable' closure
35 | /// - Note: This dictionary wrapper does not implement every possible operation and can be expanded as needed
36 | /// for future use.
37 | internal class CBMDictionary<Key: Hashable, Value> {
| `- note: consider making generic parameter 'Key' conform to the 'Sendable' protocol
38 | private var dictStorage = [Key: Value]()
39 |
:
54 | set {
55 | queue.async(flags: .barrier) { [weak self] in
56 | self?.dictStorage[key] = newValue
| `- warning: capture of 'key' with non-sendable type 'Key' in a '@Sendable' closure
57 | }
58 | }
/Users/admin/builder/spi-builder-workspace/CoreBluetoothMock/CBMDictionary.swift:56:42: warning: capture of 'newValue' with non-sendable type 'Value?' in a '@Sendable' closure
35 | /// - Note: This dictionary wrapper does not implement every possible operation and can be expanded as needed
36 | /// for future use.
37 | internal class CBMDictionary<Key: Hashable, Value> {
| `- note: consider making generic parameter 'Value' conform to the 'Sendable' protocol
38 | private var dictStorage = [Key: Value]()
39 |
:
54 | set {
55 | queue.async(flags: .barrier) { [weak self] in
56 | self?.dictStorage[key] = newValue
| `- warning: capture of 'newValue' with non-sendable type 'Value?' in a '@Sendable' closure
57 | }
58 | }
[31/33] Compiling CoreBluetoothMock CBMPeripheralPreview.swift
[32/33] Compiling CoreBluetoothMock CBMCentralManager.swift
[33/33] Compiling CoreBluetoothMock CBMCentralManagerDelegate.swift
Build complete! (20.02s)
Fetching https://github.com/apple/swift-docc-plugin
[1/2345] Fetching swift-docc-plugin
Fetched https://github.com/apple/swift-docc-plugin from cache (1.32s)
Computing version for https://github.com/apple/swift-docc-plugin
Computed https://github.com/apple/swift-docc-plugin at 1.5.0 (4.22s)
Fetching https://github.com/swiftlang/swift-docc-symbolkit from cache
Fetched https://github.com/swiftlang/swift-docc-symbolkit from cache (1.10s)
Computing version for https://github.com/swiftlang/swift-docc-symbolkit
Computed https://github.com/swiftlang/swift-docc-symbolkit at 1.0.0 (1.74s)
Creating working copy for https://github.com/apple/swift-docc-plugin
Working copy of https://github.com/apple/swift-docc-plugin resolved at 1.5.0
Creating working copy for https://github.com/swiftlang/swift-docc-symbolkit
Working copy of https://github.com/swiftlang/swift-docc-symbolkit resolved at 1.0.0
Build complete.
{
"dependencies" : [
{
"identity" : "swift-docc-plugin",
"requirement" : {
"range" : [
{
"lower_bound" : "1.5.0",
"upper_bound" : "2.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/apple/swift-docc-plugin"
}
],
"manifest_display_name" : "CoreBluetoothMock",
"name" : "CoreBluetoothMock",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "10.14"
},
{
"name" : "ios",
"version" : "12.0"
},
{
"name" : "watchos",
"version" : "9.0"
},
{
"name" : "tvos",
"version" : "12.0"
}
],
"products" : [
{
"name" : "CoreBluetoothMock",
"targets" : [
"CoreBluetoothMock"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"swift_languages_versions" : [
"5"
],
"targets" : [
{
"c99name" : "CoreBluetoothMockTests",
"module_type" : "SwiftTarget",
"name" : "CoreBluetoothMockTests",
"path" : "Tests/CoreBluetoothMockTests",
"sources" : [
"CentralBehaviorTestCase.swift",
"CentralManagerAdvancedBehaviorTest.swift",
"CentralManagerBehaviorTest.swift",
"DelegateQueueTest.swift",
"PeripheralBehaviorTest.swift",
"PeripheralManagerBehaviorTest.swift",
"PeripheralManagerDelegateQueueTest.swift",
"PeripheralManagerTest.swift"
],
"target_dependencies" : [
"CoreBluetoothMock"
],
"type" : "test"
},
{
"c99name" : "CoreBluetoothMock",
"module_type" : "SwiftTarget",
"name" : "CoreBluetoothMock",
"path" : "CoreBluetoothMock",
"product_memberships" : [
"CoreBluetoothMock"
],
"sources" : [
"CBMAttributes.swift",
"CBMDictionary.swift",
"CBMManagerTypes.swift",
"CBMMutableAttributes.swift",
"CBMPeer.swift",
"CBMPeripheral.swift",
"CBMPeripheralPreview.swift",
"Central/CBMCentralManager.swift",
"Central/CBMCentralManagerDelegate.swift",
"Central/CBMCentralManagerDelegateProxy.swift",
"Central/CBMCentralManagerFactory.swift",
"Central/CBMCentralManagerMock.swift",
"Central/CBMCentralManagerNative.swift",
"Central/CBMPeripheralDelegate.swift",
"Central/CBMPeripheralDelegateProxy.swift",
"Central/PeripheralPeer/CBMPeripheralSpec.swift",
"Central/PeripheralPeer/CBMPeripheralSpecDelegate.swift",
"Peripheral/CBMATTRequest.swift",
"Peripheral/CBMCentral.swift",
"Peripheral/CBMPeripheralManager.swift",
"Peripheral/CBMPeripheralManagerDelegate.swift",
"Peripheral/CBMPeripheralManagerFactory.swift",
"Peripheral/CBMPeripheralManagerMock.swift",
"Peripheral/CBMPeripheralManagerNative.swift",
"Peripheral/CentralPeer/CBMCentralSpec.swift",
"Peripheral/CentralPeer/CBMCentralSpecDelegate.swift",
"Specs/Blinky.swift",
"Specs/UART.swift"
],
"type" : "library"
}
],
"tools_version" : "5.9"
}
Done.