https://github.com/mutualmobile/xcodesortinstaller
A simple gem to install a new build phase on your Xcode project file to (on modification) sort itself on build.
https://github.com/mutualmobile/xcodesortinstaller
Last synced: 11 months ago
JSON representation
A simple gem to install a new build phase on your Xcode project file to (on modification) sort itself on build.
- Host: GitHub
- URL: https://github.com/mutualmobile/xcodesortinstaller
- Owner: mutualmobile
- License: mit
- Created: 2013-07-22T16:23:12.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2014-03-05T16:26:54.000Z (over 12 years ago)
- Last Synced: 2025-03-02T19:19:43.740Z (over 1 year ago)
- Language: Ruby
- Size: 169 KB
- Stars: 2
- Watchers: 8
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# XcodeSortInstaller
A simple gem to install a new build phase on your Xcode project file to sort itself on build.
Keeps your `.xcodeproj` file sorted every time your target is built by using Apple's own sorting perl script as found in the [WebKit tools](https://github.com/adobe/webkit/blob/master/Tools/Scripts/sort-Xcode-project-file). A sorted project file will make merging project files slightly less painful since everything is not being appended to the end of a file list. This isn't a cure-all for Xcode project file merges, but helps.
## Installation
###Private (Current Method)
Download `.gem` file from releases section. Install using:
$ gem install `xcode_sort_install-0.0.1.gem`
## Usage
If your `.xcodeproj` file is located in the root directory of your folder structure:
$ xcode_sort_installer
If your `.xcodeproj` file is in another directory other than the source root:
Run in your subdirectory `SubFolder/ $ xcode_sort_installer -r ..` indicating that your source root is one directory below the current directory. If your project is not under version control or you don't care about adding our timestamp file to your .*ignore file, then you don't need to specify a root directory.
You can also explicitly specify both a project location and root location by using the `-p` and `-r` switches:
SomeFolder/NotInProject/ $ xcode_sort_installer -p /project/root/subfolder/project.xcodeproj -r /project/root
Some other options:
``` lang:shell
-v, --[no-]verbose Run verbosely
-p, --project PROJ Location of .xcodeproj file
-r, --root-dir DIR Root directory of project (Where .git or .svn folder lives)
-h, --help Show this message
```
## What is Added?
- A new "run script" phase on each of your build dependency-less build targets
- A new [perl script](https://github.com/adobe/webkit/blob/master/Tools/Scripts/sort-Xcode-project-file) that sorts your project file on each build if it has been modified
- A `.gitignore` entry to ignore the timestamp file that is used by the sort script phase to determine when the last sort was performed.
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
##License
Standard MIT License
##Known Issues
- This build phase will cancel your build as a result of modifiying the project file. This has proved very annoying for some.
- Will only add ignore entry to .gitignore and not any other SCM ignore file
- Have had a couple requests to install this using a git pre-commit hook