-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
BugSomething isn't workingSomething isn't working
Description
Description
By default, a Wails application include the following fragment in build/darwin/Info.[dev.]plist:
<key>CFBundleExecutable</key>
<string>{{.Name}}</string>
<key>CFBundleIdentifier</key>
<string>com.wails.{{.Name}}</string>
Imagine the following elements of wails.json configuration:
{
"name": "My Fab Application",
"outputfilename": "my-fab-application",
}There are two issues here:
CFBundleExecutablemust point to the executable in theContents/MacOSsubfolder. However, in the above case,CFBundleExecutablewill containMy Fab ApplicationbutContents/MacOSwill containmy-fab-application. This results in a broken application package that reports "You can’t open the application “My Fab Application” because it may be damaged or incomplete." when launched- Per Apple guidance:
CFBundleIdentifiercan only contain "alphanumeric characters (A–Z, a–z, and 0–9), hyphens (-), and periods (.)". In the above case,CFBundleIdentifierwill containcom.wails.My Fab Application. This results in an application package that Apple code signing/notarization will reject
To Reproduce
- Begin with a default Wails project
- Configure
wails.jsonas described above - Build with
wails build -clean - The resulting application package in
build/binwill display with no icon and will present an error dialog when launched
Expected behaviour
The out-of-the-box Wails configuration should tolerate correct usage of wails.json parameters.
Two solutions are required:
- The default
Info.plisttemplate should usewails.json'soutputFilenamevalue (even when that is defaulted fromname): - Either a new
wails.jsonparameter should introduced (perhapsmacosBundleIdentifier?) or an error generated if the generatedCFBundleIdentifierfails Apple's formatting requirements
Screenshots
Problem 1:
Problem 2: Non-compliant Info.plist generated using the above (legitimate) wails.json parameters:
<key>CFBundleExecutable</key>
<string>My Fab Application</string>
<key>CFBundleIdentifier</key>
<string>com.wails.My Fab Application</string>
Attempted Fixes
No response
System Details
Wails Doctor
# Wails
Version | v2.10.2
# System
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
| OS | MacOS |
| Version | 15.7.3 |
| ID | 24G419 |
| Branding | |
| Go Version | go1.24.2 |
| Platform | darwin |
| Architecture | arm64 |
| CPU 1 | Apple M1 Max |
| CPU 2 | Apple M1 Max |
| GPU | Chipset Model: Apple M1 Max Type: GPU Bus: Built-In Total Number of Cores: 32 Vendor: Apple (0x106b) Metal Support: Metal 3 |
| Memory | 32GB |
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
# Dependencies
┌────────────────────────────────────────────────────────────────┐
| Dependency | Package Name | Status | Version |
| Xcode command line tools | N/A | Installed | 2410 |
| Nodejs | N/A | Installed | 22.15.0 |
| npm | N/A | Installed | 10.9.2 |
| *Xcode | N/A | Available | |
| *upx | N/A | Available | |
| *nsis | N/A | Available | |
| |
└─────────────────── * - Optional Dependency ────────────────────┘
# Diagnosis
Optional package(s) installation details:
- Xcode: Available at https://apps.apple.com/us/app/xcode/id497799835
- upx : Available at https://upx.github.io/
- nsis : More info at https://wails.io/docs/guides/windows-installer/
SUCCESS Your system is ready for Wails development!Additional context
No response
Metadata
Metadata
Assignees
Labels
BugSomething isn't workingSomething isn't working
Type
Projects
Status
Backlog