{"id":16807093,"url":"https://github.com/toshi0383/xcconfig-extractor","last_synced_at":"2025-09-21T19:31:21.440Z","repository":{"id":47604252,"uuid":"87441832","full_name":"toshi0383/xcconfig-extractor","owner":"toshi0383","description":"Refactor BuildSettings into xcconfigs","archived":false,"fork":false,"pushed_at":"2021-02-24T14:38:13.000Z","size":174,"stargazers_count":128,"open_issues_count":1,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-11T20:22:26.825Z","etag":null,"topics":["swift","xcconfig","xcode"],"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/toshi0383.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-06T14:57:05.000Z","updated_at":"2024-12-08T16:45:49.000Z","dependencies_parsed_at":"2022-08-18T13:11:18.277Z","dependency_job_id":null,"html_url":"https://github.com/toshi0383/xcconfig-extractor","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toshi0383%2Fxcconfig-extractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toshi0383%2Fxcconfig-extractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toshi0383%2Fxcconfig-extractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toshi0383%2Fxcconfig-extractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toshi0383","download_url":"https://codeload.github.com/toshi0383/xcconfig-extractor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233787194,"owners_count":18730124,"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":["swift","xcconfig","xcode"],"created_at":"2024-10-13T09:52:56.733Z","updated_at":"2025-09-21T19:31:16.091Z","avatar_url":"https://github.com/toshi0383.png","language":"Swift","funding_links":["https://www.patreon.com/bePatron?u=13627375"],"categories":[],"sub_categories":[],"readme":"# xcconfig-extractor\nRefactor buildSettings into xcconfigs.\n\n[![Build Status](https://app.bitrise.io/app/31197448d2a1080e/status.svg?token=_xOjshR6oPSWAMcHBH3rqg\u0026branch=master)](https://app.bitrise.io/app/31197448d2a1080e)\n[![patreon](https://img.shields.io/badge/patreon-donate-yellow.svg)](https://www.patreon.com/bePatron?u=13627375)\n\n# Requirements\n- Xcode10+ is officially supported, but should work against older ones too.\n\n# Usage\n\n```bash\n$ xcconfig-extractor /path/to/Your.xcodeproj Configurations\n```\n\nThis will create xcconfig files under `Configuration` dir. Configurations are removed from `buildSettings` section of pbxproj.\n\nGenerated xcconfigs are added to your project automatically. ✏️\n\n![xcode's general tab](images/xcode-configuration-sample.png)\n\n# Available Options\n```bash\nOptions:\n    --no-trim-duplicates [default: false] - Don't extract duplicated lines to common xcconfig files, simply map each buildSettings to one file.\n    --no-edit-pbxproj [default: false] - Do not modify pbxproj at all.\n    --include-existing [default: true] - `#include` already configured xcconfigs.\n    --no-set-configurations [default: false] - Do not set xcconfig(baseConfigurationReference) in pbxproj. Ignored if `--no-edit-pbxproj` is true.\n```\n\n# Build Setting Validation\n⚠️ ***Waring*** ⚠️\n\n`xcconfig-extractor` is a refactoring tool. It shouldn't affect your App's actual \"Build Setting\".  \n\nRecommended way to check Build Settings is to use `xcodebuild` command. Make sure outputs does not change between before and after.\n\n```bash\n$ xcodebuild -showBuildSettings -configuration Release \u003e before\n$ # apply xcconfig-extractor\n$ xcodebuild -showBuildSettings -configuration Release \u003e after\n$ diff before after # should prints nothing!\n```\n\nIf outputs differ, fix it manually e.g. simply by adding missing value to target's xcconfig.\n\nxcconfig does not allow any `$(inherited)` from `#include`ing xcconfigs. (See: https://github.com/toshi0383/xcconfig-extractor/pull/8#issuecomment-298234943) So if you have any existing xcconfig configured on your project, it might cause problems.\n[This article](https://pewpewthespells.com/blog/xcconfig_guide.html#BuildSettingInheritance) is helpful to understand how inheritance works.\n\n# agvtool compatibility\n⚠️ ***Waring*** ⚠️\n\nIf you use `agvtool` for automatic versioning, it won't work after applying `xcconfig-extractor`.  \n`agvtool` updates versions correctly iff `INFOPLIST_FILE` is configured in Xcode's buildSettings section.\n\nSo make sure you either\n- Restore `INFOPLIST_FILE` in Xcode's buildSettings section.\n\nor\n- Quit using `agvtool` and fallback to other tools like `/usr/libexec/PlistBuddy` to update Info.plist.\n\ne.g.\n```bash\n/usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString $(git describe --tags --abbrev=0)\" App/Info.plist\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion ${BITRISE_BUILD_NUMBER}-${BITRISE_GIT_BRANCH}\" App/Info.plist\n```\n\n# Install\n\n## [Mint](https://github.com/yonaskolb/Mint)\n\n```\nmint install toshi0383/xcconfig-extractor\n```\n\n## Build from source\n- Clone this repo and run `swift build -c release`.  \n- Executable will be created at `.build/release/xcconfig-extractor`.\n\n# Donate\nIf you think it's a useful tool, consider donation to maintain project.\n\n[![patreon](https://img.shields.io/badge/patreon-donate-yellow.svg)](https://www.patreon.com/bePatron?u=13627375)\n\n# License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoshi0383%2Fxcconfig-extractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoshi0383%2Fxcconfig-extractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoshi0383%2Fxcconfig-extractor/lists"}