Build setting 'headerSearchPath' contains invalid component(s): $(SRCROOT)

After upgrading from Xcode 11 beta 2 to Xcode 11 beta 5, we started seeing

swift package generate-xcodeproj /Users/paulbeusterien/gh5/firebase-ios-sdk: error: manifest parse error(s): the build setting 'headerSearchPath' contains invalid component(s): (SRCROOT)


We were using $(SRCROOT) in the headerSearchPath to work around SwiftPM missing support for private headers and missing support for header-only interface framework dependencies.

Any suggested resolutions?

The code rejecting “$(SRCROOT)” was written by @Aciid. Maybe he (or @abertelrud or @NeoNacho) can tell us how it is supposed to be done.


1 Like

Values in .headerSearchPath are relative to the target path so you can use ../ to go one level up. For example, .headerSearchPath("../GoogleUtilities/Logger/Private") should work for this case.

1 Like

Adding relative paths doesn't seem to work:

Ah. That looks like a bug in the generated Xcode project. Do you mind filing a JIRA for that? It should work if you open the package directly in Xcode.

1 Like

Thanks, but opening the package directly in Xcode fails because of
error: unexpected service error: build aborted due to an internal error: planningFailed("multiple configured targets of \'Firebase\' are being created for macOS")
that is described in detail here.

(Created for the issue with generate-xcodeproj)

Terms of Service

Privacy Policy

Cookie Policy