LairdTurnerSpecial 0 Posted January 27, 2023 Hi! I have a static lib 'lib.a' with objective-c code in it. The exports can be seen via nm lib.a. To make a wrapper for delphi I followed the common pattern with the trick to add loader func at the end of the unit. unit iOSapi.libtest; interface uses Macapi.ObjectiveC, iOSapi.Foundation; const libSD = 'lib.a'; PREFIX = '_OBJC_CLASS_$_'; type ProductManager = interface; ProductManagerClass = interface(NSObjectClass) ['{893A533F-E103-4898-A5CC-73185803FFF0}'] function GetInstance: ProductManager; cdecl; end; ProductManager = interface(NSObject) ['{FF519D81-5CF0-4ADF-B37B-2E965EB858A7}'] end; TProductManager = class(TOCGenericImport<ProductManagerClass, ProductManager>) end; implementation procedure libSDLoader; cdecl; external libSD name PREFIX + 'ProductManager'; end. For simplicity I've created a base app for iOS. Where I call TProductManager.OCClass.GetInstance; in the FormShow event. When I start the app in debug mode I get an 'EObjectivceC' Exception with the message that the Objecive-C-Class 'ProductManager' was not found. Any suggestions what I'm doing wrong? regards Share this post Link to post