Skip to content

Discover SwiftPM interface builder files in target sources#1096

Draft
ileitch wants to merge 1 commit intomasterfrom
issue-1089
Draft

Discover SwiftPM interface builder files in target sources#1096
ileitch wants to merge 1 commit intomasterfrom
issue-1089

Conversation

@ileitch
Copy link
Copy Markdown
Contributor

@ileitch ileitch commented Mar 21, 2026

Summary

Fix SwiftPM Interface Builder discovery by scanning target directories for XIB and storyboard files, even when they are not declared as package resources.
Add regression coverage for private IBAction methods and the fallback filesystem discovery path.

Made with Cursor

Retain XIB and storyboard references even when a package manifest does not declare them as resources, and cover private IBActions with SPM regression tests.

Made-with: Cursor
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes SwiftPM Interface Builder discovery by augmenting SPM planning to find .xib/.storyboard files via filesystem scanning of target directories (not just declared resources), and adds regression tests to cover private IBAction handling and the fallback discovery path.

Changes:

  • Extend SPMProjectDriver to collect Interface Builder files by enumerating each target’s directory for .xib/.storyboard files.
  • Add macOS regression coverage for (a) private/private-extension IBAction methods referenced from XIBs and (b) discovery when resources aren’t declared in the SwiftPM manifest.
  • Update the macOS SwiftPM fixture XIB and controller to include a connected IBAction in a private extension.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
Tests/SPMTests/SPMProjectMacOSTest.swift Adds a new regression test that drives SPMProjectDriver using a minimal manifest JSON and validates XIB discovery + reference retention.
Tests/SPMTests/SPMProjectMacOS/Sources/SPMProjectMacOSKit/SPMXibViewController.swift Makes IBAction methods private and adds private-extension IBActions for retention/regression coverage.
Tests/SPMTests/SPMProjectMacOS/Sources/SPMProjectMacOSKit/Resources/SPMXibViewController.xib Connects a new IBAction selector to the view controller to validate private-extension action discovery.
Sources/ProjectDrivers/SPMProjectDriver.swift Implements filesystem-based Interface Builder file discovery within SwiftPM target directories.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Sources/ProjectDrivers/SPMProjectDriver.swift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants