Closed sirnacnud closed 1 month ago
I believe we removed compatibility with Objective C because it caused unnecessary complexity. What for do you need it?
If you wanted to use the generated Swift code in code bases which were mixed Objective-C and Swift, this would need to be supported. This is not a blocker for my usage, just was wondering if it was possible.
Thanks for the quick reply.
If you wanted to use the generated Swift code in code bases which were mixed Objective-C and Swift, this would need to be supported. This is not a blocker for my usage, just was wondering if it was possible.
Thanks for the quick reply.
You may try to add additional step to post process generated code and add inheritance from NSObject. We do such for Flutter for imports when we generate code to share between modules/plugins.
If you wanted to use the generated Swift code in code bases which were mixed Objective-C and Swift, this would need to be supported. This is not a blocker for my usage, just was wondering if it was possible. Thanks for the quick reply.
You may try to add additional step to post process generated code and add inheritance from NSObject. We do such for Flutter for imports when we generate code to share between modules/plugins.
Are you able to point me to where you are doing this post processing for Flutter imports? I couldn't fine anything in the repo.
If you wanted to use the generated Swift code in code bases which were mixed Objective-C and Swift, this would need to be supported. This is not a blocker for my usage, just was wondering if it was possible. Thanks for the quick reply.
You may try to add additional step to post process generated code and add inheritance from NSObject. We do such for Flutter for imports when we generate code to share between modules/plugins.
Are you able to point me to where you are doing this post processing for Flutter imports? I couldn't fine anything in the repo.
Sorry, I wasn't clear enough. We do this post processing in out internal project. Actually I see couple of differences in this matter. I don't think that you may avoid patching. The best place where inject your logic with processing the generated files in after call to gluecodium here https://github.com/heremaps/gluecodium/blob/master/cmake/modules/gluecodium/gluecodium/details/runGenerate.cmake#L225
The
@Swift(ObjC)
was removed in https://github.com/heremaps/gluecodium/pull/739. As a replacement, it says to use@Swift(Attribute="objc") or @Swift(Attribute="objcMembers")
instead. But the problem is that the generated Swift class needs to inherit fromNSObject
in order for these attributes to actually work.Is there a way with Gluecodium to specify the generated Swift class inherit from
NSObject
?