XcodeProjectRenamer
No description available
Install / Use
/learn @StewartLynch/XcodeProjectRenamerREADME
XcodeProjectRenamer
<a href="http://www.youtube.com/watch?feature=player_embedded&v=l8cnIetfafs
" target="_blank"><img src="http://img.youtube.com/vi/l8cnIetfafs/0.jpg"
alt="Xcode Project Renamer" width="480" height="360" border="1" /></a>
XcodeProjectRenamer is a script Created by Marko Tadic
Original Github repository: https://github.com/tadija/xcode-project-renamer
The script goes through all the files and directories recursively, including Xcode project or workspace file and replaces all occurrences of $OLD_PROJECT_NAME string with $NEW_PROJECT_NAME string (both in each file's name and content).
I have repackaged this, with permission as a Swift-based command-line tool.
The tool is packaged as xprename, and can be installed via Homebrew or built locally.
🚀 What Does It Do?
Renaming an Xcode project isn't just renaming a folder — it often involves:
- Renaming the
.xcodeprojfile - Renaming the
.xcworkspacefile (if present) - Renaming scheme names
- Renaming directory names
- Updating internal references to the old name in:
project.pbxprojworkspacedata files.swiftor.plistfiles (if desired)
xprename automates all of this safely and quickly in a single command.
📦 Option 1: Installation via Homebrew
You can install the command-line tool using Homebrew:
brew install stewartlynch/tap/xprename
🛠 Option 2: Manual Build & Install locally via SwiftPM
If you prefer to build it yourself, you can clone the repo and install the tool manually using Swift Package Manager.
Clone the Repository
git clone https://github.com/StewartLynch/XcodeProjectRenamer.git
cd XcodeProjectRenamer
Build with SwiftPM
swift build -c release
sudo cp .build/release/xprename /usr/local/bin/
🧪 How to use
Once installed:
- Open Terminal
- Change the directory to your project directory
- Issue the following command:
xprename MyOldAppName MyNewAppName
This will:
- Rename all references of
MyOldAppNametoMyNewAppName - Rename
.xcodeprojand.xcworkspacefiles - Update folder names and scheme names accordingly
Other commands
version
To display the current version
xprename --version
help
To show help information
xprename -h
License
This code is released under the MIT license. See LICENSE for details.
