Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/odnoletkov/xcodeproj-format
Format Xcode project file (project.pbxproj)
https://github.com/odnoletkov/xcodeproj-format
pbxproj xcode
Last synced: about 18 hours ago
JSON representation
Format Xcode project file (project.pbxproj)
- Host: GitHub
- URL: https://github.com/odnoletkov/xcodeproj-format
- Owner: odnoletkov
- Created: 2020-01-22T01:15:04.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-11-15T11:39:35.000Z (about 2 months ago)
- Last Synced: 2025-01-07T13:47:20.663Z (5 days ago)
- Topics: pbxproj, xcode
- Language: Objective-C
- Homepage:
- Size: 8.79 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# xcodeproj-format
Format Xcode project file (project.pbxproj) exactly the same way Xcode would
format it.Xcode always writes project file in normalized format. External changes to the
file may leave it not normalized. If it is still valid, Xcode will read it just
fine - but will re-normalize on save. This causes unrelated changes in the file
to appear later in commits. Use this tool to keep the file normalized:# Sample Uses
* Cleanup after merge - especially if conflicts were resolved
* Cleanup after modifying project file manually or with other tools
* Detect and reject misformatted or corrupted project files in CI
* `plutil` can be used to convert project file to JSON for further processing.
This tool can be used to convert it back from JSON to the canonic format.# Install
brew install odnoletkov/tap/xcodeproj-format
# Build
git clone https://github.com/odnoletkov/xcodeproj-format
cd xcodeproj-format
xcodebuild
# Produces build/Release/xcodeproj-format# Usage
```
xcodeproj-format path/to/foo.xcodeproj
```
```
xcodeproj-format path/to/foo.xcodeproj/project.pbxproj
```
```
xcodeproj-format path1 path2 ...
```
```
cd path/to/project
xcodeproj-format
```# Limitations
* The tool uses Xcode's internal frameworks so it may break with new version
(although this hasn't happened in years)
* ~1 second overhead to load and initialize Xcode state on each invocation# TODO
* Daemonize to avoid initialization overhead for back-to-back invocations
* Add stdin-stdout mode# Credits
* [xcproj](https://github.com/0xced/xcproj)