Skip to content

Add option to hide build number in version display #18

@iTarek

Description

@iTarek

Currently Bundle.versionBuild in Bundle+Ext.swift hardcodes the format as "(version) ((build))", and HeaderView uses this directly. There's no way to show only the version number without the build number.

Not every app uses meaningful build numbers — some keep it at "1" for every release, or use it only internally. Showing "(1)" or "(427)" next to the version adds visual noise that isn't useful to end users.

Suggestion:

Add a showBuild parameter (default true for backward compatibility):

SwiftNEW(
    show: $showNew,
    showBuild: false  // hides the build number
)

Or alternatively, make HeaderView conditionally format:

static var versionOnly: String {
    Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "1.0"
}

I created PR
#19

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions