Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Improve code organization in SwifterSwift by leveraging subspecs in podspec #1237

Copy link
Copy link
Open
@FunnyerFeng

Description

@FunnyerFeng
Issue body actions

Hi, thanks for the great work on SwifterSwift — it's been super helpful in many of our projects!

I noticed that in the current SwifterSwift.podspec, all Swift files are included using:

s.source_files = 'Sources/SwifterSwift/**/*.swift'

This results in all files being bundled under a single module when importing via CocoaPods, making it hard to navigate or understand the structure of the library in Xcode — especially for large codebases or when exploring the source code.

🔧 Suggested Improvement

Refactor the .podspec file to define separate subspecs based on folder structure, like so:

s.default_subspecs = ['SwiftStdlib', 'Foundation', 'UIKit', ...]

✅ Benefits

  • Xcode will display files organized by module (subspec), improving code readability and maintainability.
  • Consumers of the library can opt-in to only the parts they need, reducing app binary size and build time.
  • Helps contributors and users explore and debug SwifterSwift more efficiently.

Happy to help with a PR if needed — let me know what you think!

Thanks again 🙌

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.