fix(ios): retain Objective-C classes in Xcode builds - #5915
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughThe iOS Xcode project template now adds inherited linker flags and ChangesiOS linker configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies" 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 |
Description
Generated iOS Xcode projects link the Go c-archive without
-ObjC. BecauseWailsAppDelegateis referenced by class name throughUIApplicationMain, the linker can omit the archive member that contains the Objective-C class. The generated app can then crash at launch with:This adds
-ObjCtoOTHER_LDFLAGSfor both Debug and Release configurations in the generated Xcode project.$(inherited)is retained so project or environment linker flags continue to compose normally.A regression test renders the project template and verifies that both build configurations independently contain the linker setting.
Fixes #5913.
Type of change
How Has This Been Tested?
go test -count=1 ./internal/commandsHonest caveat: the generated project was not launched on an iOS device or simulator from this Linux host.
Test Configuration
Checklist:
website/src/pages/changelog.mdxwith details of this PR (v3 changelog entries are added automatically) — n/a (v3)Summary by CodeRabbit
Bug Fixes
Tests