Fix icon switching on iPad (#1310)
The switching of icons didn't work on the iPad anymore (See https://norden.social/@betamax65/110088664994961476). This might be a temporary fix, depending on what caused the bug (which I couldn't determine). For now, one icon in the set seemingly must have a complete iPad icon set, which is achieved with the standard icon. Furthermore, an assert statement helps to determine the problem with the icons. This statement won't be compiled into release builds. Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
|
@ -88,7 +88,10 @@ struct IconSelectorView: View {
|
||||||
if icon.rawValue == Icon.primary.rawValue {
|
if icon.rawValue == Icon.primary.rawValue {
|
||||||
UIApplication.shared.setAlternateIconName(nil)
|
UIApplication.shared.setAlternateIconName(nil)
|
||||||
} else {
|
} else {
|
||||||
UIApplication.shared.setAlternateIconName(icon.appIconName)
|
UIApplication.shared.setAlternateIconName(icon.appIconName) { err in
|
||||||
|
guard let err else { return }
|
||||||
|
assertionFailure("\(err.localizedDescription) - Icon name: \(icon.appIconName)")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} label: {
|
} label: {
|
||||||
ZStack(alignment: .bottomTrailing) {
|
ZStack(alignment: .bottomTrailing) {
|
||||||
|
|
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/100.png
Executable file
After Width: | Height: | Size: 16 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/1024.png
Executable file
After Width: | Height: | Size: 846 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/114.png
Executable file
After Width: | Height: | Size: 20 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/120.png
Executable file
After Width: | Height: | Size: 22 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/128.png
Executable file
After Width: | Height: | Size: 24 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/144.png
Executable file
After Width: | Height: | Size: 30 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/152.png
Executable file
After Width: | Height: | Size: 33 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/16.png
Executable file
After Width: | Height: | Size: 819 B |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/167.png
Executable file
After Width: | Height: | Size: 39 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/180.png
Executable file
After Width: | Height: | Size: 45 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/20.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/256.png
Executable file
After Width: | Height: | Size: 84 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/29.png
Executable file
After Width: | Height: | Size: 2 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/32.png
Executable file
After Width: | Height: | Size: 2.3 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/40.png
Executable file
After Width: | Height: | Size: 3.3 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/50.png
Executable file
After Width: | Height: | Size: 4.7 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/512.png
Executable file
After Width: | Height: | Size: 308 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/57.png
Executable file
After Width: | Height: | Size: 5.9 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/58.png
Executable file
After Width: | Height: | Size: 6 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/60.png
Executable file
After Width: | Height: | Size: 6.3 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/64.png
Executable file
After Width: | Height: | Size: 7.1 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/72.png
Executable file
After Width: | Height: | Size: 8.7 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/76.png
Executable file
After Width: | Height: | Size: 9.7 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/80.png
Executable file
After Width: | Height: | Size: 10 KiB |
BIN
IceCubesApp/Assets.xcassets/AppIcon.appiconset/87.png
Executable file
After Width: | Height: | Size: 12 KiB |
300
IceCubesApp/Assets.xcassets/AppIcon.appiconset/Contents.json
Normal file → Executable file
|
@ -1,64 +1,284 @@
|
||||||
{
|
{
|
||||||
"images" : [
|
"images": [
|
||||||
{
|
{
|
||||||
"filename" : "icon.png",
|
"size": "60x60",
|
||||||
"idiom" : "universal",
|
"expected-size": "180",
|
||||||
"platform" : "ios",
|
"filename": "180.png",
|
||||||
"size" : "1024x1024"
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"scale": "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "mac",
|
"size": "40x40",
|
||||||
"scale" : "1x",
|
"expected-size": "80",
|
||||||
"size" : "16x16"
|
"filename": "80.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "mac",
|
"size": "40x40",
|
||||||
"scale" : "2x",
|
"expected-size": "120",
|
||||||
"size" : "16x16"
|
"filename": "120.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"scale": "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "mac",
|
"size": "60x60",
|
||||||
"scale" : "1x",
|
"expected-size": "120",
|
||||||
"size" : "32x32"
|
"filename": "120.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "mac",
|
"size": "57x57",
|
||||||
"scale" : "2x",
|
"expected-size": "57",
|
||||||
"size" : "32x32"
|
"filename": "57.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"scale": "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "mac",
|
"size": "29x29",
|
||||||
"scale" : "1x",
|
"expected-size": "58",
|
||||||
"size" : "128x128"
|
"filename": "58.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "mac",
|
"size": "29x29",
|
||||||
"scale" : "2x",
|
"expected-size": "29",
|
||||||
"size" : "128x128"
|
"filename": "29.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"scale": "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "mac",
|
"size": "29x29",
|
||||||
"scale" : "1x",
|
"expected-size": "87",
|
||||||
"size" : "256x256"
|
"filename": "87.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"scale": "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "mac",
|
"size": "57x57",
|
||||||
"scale" : "2x",
|
"expected-size": "114",
|
||||||
"size" : "256x256"
|
"filename": "114.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "mac",
|
"size": "20x20",
|
||||||
"scale" : "1x",
|
"expected-size": "40",
|
||||||
"size" : "512x512"
|
"filename": "40.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "mac",
|
"size": "20x20",
|
||||||
"scale" : "2x",
|
"expected-size": "60",
|
||||||
"size" : "512x512"
|
"filename": "60.png",
|
||||||
}
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
],
|
"idiom": "iphone",
|
||||||
"info" : {
|
"scale": "3x"
|
||||||
"author" : "xcode",
|
},
|
||||||
"version" : 1
|
{
|
||||||
|
"size": "1024x1024",
|
||||||
|
"filename": "1024.png",
|
||||||
|
"expected-size": "1024",
|
||||||
|
"idiom": "ios-marketing",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "40x40",
|
||||||
|
"expected-size": "80",
|
||||||
|
"filename": "80.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "72x72",
|
||||||
|
"expected-size": "72",
|
||||||
|
"filename": "72.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "76x76",
|
||||||
|
"expected-size": "152",
|
||||||
|
"filename": "152.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "50x50",
|
||||||
|
"expected-size": "100",
|
||||||
|
"filename": "100.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "29x29",
|
||||||
|
"expected-size": "58",
|
||||||
|
"filename": "58.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "76x76",
|
||||||
|
"expected-size": "76",
|
||||||
|
"filename": "76.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "29x29",
|
||||||
|
"expected-size": "29",
|
||||||
|
"filename": "29.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "50x50",
|
||||||
|
"expected-size": "50",
|
||||||
|
"filename": "50.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "72x72",
|
||||||
|
"expected-size": "144",
|
||||||
|
"filename": "144.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "40x40",
|
||||||
|
"expected-size": "40",
|
||||||
|
"filename": "40.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "83.5x83.5",
|
||||||
|
"expected-size": "167",
|
||||||
|
"filename": "167.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "20x20",
|
||||||
|
"expected-size": "20",
|
||||||
|
"filename": "20.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "20x20",
|
||||||
|
"expected-size": "40",
|
||||||
|
"filename": "40.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "128x128",
|
||||||
|
"expected-size": "128",
|
||||||
|
"filename": "128.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "mac",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "256x256",
|
||||||
|
"expected-size": "256",
|
||||||
|
"filename": "256.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "mac",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "128x128",
|
||||||
|
"expected-size": "256",
|
||||||
|
"filename": "256.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "mac",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "256x256",
|
||||||
|
"expected-size": "512",
|
||||||
|
"filename": "512.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "mac",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "32x32",
|
||||||
|
"expected-size": "32",
|
||||||
|
"filename": "32.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "mac",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "512x512",
|
||||||
|
"expected-size": "512",
|
||||||
|
"filename": "512.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "mac",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "16x16",
|
||||||
|
"expected-size": "16",
|
||||||
|
"filename": "16.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "mac",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "16x16",
|
||||||
|
"expected-size": "32",
|
||||||
|
"filename": "32.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "mac",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "32x32",
|
||||||
|
"expected-size": "64",
|
||||||
|
"filename": "64.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "mac",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "512x512",
|
||||||
|
"expected-size": "1024",
|
||||||
|
"filename": "1024.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "mac",
|
||||||
|
"scale": "2x"
|
||||||
}
|
}
|
||||||
|
]
|
||||||
}
|
}
|
Before Width: | Height: | Size: 295 KiB |