{"id":13450867,"url":"https://github.com/MobileNativeFoundation/rules_xcodeproj","last_synced_at":"2025-03-23T16:32:42.335Z","repository":{"id":37085360,"uuid":"454515423","full_name":"MobileNativeFoundation/rules_xcodeproj","owner":"MobileNativeFoundation","description":"Bazel rules for generating Xcode projects.","archived":false,"fork":false,"pushed_at":"2024-10-29T18:34:57.000Z","size":61462,"stargazers_count":526,"open_issues_count":110,"forks_count":84,"subscribers_count":23,"default_branch":"main","last_synced_at":"2024-10-29T20:24:50.368Z","etag":null,"topics":["bazel","bazel-rules","ios","macos","swift","tvos","visionos","watchos","xcode","xcodeproj"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/MobileNativeFoundation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-01T19:04:37.000Z","updated_at":"2024-10-29T18:17:42.000Z","dependencies_parsed_at":"2023-12-18T18:52:29.391Z","dependency_job_id":"8a9f40ce-bed5-4b85-a488-d856c86a77e0","html_url":"https://github.com/MobileNativeFoundation/rules_xcodeproj","commit_stats":null,"previous_names":[],"tags_count":69,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MobileNativeFoundation%2Frules_xcodeproj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MobileNativeFoundation%2Frules_xcodeproj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MobileNativeFoundation%2Frules_xcodeproj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MobileNativeFoundation%2Frules_xcodeproj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MobileNativeFoundation","download_url":"https://codeload.github.com/MobileNativeFoundation/rules_xcodeproj/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245131137,"owners_count":20565780,"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","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":["bazel","bazel-rules","ios","macos","swift","tvos","visionos","watchos","xcode","xcodeproj"],"created_at":"2024-07-31T07:00:39.556Z","updated_at":"2025-03-23T16:32:42.317Z","avatar_url":"https://github.com/MobileNativeFoundation.png","language":"Swift","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/158658/161647598-223361dc-030d-431a-b4fe-d92592ed5530.png\" width=\"255\"\u003e\n\u003c/p\u003e\n\n# rules_xcodeproj\n\nThis repository contains rules for [Bazel](https://bazel.build) that can be\nused to generate Xcode projects from targets in your workspace.\n\nIf you run into any problems with these rules, please check our\n[FAQ](docs/faq.md), check if [another issue already exists][issues] and comment\non it, or [file a new issue][file-an-issue]!\n\n[issues]: https://github.com/MobileNativeFoundation/rules_xcodeproj/issues\n[file-an-issue]: https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new/choose\n\n## Features\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://user-images.githubusercontent.com/158658/216620253-507bbf10-a692-4dcd-bd74-736c9717e53e.png\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://user-images.githubusercontent.com/158658/216620284-6a3cb6ff-f5cd-42f2-8e2b-7ef2a70c8da5.png\"\u003e\n      \u003cimg alt=\"Screenshot of a rules_xcodeproj generated project open in Xcode\" src=\"https://user-images.githubusercontent.com/158658/216620253-507bbf10-a692-4dcd-bd74-736c9717e53e.png\" width=\"1245\"\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n- Full support for Xcode features:\n  - Indexing (i.e. autocomplete, syntax highlighting, jump to definition)\n  - Debugging\n  - Runtime sanitizers\n  - Inline warnings and errors\n  - Fix-its (currently only in BwX mode)\n  - Test selection and running\n  - Embedded Targets (App Clips, App Extensions, and Watch Apps)\n  - Dynamic frameworks\n  - Xcode Previews\n- Focused Projects\n  - Include a subset of your targets in Xcode\n  - Unfocused targets are built with Bazel\n  - Works in BwX mode as well!\n- Comprehensive Bazel rules support\n  - Core Bazel C/C++/Objective-C\n  - rules_swift\n  - rules_apple\n  - rules_ios\n  - Most likely your custom rules as well!\n- Minimal configuration needed (see the [usage](#usage) section below)\n- It “just works”\n\nWe’ve also documented the [high-level design goals](docs/design-goals.md) of\nthe ruleset.\n\n## Projects using rules_xcodeproj\n\n- amo\n- BazelPods\n- Cash App\n- Envoy Mobile\n- Ergatta\n- Faire Wholesale\n- Gojek\n- Lyft\n- [Mercari](https://engineering.mercari.com/en/blog/entry/20221215-16cdd59909/)\n- Reddit\n- Robinhood\n- [Slack](https://www.youtube.com/watch?v=wy3Q38VJ5uQ)\n- Snap\n- Spotify\n- Square\n- SwiftLint\n- Ten Ten\n- Tinder\n- Tokopedia\n\nIf you are also using rules_xcodeproj for your project, feel free to open a PR\nto include it in the list above.\n\n## Compatibility\n\n| rules_xcodeproj | Bazel | [rules_apple][1] | [rules_swift][2] | Xcode | macOS | Supporting Branch |\n| :-------------: | :---: | :--------------: | :--------------: | :---: | :---: | :---------------: |\n| 2.10.0+ | 7.0-9.x | 3.16.1+ | 1.18.0+ | 13.3–15.x | 13–14.x | `main` |\n| 1.17.0+ | 6.3-7.x | 1.0.1–2.x | 1.x | 13.3–15.x | 13–14.x | - |\n| 1.16.0 | 6.3-7.x | 1.0.1–2.x | 1.x | 13.3–15.2 | 13–14.x | - |\n| 1.14.0-1.15.0 | 6.1-7.x | 1.0.1–2.x | 1.x | 13.3–15.2 | 13–14.x | - |\n| 1.7.0-1.13.0 | 5.3–6.x | 1.0.1–2.x | 1.x | 13.3–15.2 | 12–13.x | - |\n| 1.4.0-1.6.0 | 5.3–6.x | 1.0.1–2.x | 1.x | 13.3–14.3 | 12–13.x | - |\n| 1.0-1.3.3 | 5.3–6.x | 1.0.1–2.x | 1.x | 13.3–14.2 | 12–13.x | - |\n\nMore versions of these tools and rulesets might be supported, but these are the\nones we’ve officially tested with.\n\n[1]: https://github.com/bazelbuild/rules_apple\n[2]: https://github.com/bazelbuild/rules_swift\n\n## Installation\n\nFrom the\n[release you wish to use](https://github.com/MobileNativeFoundation/rules_xcodeproj/releases),\ncopy the Bzlmod or WORKSPACE snippet into your repository.\nIf you want to manually build a release archive, you can use this command:\n`bazel build //distribution:release`.\n\n## Usage\n\nPlease see the documentation in the [docs](docs/README.md) directory and\nexamples in the [examples](examples/README.md) directory.\n\n### Simple iOS example\n\nGiven a root level `BUILD` file:\n```python\nload(\n  \"@build_bazel_rules_apple//apple:ios.bzl\",\n  \"ios_application\",\n  \"ios_unit_test\",\n)\nload(\"@build_bazel_rules_swift//swift:swift.bzl\", \"swift_library\")\nload(\n    \"@rules_xcodeproj//xcodeproj:defs.bzl\",\n    \"top_level_target\",\n    \"xcodeproj\",\n)\n\nxcodeproj(\n    name = \"xcodeproj\",\n    project_name = \"App\",\n    tags = [\"manual\"],\n    top_level_targets = [\n        top_level_target(\":App\", target_environments = [\"device\", \"simulator\"]),\n        \":Tests\",\n    ],\n)\n\nios_application(\n    name = \"App\",\n    bundle_id = \"com.example.app\",\n    families = [\"iphone\", \"ipad\"],\n    infoplists = [\":Info.plist\"],\n    minimum_os_version = \"15.0\",\n    visibility = [\"//visibility:public\"],\n    deps = [\":Lib\"],\n)\n\nswift_library(\n    name = \"Lib\",\n    srcs = glob([\"src/*.swift\"]),\n)\n\nios_unit_test(\n    name = \"Tests\",\n    bundle_id = \"com.example.tests\",\n    minimum_os_version = \"15.0\",\n    test_host = \":App\",\n    visibility = [\"//visibility:public\"],\n    deps = [\":TestLib\"],\n)\n\nswift_library(\n    name = \"TestLib\",\n    srcs = glob([\"test/*.swift\"]),\n)\n```\n\nYou can then create the Xcode project with:\n\n```shell\nbazel run //:xcodeproj\n```\n\nThe generated project will be in the workspace next to the `BUILD` file at\n`App.xcodeproj`.\n\n## Acknowledgements\n\n- Inspired by [Tulsi][tulsi] and the custom project generators at Target and Lyft.\n- Made possible by [XcodeProj][XcodeProj].\n- Initial design and development by [@brentleyjones](https://github.com/brentleyjones).\n- [Logo][logo] by [@pennig](https://github.com/pennig).\n- Donated to the Mobile Native Foundation by [BuildBuddy](https://buildbuddy.io).\n\n[logo]: https://user-images.githubusercontent.com/158658/161647598-223361dc-030d-431a-b4fe-d92592ed5530.png\n[tulsi]: https://github.com/bazelbuild/tulsi\n[XcodeProj]: https://github.com/tuist/XcodeProj\n","funding_links":[],"categories":["Tooling","Swift"],"sub_categories":["Editors"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMobileNativeFoundation%2Frules_xcodeproj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMobileNativeFoundation%2Frules_xcodeproj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMobileNativeFoundation%2Frules_xcodeproj/lists"}