Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Cross-Platform-Entwicklung (https://www.delphipraxis.net/91-cross-platform-entwicklung/)
-   -   [Fmx, iOS, MacOS] Einbinden von 3rd Party SWIFT Frameworks (https://www.delphipraxis.net/197480-%5Bfmx-ios-macos%5D-einbinden-von-3rd-party-swift-frameworks.html)

Rollo62 9. Aug 2018 08:36

[Fmx, iOS, MacOS] Einbinden von 3rd Party SWIFT Frameworks
 
Hallo zusammen,

ja ich weiss: FMX iOS/MacOs basiert auf Objective-C,
und so ähnlich kann man 3rd Party Frameworks einbinden.
https://stackoverflow.com/questions/...-party-library
http://www.fmxexpress.com/full-ios-9...phi-10-berlin/

Leider gibt es immer mehr sehr gute SWIFT Frameworks, z.B. AudioKit.io, die sind aber in SWIFT geschrieben.

Hat es schon jemand geknackt wie man die in FMX einbinden kann ?

Rollo

mkinzler 9. Aug 2018 09:02

AW: [Fmx, iOS, MacOS] Einbinden von 3rd Party SWIFT Frameworks
 
Sollte genauso funktionieren. Auf Bibliotheksebene ist es egal ob in Obj-C, C/C++ oder Swift erstellt wurde.

Rollo62 9. Aug 2018 10:01

AW: [Fmx, iOS, MacOS] Einbinden von 3rd Party SWIFT Frameworks
 
Hallo Markus,

ja du könntest Recht damit haben.
Die Header sehen nach Objective-C aus.

Was mir da nur aufstösst sind die eventuell speziellen SWIFT-Klassen:
Delphi-Quellcode:
SWIFT_CLASS("_TtC8AudioKit13AKAudioPlayer")
@interface AKAudioPlayer : AKNode <AKToggleable>
@property (nonatomic, strong) AVAudioPCMBuffer * _Nullable audioFileBuffer;
/// Will be triggered when AKAudioPlayer has finished to play.
/// (will not as long as loop is on)
@property (nonatomic, copy) void (^ _Nullable completionHandler)(void);
/// Boolean indicating whether or not to loop the playback (Default false)
@property (nonatomic) BOOL looping;
/// Boolean indicating to play the buffer in reverse
@property (nonatomic) BOOL reversed;
/// Fade in duration
@property (nonatomic) double fadeInTime;
Ich werde es einfach mal ausprobieren, dankesehr.

Rollo

Rollo62 9. Aug 2018 10:27

AW: [Fmx, iOS, MacOS] Einbinden von 3rd Party SWIFT Frameworks
 
Die Installations-anleitung sieht aber nicht so vielversprechend aus.
Hier ein Auszug aus der Anleitung für das Einbinden des Frameworks in ein XCode-Projekt:
Zitat:

* For **Objective-C Projects**, make sure that the *Embedded Content Contains Swift Code* build setting is set to YES for your target. AudioKit is a Swift library that depends on the Swift runtime being available.
* For pure Objective-C projects (no Swift files), you will need to add this path to the library search paths of your target: `$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)`
Ob das nur für das Kompilieren der Framework-Sources gilt muss ich checken.
Wäre gut wenn das binäre Framework alles beinhaltet was man dafür braucht.

Es könnte s.o. aber sein das noch ein spezielles SWIFT-Framework benötigt wird,
macht ja auch Sinn wenn das nicht in jedes Framework statisch reinkopiert wäre.

Rollo

Rollo62 9. Aug 2018 12:48

AW: [Fmx, iOS, MacOS] Einbinden von 3rd Party SWIFT Frameworks
 
Hier ist mal eine sehr interessante Seite zu den Frameworks

Rollo62 8. Jun 2021 15:40

AW: [Fmx, iOS, MacOS] Einbinden von 3rd Party SWIFT Frameworks
 
Sorry das ich das alte Thema nochmal hochhole,
aber es scheint noch aktuell zu sein.

Habe einen aktuellen CrossPost in der EN.DP, hier.

Vielleicht gibt es hier ja Jemanden der sich des Themas Swift erfolgreich angenommen hat ?


Alle Zeitangaben in WEZ +1. Es ist jetzt 20:40 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