Skip to content

Commit 8dc323b

Browse files
committed
Merge branch 'assets'
2 parents 378f050 + 9c32b06 commit 8dc323b

File tree

10 files changed

+70
-3
lines changed

10 files changed

+70
-3
lines changed

Authenticator.xcodeproj/project.pbxproj

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@
8181
C958CC4F182A1FDD00DD47D0 /* OTPTokenType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OTPTokenType.h; sourceTree = "<group>"; };
8282
C958CC50182A1FDD00DD47D0 /* OTPTokenType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OTPTokenType.m; sourceTree = "<group>"; };
8383
C958CC53183043A600DD47D0 /* OTPTokenSerializationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OTPTokenSerializationTests.m; sourceTree = "<group>"; };
84+
C959A63C190A69120042DEC0 /* Icon.svg */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Icon.svg; sourceTree = "<group>"; };
85+
C959A63E190A69E60042DEC0 /* GenerateIcons.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = GenerateIcons.sh; sourceTree = "<group>"; };
8486
C9745D0917DA5861008B6E23 /* UIAlertView+Blocks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIAlertView+Blocks.h"; sourceTree = "<group>"; };
8587
C9745D0A17DA5861008B6E23 /* UIAlertView+Blocks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIAlertView+Blocks.m"; sourceTree = "<group>"; };
8688
C9776E3318518801003D53CB /* LICENSE.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE.txt; sourceTree = "<group>"; };
@@ -181,8 +183,8 @@
181183
29B97317FDCFA39411CA2CEA /* Resources */ = {
182184
isa = PBXGroup;
183185
children = (
186+
C9F75C921843CFFD00B6FA14 /* App Icon */,
184187
C9C6CCA11842E331000100C2 /* Images.xcassets */,
185-
C9F75C921843CFFD00B6FA14 /* iTunes Artwork */,
186188
C97B68C617D9226D005D1FE0 /* Settings.bundle */,
187189
);
188190
path = Resources;
@@ -320,13 +322,15 @@
320322
name = Cells;
321323
sourceTree = "<group>";
322324
};
323-
C9F75C921843CFFD00B6FA14 /* iTunes Artwork */ = {
325+
C9F75C921843CFFD00B6FA14 /* App Icon */ = {
324326
isa = PBXGroup;
325327
children = (
328+
C959A63C190A69120042DEC0 /* Icon.svg */,
329+
C959A63E190A69E60042DEC0 /* GenerateIcons.sh */,
326330
C9F75C931843D01500B6FA14 /* iTunesArtwork */,
327331
C9F75C941843D01500B6FA14 /* iTunesArtwork@2x */,
328332
);
329-
name = "iTunes Artwork";
333+
name = "App Icon";
330334
sourceTree = "<group>";
331335
};
332336
/* End PBXGroup section */
@@ -337,6 +341,7 @@
337341
buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Authenticator" */;
338342
buildPhases = (
339343
7D745802100A4933AC7F63D5 /* Check Pods Manifest.lock */,
344+
C959A63F190A6CB10042DEC0 /* Generate Icons */,
340345
1D60588D0D05DD3D006BFB54 /* Resources */,
341346
1D60588E0D05DD3D006BFB54 /* Sources */,
342347
1D60588F0D05DD3D006BFB54 /* Frameworks */,
@@ -453,6 +458,21 @@
453458
shellScript = "\"${SRCROOT}/Pods/Pods-resources.sh\"\n";
454459
showEnvVarsInLog = 0;
455460
};
461+
C959A63F190A6CB10042DEC0 /* Generate Icons */ = {
462+
isa = PBXShellScriptBuildPhase;
463+
buildActionMask = 2147483647;
464+
files = (
465+
);
466+
inputPaths = (
467+
);
468+
name = "Generate Icons";
469+
outputPaths = (
470+
);
471+
runOnlyForDeploymentPostprocessing = 0;
472+
shellPath = /bin/bash;
473+
shellScript = "PATH=/usr/local/bin:${PATH}\ncd \"${SRCROOT}/Authenticator/Resources/\"\n./GenerateIcons.sh";
474+
showEnvVarsInLog = 0;
475+
};
456476
/* End PBXShellScriptBuildPhase section */
457477

458478
/* Begin PBXSourcesBuildPhase section */
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
hash inkscape 2>/dev/null || { echo >&2 "Icon generation requires inkscape. Using existing icons instead."; exit 0; }
4+
hash pngcrush 2>/dev/null || { echo >&2 "Icon generation requires pngcrush. Using existing icons instead."; exit 0; }
5+
6+
# Generate App Icons
7+
inkscape -z -e "Icon-29@2x.png" -w 58 "Icon.svg";
8+
inkscape -z -e "Icon-40@2x.png" -w 80 "Icon.svg";
9+
inkscape -z -e "Icon-60@2x.png" -w 120 "Icon.svg";
10+
11+
for file in Icon-*.png; do
12+
pngcrush -rem alla -ow -res 144 "$file" "_$file";
13+
done
14+
15+
mv Icon-*.png "Images.xcassets/AppIcon.appiconset/"
16+
17+
# Generate iTunes Artwork
18+
inkscape -z -e "iTunesArtwork" -w 512 "Icon.svg";
19+
inkscape -z -e "iTunesArtwork@2x" -w 1024 "Icon.svg";
20+
21+
pngcrush -rem alla -ow -res 144 "iTunesArtwork@2x" "_iTunesArtwork@2x";
22+
pngcrush -rem alla -ow "iTunesArtwork" "_iTunesArtwork";

Authenticator/Resources/Icon.svg

Lines changed: 25 additions & 0 deletions
Loading
Loading
Loading
Loading
Loading
Loading

Authenticator/Resources/iTunesArtwork

-9.11 KB
Binary file not shown.
-20.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)