Is it possible to use Obj-C with TCA?

I am developing an app that uses TCA with SwiftUI and I'm currently integrating an SDK in the form of a .framework. I tried dragging it into the Sources/Feature folder and it wouldn't pick up any of the files.
This would work on a normal project by dragging the .framework into the project and in the General tab, in Frameworks, Libraries and Embedded Content. But with TCA, this cannot be done unless it's on the root of the project, which I want to keep clean and decoupled.

I read into SPM and it seems that it's possible to transform .framework into an .xcframework. This .xcframework should be added as a .binaryTarget in the Package.swift.

I cannot get the .framework converted due to another pending issue and I managed to extract the contents of it instead.

My question is, would it be possible to use these .h and .m Obj-C files and bridging header with TCA? I have all of this in my project inside Sources/Feature and Xcode doesn't seem to pick up any of the files.

Hey buddy, can you get this library working without TCA? or are you asking in general how to get the framework to work via SPM?
If you have the .h and .m files you should be able to get it to work. Creating C Language Targets.
Did you place those files inside Feature/include?

Hi Pat, yes, I have this working without TCA. I can put the .framework files at the root of the project itself. But ideally, it should be done as a package. I tried what you suggested and it doesn't seem to work.

I tried isolating the problem creating a new project without TCA and having just the .h files inside the Feature/include. That didn't work either. For now I will add the .framework folders into the Frameworks, libraries and Embedded Content and add the Feature in the root of the project using TCA.

Terms of Service

Privacy Policy

Cookie Policy