Commit f4799a0b authored by Egor Badaev's avatar Egor Badaev
Browse files

Updated for xCode 9.4

parent 28773c09
......@@ -3,8 +3,6 @@ How to generate iconset
1. Put your icon in a folder (preferably, empty) and rename it to **sourceIcon.png**.
2. Copy **generate_iconset.sh** to this folder.
3. Open script with *Sublime* for editing.
4. Edit path to your project in the last string.
5. Open *Terminal*, navigate to this folder.
6. Set the execute permissions to this script:
......@@ -12,7 +10,8 @@ How to generate iconset
7. Execute script:
./generate_iconset.sh
./generate_iconset.sh ~/Desktop/path/to/project
8. Done! Icons are copied to your project’s **images.xcassets** folder.
9. (Optional) If upgrading from previous versions of icon generators, in *xCode*, navigate to **images.xcassets** folder in Project Navigator and move icon files to corresponding positions.
9. If upgrading from previous versions of icon generators, in *xCode*, navigate to **images.xcassets** folder in Project Navigator and move icon files to corresponding positions.
10. (Optional) You can omit entering path/to/project if you prefer to copy the resulting icons manually
# Iconset generator script
# usage: generate_iconset.sh ~/Projects/ios/destination/project/folder
mkdir -p iconset
rm iconset/*
#iPhone icons
sips -Z 29 --out iconset/iphoneSettings-29x29.png sourceIcon.png
sips -Z 58 --out iconset/iphoneSettings-29x29@2x.png sourceIcon.png
sips -Z 80 --out iconset/iphoneSpotlight-40x40@2x.png sourceIcon.png
sips -Z 57 --out iconset/iphoneApp-57x57.png sourceIcon.png
sips -Z 114 --out iconset/iphoneApp-57x57@2x.png sourceIcon.png
sips -Z 120 --out iconset/iphoneApp-60x60@2x.png sourceIcon.png
sips -Z 180 --out iconset/iphoneApp-60x60@3x.png sourceIcon.png
sips -Z 40 --out iconset/iphoneNotification-20pt@2x.png sourceIcon.png
sips -Z 60 --out iconset/iphoneNotification-20pt@3x.png sourceIcon.png
sips -Z 58 --out iconset/iphoneSettings-29pt@2x.png sourceIcon.png
sips -Z 87 --out iconset/iphoneSettings-29pt@3x.png sourceIcon.png
sips -Z 80 --out iconset/iphoneSpotlight-40pt@2x.png sourceIcon.png
sips -Z 120 --out iconset/iphoneSpotlight-40pt@3x.png sourceIcon.png
sips -Z 120 --out iconset/iphoneApp-60pt@2x.png sourceIcon.png
sips -Z 180 --out iconset/iphoneApp-60pt@3x.png sourceIcon.png
#iPad icons
sips -Z 29 --out iconset/ipadSettings-29x29.png sourceIcon.png
sips -Z 57 --out iconset/ipadSettings-29x29@2x.png sourceIcon.png
sips -Z 40 --out iconset/ipadSpotlight-40x40.png sourceIcon.png
sips -Z 80 --out iconset/ipadSpotlight-40x40@2x.png sourceIcon.png
sips -Z 50 --out iconset/ipadSpotlight-50x50.png sourceIcon.png
sips -Z 100 --out iconset/ipadSpotlight-50x50@2x.png sourceIcon.png
sips -Z 72 --out iconset/ipadApp-72x72.png sourceIcon.png
sips -Z 144 --out iconset/ipadApp-72x72@2x.png sourceIcon.png
sips -Z 76 --out iconset/ipadApp-76x76.png sourceIcon.png
sips -Z 152 --out iconset/ipadApp-76x76@2x.png sourceIcon.png
sips -Z 20 --out iconset/ipadNotification-20pt.png sourceIcon.png
sips -Z 40 --out iconset/ipadNotification-20pt@2x.png sourceIcon.png
sips -Z 29 --out iconset/ipadSettings-29pt.png sourceIcon.png
sips -Z 58 --out iconset/ipadSettings-29pt@2x.png sourceIcon.png
sips -Z 40 --out iconset/ipadSpotlight-40pt.png sourceIcon.png
sips -Z 80 --out iconset/ipadSpotlight-40pt@2x.png sourceIcon.png
sips -Z 76 --out iconset/ipadApp-76pt.png sourceIcon.png
sips -Z 152 --out iconset/ipadApp-76pt@2x.png sourceIcon.png
sips -Z 167 --out iconset/ipadProApp-83.5@2x.png sourceIcon.png
#App Store icon
cp sourceIcon.png iconset/appStore.png
cp iconset/*.png $HOME/Desktop/Projects/nst002_shadow-highlight/digestMediaNewsstand_iPhone/Images.xcassets/AppIcon.appiconset
\ No newline at end of file
if [ -d $1 ]; then
echo "Copying to $1/Assets.xcassets/AppIcon.appiconset/"
cp iconset/*.png $1/Assets.xcassets/AppIcon.appiconset/
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment