FB16871429: Swift Package file creation lacks filename prompt and generates incorrect file headers
Submission Date
2025-03-14
Status
Open
Area
Xcode
Operating System Version
macOS 15.4.1, Xcode 16.2 (16C5032a)
Type
Incorrect/Unexpected Behavior
Description
When creating new Swift files in Swift Packages (File > New File > Swift File), Xcode:
- Doesn't show the filename prompt dialog, automatically naming it "File.swift"
- Creates a header comment that always says "File.swift" regardless of renaming
- Omits package name and copyright information in the header
This requires manually editing both the filename and header every time, unlike in regular Xcode projects where proper dialogs and headers are generated.
Relevant links (all suggest creating a new template, which seems like cracking eggs with a sledgehammer) https://forums.swift.org/t/swift-package-manager-project-dont-generate-filename-and-boilerplates/49625 https://stackoverflow.com/questions/72068103/why-doesnt-swift-package-manager-ask-for-a-filename https://stackoverflow.com/questions/72472384/xcode-does-not-allow-me-to-specify-file-name-when-adding-in-spm
Keywords
No response
Prerequisites
- [x] The title follows the format
FB<number>: <title> - [x] I will keep this issue updated with Apple's responses