icons: change app icon screen was not showing icon previews - added tiny 75x75 imageset assets since iOS 18+ cannot use AppIconSet for UIImage(named:)
@@ -8,6 +8,8 @@
|
||||
<key>name</key>
|
||||
<string>Original</string>
|
||||
<key>imageName</key>
|
||||
<string>App</string>
|
||||
<key>iconName</key>
|
||||
<string>AppIcon</string>
|
||||
</dict>
|
||||
</array>
|
||||
@@ -18,66 +20,88 @@
|
||||
<string>Blue</string>
|
||||
<key>imageName</key>
|
||||
<string>Blue</string>
|
||||
<key>iconName</key>
|
||||
<string>BlueIcon</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Dark</string>
|
||||
<key>imageName</key>
|
||||
<string>Dark</string>
|
||||
<key>iconName</key>
|
||||
<string>DarkIcon</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Honeydew</string>
|
||||
<key>imageName</key>
|
||||
<string>Honeydew</string>
|
||||
<key>iconName</key>
|
||||
<string>HoneydewIcon</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Pride</string>
|
||||
<key>imageName</key>
|
||||
<string>Pride</string>
|
||||
<key>iconName</key>
|
||||
<string>PrideIcon</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Sandy</string>
|
||||
<key>imageName</key>
|
||||
<string>Sandy</string>
|
||||
<key>iconName</key>
|
||||
<string>SandyIcon</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Sky</string>
|
||||
<key>imageName</key>
|
||||
<string>Sky</string>
|
||||
<key>iconName</key>
|
||||
<string>SkyIcon</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Snow</string>
|
||||
<key>imageName</key>
|
||||
<string>Snow</string>
|
||||
<key>iconName</key>
|
||||
<string>SnowIcon</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Starburst</string>
|
||||
<key>imageName</key>
|
||||
<string>Starburst</string>
|
||||
<key>iconName</key>
|
||||
<string>StarburstIcon</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Storm</string>
|
||||
<key>imageName</key>
|
||||
<string>Storm</string>
|
||||
<key>iconName</key>
|
||||
<string>StormIcon</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Vista</string>
|
||||
<key>imageName</key>
|
||||
<string>Vista</string>
|
||||
<key>iconName</key>
|
||||
<string>VistaIcon</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Winter</string>
|
||||
<key>imageName</key>
|
||||
<string>Winter</string>
|
||||
<key>iconName</key>
|
||||
<string>WinterIcon</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
|
||||
BIN
AltStore/Resources/Icons.xcassets/Classic/App.imageset/App.png
vendored
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
12
AltStore/Resources/Icons.xcassets/Classic/App.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "1024.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
6
AltStore/Resources/Icons.xcassets/Classic/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
AltStore/Resources/Icons.xcassets/Modern/Blue.imageset/Blue.png
vendored
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
12
AltStore/Resources/Icons.xcassets/Modern/Blue.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Blue.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 313 KiB After Width: | Height: | Size: 313 KiB |
12
AltStore/Resources/Icons.xcassets/Modern/Dark.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Dark.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
AltStore/Resources/Icons.xcassets/Modern/Dark.imageset/Dark.png
vendored
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 102 KiB |
12
AltStore/Resources/Icons.xcassets/Modern/Honeydew.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Honeydew.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
AltStore/Resources/Icons.xcassets/Modern/Honeydew.imageset/Honeydew.png
vendored
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 373 KiB After Width: | Height: | Size: 373 KiB |
12
AltStore/Resources/Icons.xcassets/Modern/Pride.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Pride.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
AltStore/Resources/Icons.xcassets/Modern/Pride.imageset/Pride.png
vendored
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 719 KiB After Width: | Height: | Size: 719 KiB |
12
AltStore/Resources/Icons.xcassets/Modern/Sandy.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Sandy.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
AltStore/Resources/Icons.xcassets/Modern/Sandy.imageset/Sandy.png
vendored
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 352 KiB After Width: | Height: | Size: 352 KiB |
12
AltStore/Resources/Icons.xcassets/Modern/Sky.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Sky.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
AltStore/Resources/Icons.xcassets/Modern/Sky.imageset/Sky.png
vendored
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 135 KiB |
12
AltStore/Resources/Icons.xcassets/Modern/Snow.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Snow.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
AltStore/Resources/Icons.xcassets/Modern/Snow.imageset/Snow.png
vendored
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 453 KiB After Width: | Height: | Size: 453 KiB |
12
AltStore/Resources/Icons.xcassets/Modern/Starburst.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Starburst.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
AltStore/Resources/Icons.xcassets/Modern/Starburst.imageset/Starburst.png
vendored
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 181 KiB After Width: | Height: | Size: 181 KiB |
12
AltStore/Resources/Icons.xcassets/Modern/Storm.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Storm.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
AltStore/Resources/Icons.xcassets/Modern/Storm.imageset/Storm.png
vendored
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 464 KiB After Width: | Height: | Size: 464 KiB |
12
AltStore/Resources/Icons.xcassets/Modern/Vista.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Vista.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
AltStore/Resources/Icons.xcassets/Modern/Vista.imageset/Vista.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
12
AltStore/Resources/Icons.xcassets/Modern/Winter.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Winter.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
AltStore/Resources/Icons.xcassets/Modern/Winter.imageset/Winter.png
vendored
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 165 KiB After Width: | Height: | Size: 165 KiB |
@@ -20,15 +20,17 @@ extension UIApplication
|
||||
|
||||
private final class AltIcon: Decodable
|
||||
{
|
||||
static let defaultIconName: String = "AppIcon"
|
||||
static let defaultName: String = "Original"
|
||||
|
||||
var name: String
|
||||
var imageName: String
|
||||
var iconName: String
|
||||
|
||||
private enum CodingKeys: String, CodingKey
|
||||
{
|
||||
case name
|
||||
case imageName
|
||||
case iconName
|
||||
}
|
||||
|
||||
required init(from decoder: Decoder) throws
|
||||
@@ -36,6 +38,7 @@ private final class AltIcon: Decodable
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.name = try container.decode(String.self, forKey: .name)
|
||||
self.imageName = try container.decode(String.self, forKey: .imageName)
|
||||
self.iconName = try container.decode(String.self, forKey: .iconName)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,20 +149,14 @@ private extension AltAppIconsViewController
|
||||
config.textProperties.font = font
|
||||
config.textProperties.color = .label
|
||||
|
||||
// we have to do this hardcodded name hack for .appiconset
|
||||
// else one can supply the artifacts via .imageset
|
||||
let image: UIImage? =
|
||||
UIImage(named: "\(icon.imageName)76x76@2x~ipad") ??
|
||||
UIImage(named: "\(icon.imageName)60x60@2x") ??
|
||||
UIImage(named: icon.imageName)
|
||||
|
||||
let image = UIImage(named: icon.imageName)
|
||||
config.image = image
|
||||
config.imageProperties.maximumSize = CGSize(width: imageWidth, height: imageWidth)
|
||||
config.imageProperties.cornerRadius = imageWidth / 5.0 // Copied from AppIconImageView
|
||||
|
||||
cell.contentConfiguration = config
|
||||
|
||||
if UIApplication.shared.alternateIconName == icon.imageName || (UIApplication.shared.alternateIconName == nil && icon.imageName == AltIcon.defaultIconName)
|
||||
if UIApplication.shared.alternateIconName == icon.iconName || (UIApplication.shared.alternateIconName == nil && icon.name == AltIcon.defaultName)
|
||||
{
|
||||
cell.accessories = [.checkmark(options: .init(tintColor: .white))]
|
||||
}
|
||||
@@ -167,7 +164,7 @@ private extension AltAppIconsViewController
|
||||
{
|
||||
cell.accessories = []
|
||||
}
|
||||
|
||||
|
||||
var backgroundConfiguration = UIBackgroundConfiguration.listPlainCell()
|
||||
backgroundConfiguration.backgroundColorTransformer = UIConfigurationColorTransformer { [weak cell] c in
|
||||
if let state = cell?.configurationState, state.isHighlighted
|
||||
@@ -205,8 +202,8 @@ extension AltAppIconsViewController
|
||||
collectionView.reloadData()
|
||||
|
||||
// If assigning primary icon, pass "nil" as alternate icon name.
|
||||
let imageName = (icon.imageName == "AppIcon") ? nil : icon.imageName
|
||||
UIApplication.shared.setAlternateIconName(imageName) { error in
|
||||
let iconName = (icon.name == AltIcon.defaultName) ? nil : icon.iconName
|
||||
UIApplication.shared.setAlternateIconName(iconName) { error in
|
||||
if let error
|
||||
{
|
||||
let alertController = UIAlertController(title: NSLocalizedString("Unable to Change App Icon", comment: ""),
|
||||
|
||||