Hans Hans - 2 months ago 21
iOS Question

Delphi: How to fix wrong SdkTransformAssistant iOS header conversion?

The headers for the Facebook SDK has been converted using SDKTransformAssistant in this repository.
Unfortunately, they have not been converted correctly by the tool.

FBSDKShareLinkContent
is supposed to inherit from
FBSDKSharingContent
so it contains the property
contentURL
, but it doesn't.

What is the correct way to fix the pascal header?

The Objective C headers:

@protocol FBSDKSharingContent <FBSDKCopying, NSSecureCoding>
@property (nonatomic, copy) NSURL *contentURL;
@property (nonatomic, copy) FBSDKHashtag *hashtag;
@property (nonatomic, copy) NSArray *peopleIDs;
@property (nonatomic, copy) NSString *placeID;
@property (nonatomic, copy) NSString *ref;

@interface FBSDKShareLinkContent : NSObject <FBSDKSharingContent>
@property (nonatomic, copy) NSString *contentDescription;
@property (nonatomic, copy) NSString *contentTitle;
@property (nonatomic, copy) NSString *contentTitle;
@property (nonatomic, copy) NSURL *imageURL;
@property (nonatomic, copy) NSString *quote;
- (BOOL)isEqualToShareLinkContent:(FBSDKShareLinkContent *)content;


How they are currently converted:

FBSDKSharingContent = interface(IObjectiveC)
['{BF1DBAD7-9326-44AA-A6BD-5E7F0515F925}']
procedure setContentURL(contentURL: NSURL); cdecl;
function contentURL: NSURL; cdecl;
procedure setHashtag(hashtag: FBSDKHashtag); cdecl;
function hashtag: FBSDKHashtag; cdecl;
procedure setPeopleIDs(peopleIDs: NSArray); cdecl;
function peopleIDs: NSArray; cdecl;
procedure setPlaceID(placeID: NSString); cdecl;
function placeID: NSString; cdecl;
procedure setRef(ref: NSString); cdecl;
function ref: NSString; cdecl;
end;

FBSDKShareLinkContent = interface(NSObject)
['{09744C48-BB8F-49AB-A42E-F2E2C2C6129E}']
procedure setContentDescription(contentDescription: NSString); cdecl;
function contentDescription: NSString; cdecl;
procedure setContentTitle(contentTitle: NSString); cdecl;
function contentTitle: NSString; cdecl;
procedure setImageURL(imageURL: NSURL); cdecl;
function imageURL: NSURL; cdecl;
procedure setQuote(quote: NSString); cdecl;
function quote: NSString; cdecl;
function isEqualToShareLinkContent(content: FBSDKShareLinkContent): Boolean; cdecl;
end;

TFBSDKShareLinkContent = class(TOCGenericImport<FBSDKShareLinkContentClass, FBSDKShareLinkContent>)
end;

Answer

Add these lines from FBSDKSharingContent to FBSDKShareLinkContent:

procedure setContentURL(contentURL: NSURL); cdecl;
function contentURL: NSURL; cdecl;