Created
November 22, 2013 07:11
-
-
Save kimsama/7596051 to your computer and use it in GitHub Desktop.
Unity3D trampoline, yet 4.2.2 does not properly specify CFBundleIconFiles's setting which is needed to support iOS7's icon images. Run this python script to update that. Note that all icon files are should be under the same directory where .xcodeproj xcode project file is.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| # | |
| # Run this script to add various icon files to info.plist | |
| # which is needed to support iOS7 icon image files. | |
| # | |
| # (C)2013 Kim, Hyoun Woo | |
| # | |
| import sys | |
| import os | |
| import plistlib | |
| def updateCFBundleIconFiles(xcode_project_path): | |
| info_plist_path = os.path.join(xcode_project_path, 'Info.plist') | |
| pl = plistlib.readPlist(info_plist_path) | |
| # all these icon files should be under target directory. | |
| new_settings = [ | |
| 'Icon.png', | |
| '[email protected]', | |
| 'Icon-72.png', | |
| 'Icon-76.png', | |
| 'Icon-120.png', | |
| 'Icon-144.png', | |
| 'Icon-152.png' | |
| ] | |
| pl["CFBundleIconFiles"] = new_settings; | |
| plistlib.writePlist(pl, info_plist_path) | |
| # for the debugging purpose | |
| #print pl | |
| if len(sys.argv) < 2: | |
| print "Missing target directory. Specify xcode project path for target directory.\n" | |
| print "Usage: python update_icon.py [absolute path where xcode project file is]\n" | |
| targetDir = sys.argv[1] | |
| updateCFBundleIconFiles(targetDir) | |
| print "Done update CFBundleIconFiles in info.plist file.\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment