Xcodebuild does not generate Headers if the source is Swift PM

Hi there, Riccardo here, from the React team @ Meta. I'm one of the core maintainers of React Native.

We are exploring how to replace Cocoapods with SwiftPM. One of our goals is to produce binaries for ReactNative to distribute to our users.

I noticed that when I run xcodebuild using a Package.swift definition, the generated .framework does not contains a Headers folder nor a Modules folder.

On the other hand, the exact same code and command, if used with a Xcode project as a source of truth, generates those folders.

I prepared a small reproducer in this repo to reproduce the issue. As you can see from the image below, we don't have Headers and Modules folders.

Are there any plans to introduce the automatic generation of Headers folder for languages from the C family?

Thank you so much.

2 Likes