Making portal

Introduction to the

LLIconVersioning is a script that automatically creates appIcon with debugging information. Integration scripts in Run Script can automatically create ICONS with version information each time a build or archive is created, as well as automatically manage build numbers.

preview

1.0.0 is app version, 9 is build number, Debug is environment name.

What can I do with LLIconVersioning?

This is a script that helps you manage ICONS so that you can see application version information more easily.

It can also automatically manage build numbers, such as 1 to 2, or 1.0.0 to 1.0.1, or use dates to set your build number, such as 201808311200.

Add LLIconVersioning to your project

  1. To install GhostScript and ImageMagick on your Mac, you can use Brew install ImageMagick and Brew Install Ghostscript for quick installation.

  2. Add a New Run Script Phase to your project and fill in the lliconversion.sh path. If you want to put lliconversion. sh in the root directory, you can enter $SRCROOT/ lliconversion. sh. If you want to put lliconversion. sh in a folder, You need to fill in $SRCROOT/ Your Folder name/ lliconversion.sh.

  1. Copy lliconversion. sh to the specified directory.

  2. Before you want to archive or install the app for testing, run Build(command + B). Check out Q&A for the reason.

  3. Run your project and see what happens.

  4. If you are not happy with the color or font, you can modify these configuration parameters in the script.

Q&A

Q1 : LLIconVersioningIconOverlayingWhat’s the difference?

LLIconVersioning is modified according to IconOverlaying, which no longer supports Xcode 9 and iOS 11.

Although LLIconVersioning is modified according to IconOverlaying, the central idea is different.

LLIconVersioning is to modify your project. Pbxproj and set the ASSETCATALOG_COMPILER_APPICON_NAME from appIcon to appicon-debug. This means that your app will use appIcon -DEBUG to create the Debug environment icon and appIcon to create the Release environment icon.

IconOverlaying is to modify your ipa after archive, which will modify the PNG file in. Ipa. However, ios11 app does not use the PNG file in ipa, but directly uses the appIcon in assets to create ICONS.

Q2 : LLIconVersioningWhat did you do at build?

  1. Check local data to determine whether ICONS need to be updated.
  2. Check that the necessary libraries are installed on your Mac.
  3. copyappIconappIcon-Debug, write the app version information on the picture.
  4. Modify the Debug environmentASSETCATALOG_COMPILER_APPICON_NAMEA value ofappIcon-Debug.
  5. Automatically change the build number.

Q3: Why should it be called before usebuild?

LLIconVersioning is to dynamically modify project. Pbxproj and assets. Because run Script can only be called after IPA is generated, the script cannot modify assets in the current IPA. Build is equivalent to running a script to create data for the next IPA, so you need to build before you archive or install the app for testing.

Q4: Why do I receive such errors?

When you manually remove Appicon-Debug from Assets, You will receive an error like None of the input catalogs contained a matching stickers icon set or app icon set named “Appicon-debug”.

Search for Asset Catalog in Build Settings, double-click and change the value to appIcon. Run it again.

Q5: Why doesn’t it work?

Check to see if you have Ghostscript /ImageMagick installed, or check for debug information in Xcode, and open an issue if you can’t resolve the problem.

Q6: What parameters can I change?

All the adjustable parameters are written in the first and second parts of the script file, and you can read the comments to modify them.

contact

contact

  • You can send them to [email protected]
  • Send me a private message on Twitter @hdbli.
  • You can send me a private message in Jane’s book.

The license

This code is distributed under the terms and conditions of the MIT license.