XCode Project automation for multiple similar app by Python script
In app store I have over 50 dictionary applications by a single codebase. There are different constant files, different database and different icon set.
Every time when I modify the project manually for different language, it takes roughly 5 minutes. So I thought why not write a script to do the task automatically. And now it takes 3 seconds to modify my XCode project for different language app.
To make the job done, I select Python scripting language. Python is quite easy language to learn and have extensive library. Last time I wrote Python script in 2007 so its 10 years later I wrote another script.
In this blog post, I will share some common functions of the Python script which I think quite helpful to do similar job.
1. Importing some library in my script
2. Remove icon directory with files
3. Copying directory with files function
Just call copy(src, dest) function and provide the directory path correctly it will perform the copying perfectly.
4. XCode project has .plist files. To modify .plist file
5. Opening XCode project by Python Script
Hope it helps if you do similar job by Python script. Also during writing the script I take quick reference of Python language from this site tutorialspoint.com/python/