Issue when try to archive the application

Question or problem

Facing an issue while trying to archive the application
This error occurs in local machine and xcode cloud.

Expectation

I expect after the archive that the app get distributed without facing such error.

Context

  • Tuist version: 4.54.3

Trying to deploy the app to test flight. but facing this error

Reproduction (mandatory for problems)

using this command to generate the project

❯ tuist generate --no-binary-cache

Then archive the app using xCode or xcode cloude

Hey @joeoct91 :wave:

The value for the CFBundleSupportedPlatforms does seem invalid – it includes a path to some bundle but it should only declare valid platforms. I would suggest checking how you generate the Info.plist and why that value crept in.

Without a reproducible sample or knowing more about your project, there’s not much additional guidance that we can provide right now.

Yes, the value CFBundleSupportedPlatforms seems that has a simulators platform in which is not a valid value, I did not declare that value in the manifest at all.

It seems that the issue come from Firebase SDK

And this is how declare my project

import ProjectDescription
import ProjectDescriptionHelpers

// Define configurations with xcconfig files
let configurations: [Configuration] = [
    .debug(name: "Debug", xcconfig: "ProjectResources/Configurations/Development.xcconfig"),
    .release(name: "Release", xcconfig: "ProjectResources/Configurations/Production.xcconfig")
]

// Define build insights script
let buildInsightsScript = """
    export PATH="/opt/homebrew/bin:$PATH"
    if command -v tuist >/dev/null 2>&1; then
        tuist inspect build
    else
        echo "Tuist not found, skipping build insights"
    fi
    """

// Define base settings
let baseSettings: [String: SettingValue] = [
    "OTHER_LDFLAGS": SettingValue(stringLiteral: "$(inherited) -ObjC -Xlinker -interposable"),
    "SWIFT_VERSION": SettingValue(stringLiteral: "5.10"),
    "IPHONEOS_DEPLOYMENT_TARGET": SettingValue(stringLiteral: "16.0"),
    "DEVELOPMENT_TEAM": SettingValue(stringLiteral: "QP638232SP"), // Set your development team ID here
    "PRODUCT_NAME": "$(PRODUCT_NAME)", // Use product name from config
]

// Main app target
let mainTarget = Target.target(
    name: "Bazzar-iOS",
    destinations: .iOS,
    product: .app,
    bundleId: "$(PRODUCT_BUNDLE_IDENTIFIER)",
    infoPlist: .extendingDefault(with: [
        "Apple Pay Merchant Id": "$(APPLE_PAY_MERCHANT_ID)",
        "API_BASE_URL": "$(API_BASE_URL)",
        "CFBundleShortVersionString": "$(MARKETING_VERSION)",
        "CFBundleVersion": "$(CURRENT_PROJECT_VERSION)",
        "ITSAppUsesNonExemptEncryption": false,
        "UIBackgroundModes": ["remote-notification"],
        "UISupportedInterfaceOrientations": ["UIInterfaceOrientationPortrait"],
        "UIRequiresFullScreen": true,
        "UIStatusBarHidden": true,
        "UIStatusBarStyle": "UIStatusBarStyleLightContent",
        "UIViewControllerBasedStatusBarAppearance": true,
        "UILaunchStoryboardName": "",
        "UIUserInterfaceStyle": "Light",
        "CFBundleDisplayName": "$(PRODUCT_NAME)",
        "CFBundleName": "$(PRODUCT_NAME)",
        "UILaunchScreen": ["UIColorName": "LaunchScreenBackground"],
    ]),
    sources: ["Sources/**"],
    resources: [
        "Resources/**",
        "../Modules/Presentation/Foundation/DesignSystem/Resources/**"
    ],
    scripts: [
        .pre(
            path: "ProjectResources/Shell/run_swiftgen.sh",
            arguments: [],
            name: "Run SwiftGen",
            basedOnDependencyAnalysis: false
        )
    ],
    dependencies: [
        .project(target: "Dependencies", path: .relativeToRoot("Modules/Dependencies")),
        .project(target: "AppModule", path: .relativeToRoot("Modules/Presentation")),
        .project(target: "CommonComponentModule", path: .relativeToRoot("Modules/Presentation")),
        .project(target: "Logging", path: .relativeToRoot("Modules/Logging"))
    ],
    settings: .settings(
        base: baseSettings,
        configurations: configurations
    )
)

// Main project definition
let project = Project(
    name: "Bazzar-iOS",
    organizationName: "BzaaarGate",
    settings: .settings(
        base: baseSettings,
        configurations: configurations
    ),
    targets: [mainTarget],
    schemes: [
        .scheme(
            name: "Bazzar-iOS (Development)",
            shared: true,
            buildAction: .buildAction(
                targets: ["Bazzar-iOS"],
                postActions: [
                    .executionAction(
                        title: "Build Insights",
                        scriptText: buildInsightsScript
                    )
                ]
            ),
            runAction: .runAction(configuration: "Debug"),
            archiveAction: .archiveAction(configuration: "Debug"),
            profileAction: .profileAction(configuration: "Debug"),
            analyzeAction: .analyzeAction(configuration: "Debug"),
        ),
        .scheme(
            name: "Bazzar-iOS (Production)",
            shared: true,
            buildAction: .buildAction(targets: ["Bazzar-iOS"]),
            runAction: .runAction(configuration: "Release"),
            archiveAction: .archiveAction(configuration: "Release"),
            profileAction: .profileAction(configuration: "Release"),
            analyzeAction: .analyzeAction(configuration: "Release")
        )
    ]
) 

Would you mind trying to create a reproducible sample that we can take a look at? I don’t see anything odd in your definition.

Does the issue no longer happen if you remove the Firebase SDK as a dependency?

Thanks For your time the issue has been resolved, it was due to inconsistent submodules settings .

1 Like