Skip to content

Commit

Permalink
resolve build errors with XCode 11 / iOS 13 for canSendWriteWithoutRe…
Browse files Browse the repository at this point in the history
…sponse
  • Loading branch information
mutablestudio committed Sep 2, 2019
1 parent 402a955 commit 348bfa9
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions ios/RxBluetoothKit/RxCBPeripheral.swift
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,19 @@ 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
if #available(iOS 11.0, *) {
RxBluetoothKitLog.d("\(peripheral.logDescription) peripheralIsReady(toSendWriteWithoutResponse:\(peripheral.canSendWriteWithoutResponse)")
} else {
// Fallback on earlier versions
RxBluetoothKitLog.d("\(peripheral.logDescription) peripheralIsReady(toSendWriteWithoutResponse: false")
}
if #available(iOS 11.0, *) {
peripheralIsReadyToSendWriteWithoutResponseSubject.onNext(peripheral.canSendWriteWithoutResponse)
} else {
// Fallback on earlier versions
peripheralIsReadyToSendWriteWithoutResponseSubject.onNext(false)
}
}
}

Expand Down

0 comments on commit 348bfa9

Please sign in to comment.