{"id":27779884,"url":"https://github.com/callstack/cocoapods-swift-modular-headers","last_synced_at":"2025-07-28T02:06:25.834Z","repository":{"id":267113258,"uuid":"900285319","full_name":"callstack/cocoapods-swift-modular-headers","owner":"callstack","description":"Automagically fix modular header issues in your (React Native) Apps ","archived":false,"fork":false,"pushed_at":"2025-07-15T08:54:12.000Z","size":12,"stargazers_count":20,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-15T20:04:41.430Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/callstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-08T11:41:56.000Z","updated_at":"2025-07-15T08:54:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"e5ada496-c00e-4659-8982-8d29f785c591","html_url":"https://github.com/callstack/cocoapods-swift-modular-headers","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"7b9a5e757854557211b8a1adc9a672811f41c423"},"previous_names":["okwasniewski/cocoapods-swift-modular-headers","callstack/cocoapods-swift-modular-headers"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/callstack/cocoapods-swift-modular-headers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callstack%2Fcocoapods-swift-modular-headers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callstack%2Fcocoapods-swift-modular-headers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callstack%2Fcocoapods-swift-modular-headers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callstack%2Fcocoapods-swift-modular-headers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/callstack","download_url":"https://codeload.github.com/callstack/cocoapods-swift-modular-headers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callstack%2Fcocoapods-swift-modular-headers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267451489,"owners_count":24089312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-30T10:22:10.342Z","updated_at":"2025-07-28T02:06:25.824Z","avatar_url":"https://github.com/callstack.png","language":"Ruby","readme":"# cocoapods-swift-modular-headers\n\nCocoapods plugin to automatically enable modular headers for dependencies of Swift pods.\n\n## Demo\n\nhttps://github.com/user-attachments/assets/f2713109-bb6d-42e1-a18d-f8546ddbb8bd\n\n## Motivation\n\nWhen using Swift pods, sometimes third party dependencies are not built with modular headers enabled. This can cause issues when importing the module in Swift code. This plugin automatically enables modular headers for all dependencies of Swift pods.\n\nIt solves this issue: \n\n```\nThe Swift pod `name` depends upon `Dependency`, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers =\u003e true` for particular dependencies.\n```\n\nOne of the workarounds is to either use static frameworks or enable modular headers globally in the Podfile. This plugin allows you to selectively enable modular headers for dependencies of Swift pods without enabling it globally.\n\nYou could also enable modular headers for a specific dependency by adding `:modular_headers =\u003e true` to the pod declaration. This plugin automates this process.\n\n## How it works\n\nThe plugin hooks into the pre-install phase of the pod install command. It analyzes the pod dependencies and enables modular headers for all dependencies of Swift pods.\n\n## Installation\n\nInside of your project's Gemfile add:\n\n```ruby\ngem 'cocoapods-swift-modular-headers', :git =\u003e 'git@github.com:okwasniewski/cocoapods-swift-modular-headers.git', branch: 'main'\n```\n\nThen run:\n\n```\nbundle install\n```\n\n## Usage\n\nInside of your Podfile add:\n\n```ruby\nplugin 'cocoapods-swift-modular-headers'\n\n# Above target declarations\napply_modular_headers_for_swift_dependencies()\n```\n\nAnd re-run the pod install command. The plugin will automatically enable modular headers for all dependencies of Swift pods.\n\nIf you already have some pre-install hooks, you can add the plugin to the existing hooks:\n\n```ruby\nplugin 'cocoapods-swift-modular-headers'\n\n# Above target declarations\npre_install do |installer|\n  apply_modular_headers_for_swift_dependencies(installer)\nend\n```\n\nFor Expo projects, this can be automated by using Expo Config Plugins. (TODO)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcallstack%2Fcocoapods-swift-modular-headers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcallstack%2Fcocoapods-swift-modular-headers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcallstack%2Fcocoapods-swift-modular-headers/lists"}