Skip to content

After changing macOS PRODUCT_NAME in AppInfo.xcconfig the app will not build until the build folder is cleaned #105317

@jmagman

Description

@jmagman

BUNDLE_NAME is set to PRODUCT_NAME which gets used by Xcode to name the bridging header. And if you've already built with the old name, you get an error like:

Xcode/DerivedData/Runner-ctretxpfaeypegasfqwbmrjkizyw/Build/Intermediates.noindex/Runner.build/Debug/Runner.build/Objects-normal/x86_64/This_Gallery-Swift.h: No such file or directory

Where the name I set is This_Gallery.

I cleaned Product > Clean Build Folder which deleted the header generated by Xcode, then built again so it generated the new one. Then it ran with the new name:
Screen Shot 2022-06-02 at 9 58 06 AM

There might be a real fix, but maybe the clean at least should be called out in the docs?

Originally posted by @jmagman in #105157 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: desktopRunning on desktopplatform-macBuilding on or for macOS specificallyteam-macosOwned by the macOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-macosTriaged by the macOS platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions