vasilius 0 Posted November 14, 2023 Please report it to embarcadero In Delphi 12 and early BluetoothLE will not work in macOS Sonoma How to check problem: 1. Place on the form the BluetoothLE1 component and the Button1. 2. Write code in the Button1Click event BluetoothLE1.DiscoverDevices(1500); The problem is in the Macapi.Bluetooth.pas. Here {$IFDEF IOS} libCoreBluetooth = '/System/Library/Frameworks/CoreBluetooth.framework/CoreBluetooth'; {$ELSE} libCoreBluetooth = '/System/Library/Frameworks/IOBluetooth.framework/Frameworks/CoreBluetooth.framework/CoreBluetooth'; {$ENDIF} In the new macOS Sonoma (version 14) Bluetooth path is the same like in IOS - '/System/Library/Frameworks/CoreBluetooth.framework/CoreBluetooth'; Share this post Link to post
sjordi 39 Posted November 14, 2023 Thanks for letting the community know. You can report it yourself to Embarcadero: https://quality.embarcadero.com/secure/Dashboard.jspa Share this post Link to post
philipp.hofmann 4 Posted February 10 (edited) Is this only relevant for the SDK you are using or really for the MacOS-PC the app is running on. As until now I haven't any problem compiling my app with MacOS SDK 13.3 and running my app an MacOS 14 but I got a problem as I switch to MacOS SDK 14.2. So my assumption is that the following code is not correct {$IFDEF IOS} libCoreBluetooth = '/System/Library/Frameworks/CoreBluetooth.framework/CoreBluetooth'; {$ELSE} if (TOSVersion.MajorVersion>=14) then libCoreBluetooth = '/System/Library/Frameworks/CoreBluetooth.framework/CoreBluetooth' else libCoreBluetooth = '/System/Library/Frameworks/IOBluetooth.framework/Frameworks/CoreBluetooth.framework/CoreBluetooth'; {$ENDIF} It needs to be something as {$IFDEF IOS} libCoreBluetooth = '/System/Library/Frameworks/CoreBluetooth.framework/CoreBluetooth'; {$ELSE} {$IFDEF MACOS_SKD_14F} libCoreBluetooth = '/System/Library/Frameworks/CoreBluetooth.framework/CoreBluetooth'; {$ELSE} libCoreBluetooth = '/System/Library/Frameworks/IOBluetooth.framework/Frameworks/CoreBluetooth.framework/CoreBluetooth'; {$ENDIF} {$ENDIF} Edited February 10 by philipp.hofmann Share this post Link to post
philipp.hofmann 4 Posted February 11 The first example works fine with SDK 14.2 generated and tested on MacOS 12.6 and MacOS 14.2. Share this post Link to post