Skip to content

Commit

Permalink
Merge pull request dotintent#527 from mutablestudio/master
Browse files Browse the repository at this point in the history
fix for XCode 11 / iOS 13 build errors with canSendWriteWithoutResponse
  • Loading branch information
Cierpliwy authored Sep 9, 2019
2 parents 176e962 + 32b40cc commit b8218bc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions ios/RxBluetoothKit/RxCBPeripheral.swift
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,15 @@ class RxCBPeripheral: RxPeripheralType {
}

@objc func peripheralIsReady(toSendWriteWithoutResponse peripheral: CBPeripheral) {
RxBluetoothKitLog.d("\(peripheral.logDescription) peripheralIsReady(toSendWriteWithoutResponse:\(peripheral.canSendWriteWithoutResponse)")
peripheralIsReadyToSendWriteWithoutResponseSubject.onNext(peripheral.canSendWriteWithoutResponse)
//resolve build errors with XCode 11 / iOS 13
let canSendWriteWithoutResponse: Bool
if #available(iOS 11.2, *) {
canSendWriteWithoutResponse = peripheral.canSendWriteWithoutResponse
} else {
canSendWriteWithoutResponse = true
}
RxBluetoothKitLog.d("\(peripheral.logDescription) peripheralIsReady(toSendWriteWithoutResponse:\(canSendWriteWithoutResponse)")
peripheralIsReadyToSendWriteWithoutResponseSubject.onNext(canSendWriteWithoutResponse)
}
}

Expand Down

0 comments on commit b8218bc

Please sign in to comment.