Hans
Hans

Reputation: 2262

Delphi SDKtransform: many errors and missing classes in MacOS SDK

I have used SDKtransform for years (executed through "SDK Transform Assistant") to implement the iOS and OSX frameworks that are not included with Delphi.

However, an increasing number of classes fail to be converted and are not included in the output .pas header file. Right now I need to convert AVAudioEngine from AVFoundation in MacOS 11 (Big Sur), but SDKtransform fails with a lot of these lines added to the log:

"WARN: cannot add ObjCInterface AVAudioEngine - base class unknown"

Could these be due to the way it is defined?

API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
@interface AVAudioEngine : NSObject {
@private
    void *_impl;
}
- (instancetype)init;
- (void)attachNode:(AVAudioNode *)node;
- (void)detachNode:(AVAudioNode *)node;
...
@property (readonly, nonatomic) BOOL isInManualRenderingMode API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
...
@end // AVAudioEngine

How do I autoconvert this type of header definitions?

Upvotes: 1

Views: 184

Answers (1)

Sebastian Z
Sebastian Z

Reputation: 4730

In the Delphi IDE: Go to Tools -> Options -> Deployment -> SDK Manager. Select the macOSX sdk. Click on the "New" button in order to add a new remote path item. Add $(SDKROOT)/usr/include/objc with "File Mask" * and "Path type" Include Path. Close the dialog. Click "Update Local File Cache".

This will add the headers for NSObject.

Upvotes: 2

Related Questions