Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Commit

Permalink
Initial support for iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
wiomoc committed Sep 26, 2020
1 parent 96fe005 commit a01acc0
Show file tree
Hide file tree
Showing 6 changed files with 230 additions and 325 deletions.
66 changes: 46 additions & 20 deletions image/scale.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,50 @@
#!/bin/bash
scale () {
mkdir dist

icon() {
convert icon.png -resize $1x$1\! dist/icon_$1.png
}

mkdir dist
scale 60
scale 120
scale 76
scale 152
scale 40
scale 80
scale 57
scale 114
scale 72
scale 144
scale 29
scale 58
scale 50
scale 100
scale 48
scale 96
scale 192
scale 32
icon 60
icon 120
icon 180
icon 76
icon 152
icon 20
icon 40
icon 80
icon 57
icon 87
icon 114
icon 72
icon 144
icon 167
icon 29
icon 58
icon 50
icon 100
icon 48
icon 96
icon 192
icon 32
convert icon.png -resize 1024x1024! -background '#CA190C' -extent 1024x1024 -gravity center dist/icon_1024.png

splash() {
x=$(($1 < $2 ? $1 : $2))
x=$(echo $x/1.5 | bc)
convert splash.png -resize $x dist/tmp.bmp
convert dist/tmp.bmp -background '#fafbfd' -gravity center -extent $1x$2 dist/splash_$1x$2.png
}

splash 320 480
splash 640 960
splash 768 1024
splash 1536 2048
splash 1024 768
splash 2048 1536
splash 640 1136
splash 750 1334
splash 1242 2208
splash 2208 1242

rm dist/tmp.bmp
Binary file added image/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 19 additions & 2 deletions src-cordova/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<platform name="android">
<allow-intent href="market:*"/>
<icon src="../image/icon.png" />
<icon src="../image/icon.png"/>
</platform>
<platform name="ios">
<allow-intent href="itms:*"/>
Expand All @@ -32,11 +32,13 @@
<!-- iPhone / iPod Touch -->
<icon src="../image/dist/icon_60.png" width="60" height="60"/>
<icon src="../image/dist/icon_120.png" width="120" height="120"/>
<icon src="../image/dist/icon_180.png" width="180" height="180"/>
<!-- iPad -->
<icon src="../image/dist/icon_76.png" width="76" height="76"/>
<icon src="../image/dist/icon_152.png" width="152" height="152"/>
<!-- iOS 6.1 -->
<!-- Spotlight Icon -->
<icon src="../image/dist/icon_20.png" width="20" height="20"/>
<icon src="../image/dist/icon_40.png" width="40" height="40"/>
<icon src="../image/dist/icon_80.png" width="80" height="80"/>
<!-- iPhone / iPod Touch -->
Expand All @@ -48,8 +50,23 @@
<!-- iPhone Spotlight and Settings Icon -->
<icon src="../image/dist/icon_29.png" width="29" height="29"/>
<icon src="../image/dist/icon_58.png" width="58" height="58"/>
<icon src="../image/dist/icon_87.png" width="87" height="87"/>
<!-- iPad Spotlight and Settings Icon -->
<icon src="../image/dist/icon_50.png" width="50" height="50"/>
<icon src="../image/dist/icon_100.png" width="100" height="100"/>

<icon src="../image/dist/icon_167.png" width="167" height="167"/>
<icon src="../image/dist/icon_1024.png" width="1024" height="1024"/>

<!-- TODO https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/ not yet installed -->
<splash src="../image/dist/splash_320x480.png" width="320" height="480"/>
<splash src="../image/dist/splash_640x960.png" width="640" height="960"/>
<splash src="../image/dist/splash_768x1024.png" width="768" height="1024"/>
<splash src="../image/dist/splash_1536x2048.png" width="1536" height="2048"/>
<splash src="../image/dist/splash_1024x768.png" width="1024" height="768"/>
<splash src="../image/dist/splash_2048x1536.png" width="2048" height="1536"/>
<splash src="../image/dist/splash_640x1136.png" width="640" height="1136"/>
<splash src="../image/dist/splash_750x1334.png" width="750" height="1334"/>
<splash src="../image/dist/splash_1242x2208.png" width="1242" height="2208"/>
<splash src="../image/dist/splash_2208x1242.png" width="2208" height="1242"/>
</platform>
</widget>
Loading

0 comments on commit a01acc0

Please sign in to comment.