Skip to content

Commit

Permalink
Workaround for compiling with Xcode 16 beta
Browse files Browse the repository at this point in the history
With the beta of Xcode 16 compilation fails by reporting the error “The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions.” regarding the line

https://github.com/JohanDegraeve/xdripswift/blob/fec1005899893ddf20e36675f3aad96547e8c99c/xdrip/BluetoothTransmitter/CGM/Libre/Utilities/LibreNFC.swift#L462

Simply replacing the final  `+  (error?.localizedDescription ?? "none”)` with `+ error.debugDescription` makes xDrip compilable again.
  • Loading branch information
gui-dos committed Jul 12, 2024
1 parent fec1005 commit 9289577
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ class LibreNFC: NSObject, NFCTagReaderSessionDelegate {

tag.customCommand(requestFlags: .highDataRate, customCommandCode: Int(cmd.code), customRequestParameters: cmd.parameters) { response, error in

let debugInfo = "NFC: '" + subCmd.description + " command response " + response.count.description + " bytes : 0x" + response.toHexString() + ", error: " + (error?.localizedDescription ?? "none")
let debugInfo = "NFC: '" + subCmd.description + " command response " + response.count.description + " bytes : 0x" + response.toHexString() + ", error: " + error.debugDescription

xdrip.trace("%{public}@", log: self.log, category: ConstantsLog.categoryLibreNFC, type: .info, debugInfo)

Expand Down

0 comments on commit 9289577

Please sign in to comment.