Hive Hive
Sign in

TargetScript should use FileListGlob instead of Path for inputFileListPaths

GitHub issue · Open

Metadata
Source
tuist/tuist #6257
Updated
Jun 11, 2026
Domains
Generated projects
Details

What problem or need do you have?

I ran into a similar issue with https://github.com/tuist/tuist/issues/6188. I am using firebase directly with SPM instead of managing it through tuist. I cannot set the inputFileListPaths to ${BUILD_DIR}/../../SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/CrashlyticsInputFiles.xcfilelist in TargetScript.

Potential solution

Should use FileListGlob instead of Path.

macOS version

13.6.6

Tuist version

4.11.0

Xcode version

15.2

Comments
M
mo5tone May 16, 2024

Steps to reproduce:

  • cd ~/Developer && mkdir Demo && cd Demo

  • tuist init

  • edit Project.swift to below follow firebase SPM guide

    import ProjectDescription
    let project = Project(
    name: "Demo",
    packages: [
    .package(url: "https://github.com/firebase/firebase-ios-sdk.git", .upToNextMajor(from: "10.26.0")),
    ],
    targets: [
    .target(
    name: "Demo",
    destinations: .iOS,
    product: .app,
    bundleId: "io.tuist.Demo",
    infoPlist: .extendingDefault(
    with: [
    "UILaunchStoryboardName": "LaunchScreen.storyboard",
    ]
    ),
    sources: ["Demo/Sources/**"],
    resources: ["Demo/Resources/**"],
    scripts: [
    .post(
    script: "${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run",
    name: "FirebaseCrashlytics",
    inputFileListPaths: [
    "${BUILD_DIR}/../../SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/CrashlyticsInputFiles.xcfilelist",
    ]
    )
    ],
    dependencies: [
    .package(product: "FirebaseCrashlytics"),
    ],
    settings: .settings(
    base: [
    "OTHER_LDFLAGS": ["$(inherited)", "-ObjC"],
    ]
    )
    ),
    .target(
    name: "DemoTests",
    destinations: .iOS,
    product: .unitTests,
    bundleId: "io.tuist.DemoTests",
    infoPlist: .default,
    sources: ["Demo/Tests/**"],
    resources: [],
    dependencies: [.target(name: "Demo")]
    ),
    ]
    )
  • check ‘FirebaseCrashlytics’ build phase, the ‘Input File Lists’ take wrong value. Screenshot 2024-05-16 at 09 10 43

  • build failed with error: “Unable to load contents of file list: ‘/Users/Foo/Developer/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/CrashlyticsInputFiles.xcfilelist’”

P
pepicrft May 16, 2024

Thanks a lot @mo5tone. We added it to a list to prioritize it for next week

S
stodirascu Feb 26, 2025

Any news on this? Seems next week never came)

We’re also having the same issue

P
pepicrft Feb 27, 2025

Hi @stodirascu I had a quick look at the issue, and it happens in this line, which tries to convert the value into an absolute path, which is not something we should assume.

@fortmarek how do you feel about changing XcodeGraph.TargetScript.inputFileListPaths to be an enum with two cases, either an absolute path, or a string value?

Until we handle that, you can workaround the issue by integrating the dependencies using the XcodeProj-based integration. Here’s an attached demo showing how to do it:

Demo.zip

Note that the dependency is defined in Package.swift, and it’s referred to from the target using .external(...). By doing so, the path where Crashlytics is pulled is conventional, so you can refer to it using a relative path.

F
fortmarek Feb 27, 2025

@fortmarek how do you feel about changing XcodeGraph.TargetScript.inputFileListPaths to be an enum with two cases, either an absolute path, or a string value?

I believe this is already the case: https://github.com/tuist/XcodeGraph/pull/132

What we need to do here is to also change the type in ProjectDescription to allow for [String] and not just [Path]. However, adding a path with Path should still be possible as it’s more convenient than raw Strings, so we’ll need to some conversion in the TargetScript factory.

S
svallex Aug 14, 2025

Hi. Any updates on this? I don’t understand how to avoid this issue. It’s still add an absolute path in Input File Lists