# Documentation Generation Fails Due to Missing Header

**URL:** https://community.tuist.dev/t/documentation-generation-fails-due-to-missing-header/442
**Category:** Troubleshooting & how to
**Tags:** spm
**Created:** [March 7, 2025, 5:29pm UTC](https://community.tuist.dev/t/documentation-generation-fails-due-to-missing-header/442 "2025-03-07T17:29:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hak-ioki](https://community.tuist.dev/user_avatar/community.tuist.dev/hak-ioki/32/417_2.png) [@hak-ioki](https://community.tuist.dev/u/hak-ioki)
#### Post date: [March 7, 2025, 5:29pm UTC](https://community.tuist.dev/t/documentation-generation-fails-due-to-missing-header/442/1 "2025-03-07T17:29:32Z")

</div>

# Question or problem

After migrating Firebase from Carthage to Swift Package Manager (SPM) and updating its version, I encountered an issue where `Build Documentation` fails due to missing FirebaseCore headers:

 ![Screenshot 2025-03-07 at 17.13.02](https://tuist-community-storage.fly.storage.tigris.dev/original/1X/83be5f6a30f7d3a7b211761db159afda1beed7c0.jpeg)

This appears to be similar to the issue reported in [Tuist Issue #6637](https://github.com/tuist/tuist/issues/6637), where the build documentation fails when the app target has a Firebase dependency.

# Expectation

- `Build Documentation` should successfully generate documentation without missing headers.

**Actual Behavior:**

- The documentation build process fails because `FIRApp.h` cannot be found in `FirebaseCore`.
- However, the app can be compiled and archived successfully.

# Context

- **Tuist version:** 4.39.1
- **Xcode version:** 16.2
- **Firebase version:** 11.8.1
- **App:** DBFFM
- **App version:** 3.94.0

I encountered this issue after migrating Firebase dependencies from Carthage to SPM. While the app itself builds and runs correctly, `Build Documentation` fails due to missing headers in FirebaseCore.

## Reproduction (mandatory for problems)

You can see the detailed error when you build documentation via Xcode: `Product -> Build Documentation`.

---

<div class="post-metadata">

### Author: ![blackjacx](https://community.tuist.dev/user_avatar/community.tuist.dev/blackjacx/32/86_2.png) [@blackjacx](https://community.tuist.dev/u/blackjacx)
#### Post date: [March 18, 2025, 11:09am UTC](https://community.tuist.dev/t/documentation-generation-fails-due-to-missing-header/442/2 "2025-03-18T11:09:22Z")

</div>

Is ther any time horizon when we can count at least on an answer? This is really blocking us…

---

<div class="post-metadata">

### Author: ![marekfort](https://community.tuist.dev/user_avatar/community.tuist.dev/marekfort/32/8_2.png) [@marekfort](https://community.tuist.dev/u/marekfort)
#### Post date: [March 19, 2025, 8:43am UTC](https://community.tuist.dev/t/documentation-generation-fails-due-to-missing-header/442/3 "2025-03-19T08:43:49Z")

</div>

Hey, folks 👋

I’m aware of this, but I actually have no idea what the fix could be and haven’t had the time to look into this. Fwiw, this doesn’t require a lot of Tuist knowledge, so you should be able to look into this yourself – Tuist is a community-led project after all 🙂

There are essentially two pieces to look into:

- [PackageInfoMapper](https://github.com/tuist/tuist/blob/main/Sources/TuistLoader/SwiftPackageManager/PackageInfoMapper.swift)
- [ModuleMapMapper](https://github.com/tuist/tuist/blob/main/Sources/TuistGenerator/Mappers/ModuleMapMapper.swift)

For debugging and what could shed a light on this is to inspect the build commands Xcode runs when building for documentation and compare those with a regular build. There must be _something_ that Xcode does differently when building for documentation.

I understand you’d love an answer “we will look into this later this week”, but our resources are stretched and we can’t look into everything. Sorry about that. It’s in my backlog, but can’t guarantee when I will have time to look into this deeper.
