fix(darwin): sanitize CFBundleIdentifier to comply with Apple requirements#5231
fix(darwin): sanitize CFBundleIdentifier to comply with Apple requirements#5231leaanthony wants to merge 1 commit intomasterfrom
Conversation
…ments
CFBundleIdentifier was generated as com.wails.{{.Name}} which could
contain spaces and special characters, violating Apple's requirement
that bundle identifiers only contain [A-Za-z0-9.-].
Add a safeBundleID template function that lowercases and replaces
non-alphanumeric runs with hyphens, then strips leading/trailing
dashes. Applied to both Info.plist and Info.dev.plist templates.
Fixes #4866
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🤖 PR Triage Review ✅ Accepted Sanitizes CFBundleIdentifier to comply with Apple packaging requirements. Important for App Store distribution. Platform: macOS (v2-only) Next Steps: Dispatching for Mac testing. Reviewed by Wails PR Reviewer Bot |
Summary
safeBundleIDtemplate function that lowercases and replaces non-alphanumeric characters with hyphensCFBundleIdentifierin both plist templates to use{{safeBundleID .Name}}com.wails.My Fab Applicationbecomecom.wails.my-fab-applicationTest
v2/pkg/buildassets/safebundleid_test.go— tests various inputs including spaces, special chars, underscoresFixes #4866