feat(72): wire FenixKanbanWidgets extension target (closes the #45 deferral)#54
Merged
Merged
Conversation
Re-adds the FenixKanbanWidgets WidgetKit target to project.yml (deferred since #66 due to the xcodegen macOS embed bug). Key decisions: - Target: app-extension, iOS only, sources from Widgets/ + FenixKanban/Features/Widget/BoardSnapshot.swift (shared Codable model). - Info.plist: Widgets/Info.plist with NSExtensionPointIdentifier already set; GENERATE_INFOPLIST_FILE=NO so the manual plist is used verbatim. - Entitlements: Widgets/FenixKanbanWidgets.entitlements (App Group). - Embed dependency added to FenixKanban app target with embed:true, link:false. - post-generate patch (scripts/patch-widget-platform-filter.rb) sets platformFilters=["ios"] on the embed build file so the macOS app build skips the extension entirely. - Makefile generate target now chains: xcodegen → patch script. - TDD: WidgetSnapshotReaderTests + board_snapshot.json fixture cover the BoardSnapshot wire-shape decode contract (2 new tests, both pass). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FenixKanbanWidgets(type: app-extension, platform: iOS) toproject.ymlwith sources fromWidgets/+ the sharedFenixKanban/Features/Widget/BoardSnapshot.swift. Entitlements (Widgets/FenixKanbanWidgets.entitlements) and the manualWidgets/Info.plist(withNSExtensionPointIdentifier com.apple.widgetkit-extension) are wired in;GENERATE_INFOPLIST_FILE=NO.scripts/patch-widget-platform-filter.rb). xcodegen 2.45.4 was confirmed (via test project) to NOT emitplatformFilters = (ios,)on the embed build file even whenplatformFilter: iosis set on the dependency in project.yml. The patch script uses thexcodeprojgem (already required byadd-ui-test-target.rb) to setplatform_filters = ["ios"]on theFenixKanbanWidgets.appexbuild file in the "Embed Foundation Extensions" copy-files phase. The script is idempotent and mirrors the style ofadd-ui-test-target.rb.Makefilegeneratetarget updated:xcodegen generate && ruby scripts/patch-widget-platform-filter.rb.FenixKanbanTests/Features/Widget/WidgetSnapshotReaderTests.swiftvalidate theBoardSnapshotwire-shape decode contract against a newFenixKanbanTests/Fixtures/board_snapshot.jsonfixture (pattern mirrorsFizzySyncEngineTestsfixture loading: bundle index →#filesource-tree fallback forCODE_SIGNING_ALLOWED=NOlocal runs).CI interaction finding
CI (
swift-pr-check.yml) does NOT runmake generate— it checks out the committedproject.pbxprojdirectly. Because the patch script runs inmake generateand the patchedproject.pbxprojis committed to this branch, CI will pick up the already-patched file. Theruby scripts/add-ui-test-target.rbstep in CI runs after checkout and composes cleanly on top (verified locally).Acceptance evidence
make generate→xcodegen generatesucceeds + patch outputs:Patched platformFilters = ["ios"] on FenixKanbanWidgets.appex in 'Embed Foundation Extensions'. Saved FenixKanban.xcodeproj (1 build file(s) patched)xcodebuild build -scheme FenixKanban -destination 'platform=iOS Simulator,id=FBF75DCC…'→ BUILD SUCCEEDEDxcodebuild build -scheme FenixKanban -destination 'platform=macOS,arch=arm64' CODE_SIGNING_ALLOWED=NO …→ BUILD SUCCEEDED (zero errors, no embed rejection)ruby scripts/add-ui-test-target.rb→ composes cleanly on the patched projectWidgetSnapshotReaderTests.fixtureDecodesCorrectlyandfixtureGeneratedAtIsValidDate→ ✔ Test run with 2 tests in 1 suite passedTest plan
make generate— confirm patch runs after xcodegen and outputs the "Patched" lineFenixKanbanschemeCODE_SIGNING_ALLOWED=NO(no "embedded content built for iOS not allowed" error)ruby scripts/add-ui-test-target.rbruns without errors after regenerationWidgetSnapshotReaderTests(2 tests) pass in the unit suiteMission: #28 · Status log: #72 · Resolves the xcodegen platform-filter blocker from #66
🤖 Generated with Claude Code