How can I do a "dry-run" that generates headers from Swift for Objective-C?

I'm trying to run a CI job that just does static analysis. I don't want to actually build anything, I just want to statically analyze my project. However, if I don't do any actual building, I run into issues when analyzing Objective-C files where the header from Swift isn't generated for them. Is there any way to generate these headers without doing a full build? Thanks.

The -emit-objc-header-path compiler flag will type check your module and generate a header. Whether that works for you depends on your build system and setup and so on.

1 Like