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

Add WatchKit marketing and missing WatchKit icon sizes. #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions convertappicon/Config.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import Foundation


enum Idiom: String, Encodable {

case phone = "iphone"
case pad = "ipad"
case marketing = "ios-marketing"
case watch = "watch"
case watchMarketing = "watch-marketing"
}

enum Role: String, Encodable {
Expand Down Expand Up @@ -98,12 +98,18 @@ struct Configuration {

Config(size: 24, idiom: .watch, scale: 2, role: .notificationCenter, subtype: "38mm"),
Config(size: 27.5, idiom: .watch, scale: 2, role: .notificationCenter, subtype: "42mm"),

Config(size: 29, idiom: .watch, scale: 2, role: .companionSettings),
Config(size: 29, idiom: .watch, scale: 3, role: .companionSettings),
Config(size: 40, idiom: .watch, scale: 2, role: .appLauncher, subtype: "38mm"),
Config(size: 44, idiom: .watch, scale: 2, role: .longLook, subtype: "42mm"),

Config(size: 86, idiom: .watch, scale: 2, role: .quickLook, subtype: "38mm"),
Config(size: 98, idiom: .watch, scale: 2, role: .quickLook, subtype: "42mm"),
Config(size: 108, idiom: .watch, scale: 2, role: .quickLook, subtype: "44mm"),

Config(size: 40, idiom: .watch, scale: 2, role: .appLauncher, subtype: "38mm"),
Config(size: 44, idiom: .watch, scale: 2, role: .appLauncher, subtype: "40mm"),
Config(size: 50, idiom: .watch, scale: 2, role: .appLauncher, subtype: "44mm"),

Config(size: 1024, idiom: .watchMarketing, scale: 1),
Config(size: 1024, idiom: .marketing, scale: 1)]
}
2 changes: 1 addition & 1 deletion convertappicon/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ if options.contains("-s") {
configs.append(contentsOf: Configuration.list.filter { $0.idiom == .marketing } )
}
if options.contains("watch") {
configs.append(contentsOf: Configuration.list.filter { $0.idiom == .watch } )
configs.append(contentsOf: Configuration.list.filter { $0.idiom == .watch || $0.idiom == .watchMarketing } )
}
if configs.isEmpty {
print("Warning: -s given but no category found.")
Expand Down