A script that automatically creates an appIcon with debugging information
LLIconVersioning is a script that automatically creates an appIcon with debugging information. The integration script in run script can automatically create an icon with version information each time you build or archive, also you can use it to automatically manage build number.
1.0.0 is app version, 9 is build number, Debug is environment name.
It's a script which can help you manager icon, you can more easily see the app version infos.
And you can also automatic management build number, such as 1 increase to 2, or 1.0.0 increase to 1.0.1, or you can use the date to be the build number such as 201808311200.
-
Installed ghostscript and ImageMagick on your mac, you can use brew to simplify process:
brew install imagemagickandbrew install ghostscript. -
Add a
New Run Script Phasein your project and write theLLIconVersion.sh's path. If you putLLIconVersion.shin root path, you can write$SRCROOT/LLIconVersion.shin run script. If you putLLIconVersion.shin a folder in root path , you need write$SRCROOT/your folder name/LLIconVersion.shin run script.
-
Copy
LLIconVersion.shto your target path. -
Call
Build(shortcuts :command + B) before you want to archive or install the app to the tester. See Q&A for reason. -
Run your project and see what happend.
-
If the color or the font size or whatever is not what you want, modify the parameter configuration in script.
LLIconVersioning is modified according to IconOverlaying, but IconOverlaying is no longer support Xcode 9 and iOS 11.
Although LLIconVersioning is modified according to IconOverlaying, but the central idea is different.
LLIconVersioning is modified your project.pbxproj, and set your ASSETCATALOG_COMPILER_APPICON_NAME from appIcon to appIcon-Debug in debug environment, it means your app will build with appIcon-Debug in debug environment and build with appIcon in release environment.
IconOverlaying is modified your ipa file after archive, it will modified the png file in .ipa, but app in iOS11 won't use png file in .ipa anymore, the app in iOS11 will use appIcon in assets.
- Check local data to see if the icon needs to be updated.
- Check that the necessary libraries are installed on the Mac.
- Copy
appIcontoappIcon-Debugand write the app version information on the picture. - Modify the
ASSETCATALOG_COMPILER_APPICON_NAME's value toappIcon-Debugin debug environment. - Modify build number automatically.
LLIconVersioning is dynamic modification of project.pbxproj and assets. Because run script is called after ipa production, run script cannot modify the assets resource in ipa, build is equivalent to this run script to create data for the next ipa, so you should build it first when you need.
When you manually delete appIcon-Debug in assets, you receive an error like None of the input catalogs contained a matching stickers icon set or app icon set named "AppIcon-Debug".
Search asset catalog in Build settings, double click and change the value to appIcon. Run again.
Check to see if ghostscript/ImageMagick is installed or see debug info in xcode. If you can't solve your problem, open an issue.
All adjustable parameter configurations are in part 1 and part 2 of the script, and you can read the comments to make changes.
- If you need help, open an issue.
- If you'd like to ask a general question, open an issue.
- If you found a bug, and can provide steps to reliably reproduce it, open an issue.
- If you have a feature request, open an issue.
- If you find anything wrong or anything dislike, open an issue.
- If you have some good ideas or some requests, send mail([email protected]) to me.
- If you want to contribute, submit a pull request.
- Send email to [email protected]
- Send message in twitter @HdbLi
- Send message in JianShu
This code is distributed under the terms and conditions of the MIT license.