From 105d13dbb44feb6500c4573a1d223116bfe4601e Mon Sep 17 00:00:00 2001 From: Nonchalant Date: Tue, 28 Nov 2017 16:14:52 +0900 Subject: [PATCH 1/2] [add] support xcode 9.1 --- Package.resolved | 43 +++++++++++++++++++++++++ Sources/AppIconCore/Icon/AppIcons.swift | 29 ++++++++++------- Sources/AppIconCore/Icon/Platform.swift | 11 +++++-- 3 files changed, 69 insertions(+), 14 deletions(-) create mode 100644 Package.resolved diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..76b675f --- /dev/null +++ b/Package.resolved @@ -0,0 +1,43 @@ +{ + "object": { + "pins": [ + { + "package": "Commander", + "repositoryURL": "https://github.com/kylef/Commander", + "state": { + "branch": null, + "revision": "e5b50ad7b2e91eeb828393e89b03577b16be7db9", + "version": "0.8.0" + } + }, + { + "package": "Spectre", + "repositoryURL": "https://github.com/kylef/Spectre.git", + "state": { + "branch": null, + "revision": "e34d5687e1e9d865e3527dd58bc2f7464ef6d936", + "version": "0.8.0" + } + }, + { + "package": "SwiftShell", + "repositoryURL": "https://github.com/kareman/SwiftShell.git", + "state": { + "branch": null, + "revision": "cdb243acd5c6cf5a9628ff003df0457ae4d0d31a", + "version": "3.0.0" + } + }, + { + "package": "SwiftyJSON", + "repositoryURL": "https://github.com/SwiftyJSON/SwiftyJSON.git", + "state": { + "branch": null, + "revision": "dadbfcffd5f51e2b488a26e83f188d96755e5393", + "version": "3.1.4" + } + } + ] + }, + "version": 1 +} diff --git a/Sources/AppIconCore/Icon/AppIcons.swift b/Sources/AppIconCore/Icon/AppIcons.swift index 10b7f50..fff52b6 100644 --- a/Sources/AppIconCore/Icon/AppIcons.swift +++ b/Sources/AppIconCore/Icon/AppIcons.swift @@ -60,20 +60,23 @@ struct AppIconSet { public enum AppIcons: Float { // iPhone case notification = 20.0 - case settings = 29.0 - case spotlight = 40.0 - case iphoneApp = 60.0 + case settings = 29.0 + case spotlight = 40.0 + case iphoneApp = 60.0 + + // marketing + case marketing = 1024.0 // iPad - case iPadApp = 76.0 - case iPadProApp = 83.5 + case iPadApp = 76.0 + case iPadProApp = 83.5 // Mac - case macSmall2 = 16.0 - case macSmall = 32.0 - case macMedium = 128.0 - case macLarge = 256.0 - case macLarge2 = 512.0 + case macSmall2 = 16.0 + case macSmall = 32.0 + case macMedium = 128.0 + case macLarge = 256.0 + case macLarge2 = 512.0 static func all(with platforms: [Platform]) -> [AppIconSet] { return platforms @@ -84,7 +87,11 @@ public enum AppIcons: Float { } private func set(with platform: Platform = .iphone) -> AppIconSet { - let scales = (self == .iPadProApp) ? [Scale.twice] : nil + let scales = twiceOnly.contains(self) ? [Scale.twice] : nil return AppIconSet(baseSize: self.rawValue, platform: platform, scales: scales) } + + private var twiceOnly: [AppIcons] { + return [.iPadProApp] + } } diff --git a/Sources/AppIconCore/Icon/Platform.swift b/Sources/AppIconCore/Icon/Platform.swift index 123dacf..e8b4070 100644 --- a/Sources/AppIconCore/Icon/Platform.swift +++ b/Sources/AppIconCore/Icon/Platform.swift @@ -10,6 +10,7 @@ import Foundation public enum Platform: String { case iphone = "iphone" + case marketing = "ios-marketing" case ipad = "ipad" case mac = "mac" @@ -17,6 +18,8 @@ public enum Platform: String { switch self { case .iphone: return [.twice, .triple] + case .marketing: + return [.single] case .ipad, .mac: return [.single, .twice] } @@ -26,6 +29,8 @@ public enum Platform: String { switch self { case .iphone: return [.notification, .settings, .spotlight, .iphoneApp] + case .marketing: + return [.marketing] case .ipad: return [.notification, .settings, .spotlight, .iPadApp, .iPadProApp] case .mac: @@ -36,13 +41,13 @@ public enum Platform: String { public static func platforms(ipad: Bool, mac: Bool) -> [Platform] { switch (ipad, mac) { case (true, true): - return [.iphone, .ipad, .mac] + return [.iphone, .ipad, .marketing, .mac] case (true, false): - return [.iphone, .ipad] + return [.iphone, .ipad, .marketing] case (false, true): return [.mac] case (false, false): - return [.iphone] + return [.iphone, .marketing] } } } From 889b41b702a05000807ea11cb7cc6d35d1fd7d62 Mon Sep 17 00:00:00 2001 From: Nonchalant Date: Tue, 28 Nov 2017 19:40:27 +0900 Subject: [PATCH 2/2] [update] 0.3.2 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index aa2554d..2d2ce25 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ OS?=sierra PREFIX?=/usr/local PROJECT?=AppIcon RELEASE_BINARY_FOLDER?=$(BUILD_FOLDER)/release/$(PROJECT) -VERSION?=0.3.1 +VERSION?=0.3.2 build: swift build -c release -Xswiftc -static-stdlib