Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Cross-Platform-Entwicklung (https://www.delphipraxis.net/91-cross-platform-entwicklung/)
-   -   MacOS: Umstieg von 13.x SDK auf 14.x SDK (https://www.delphipraxis.net/214612-macos-umstieg-von-13-x-sdk-auf-14-x-sdk.html)

philipp.hofmann 7. Feb 2024 18:32


MacOS: Umstieg von 13.x SDK auf 14.x SDK
 
Hi,

ich habe gerade mal das MacOS SDK auf 14.0 bzw. 14.2 aktualisiert. Dies war davor 13.3. Jetzt bekomme ich beim Aufruf von

Delphi-Quellcode:
         
  bluetoothLE.DiscoverDevices(discoveryMs,
    bluetoothLEDeviceTypeHelpList); //TBluetoothLE
immer einen Crash, egal ob dieser im MainThread oder einem eigenen Thread aufgerufen wird.
Muss da irgendeine Capability in der Identifier-Konfiguration angepasst werden? Namentlich finde ich keine klar.
Neu war auf jeden Fall mit Delphi 12 die Version-Info NSBluetoothAlwaysUsageDescription, welche ich aber gefüllt habe.

Grüße, Philipp

philipp.hofmann 10. Feb 2024 18:56

AW: MacOS: Umstieg von 13.x SDK auf 14.x SDK
 
So, läuft jetzt. Ich habe im englischsprachigen Forum eine Lösung gefunden und es wurde auch ein Ticket aufgemacht (https://quality.embarcadero.com/browse/RSP-43324), ich habe es nur mit meinen Keywords nicht direkt gefunden. Das Problem liegt in Macapi.Bluetooth.pas.

{$IFDEF IOS}
libCoreBluetooth = '/System/Library/Frameworks/CoreBluetooth.framework/CoreBluetooth';
{$ELSE}
libCoreBluetooth = '/System/Library/Frameworks/IOBluetooth.framework/Frameworks/CoreBluetooth.framework/CoreBluetooth';
{$ENDIF}

Für MacOS Sonoma (14) ist der Bluetooth-Library-Pfad der gleiche wie für iOS. Nur bin ich trotzdem verwirrt. Die App lief mit SDK 13.3 kompiliert die ganze Zeit bei mir unter MacOS 14. Daher bin ich mir unsicher, ob der folgende Code so stimmt:

Delphi-Quellcode:
{$IFDEF IOS}
  libCoreBluetooth = '/System/Library/Frameworks/CoreBluetooth.framework/CoreBluetooth';
{$ELSE}
    if TOSVersion.Check(14) then
      libCoreBluetooth = '/System/Library/Frameworks/CoreBluetooth.framework/CoreBluetooth';
    else
      libCoreBluetooth = '/System/Library/Frameworks/IOBluetooth.framework/Frameworks/CoreBluetooth.framework/CoreBluetooth';
{$ENDIF}
oder ob es irgendetwas wie das Folgende sein muss:

Delphi-Quellcode:
{$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}

philipp.hofmann 11. Feb 2024 17:40

AW: MacOS: Umstieg von 13.x SDK auf 14.x SDK
 
Der erste Code-Schnipsel funktioniert, mit SDK 14.2 generiert und auf MacOS 12.6 und 14.2 ausprobiert.


Alle Zeitangaben in WEZ +1. Es ist jetzt 16:23 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz