diff --git a/LoopFollow.xcodeproj/project.pbxproj b/LoopFollow.xcodeproj/project.pbxproj index 035544902..f9c394aac 100644 --- a/LoopFollow.xcodeproj/project.pbxproj +++ b/LoopFollow.xcodeproj/project.pbxproj @@ -2389,6 +2389,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = ECA3EFB4037410B4973BB632 /* Pods-LoopFollow.debug.xcconfig */; buildSettings = { + ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = "LoopFollow/Loop Follow.entitlements"; CODE_SIGN_STYLE = Automatic; @@ -2412,6 +2413,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 059B0FA59AABFE72FE13DDDA /* Pods-LoopFollow.release.xcconfig */; buildSettings = { + ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = "LoopFollow/Loop Follow.entitlements"; CODE_SIGN_STYLE = Automatic; diff --git a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/1024-dark.png b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/1024-dark.png new file mode 100644 index 000000000..473141165 Binary files /dev/null and b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/1024-dark.png differ diff --git a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/1024-tinted.png b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/1024-tinted.png new file mode 100644 index 000000000..494fddc3a Binary files /dev/null and b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/1024-tinted.png differ diff --git a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/120-1.png b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/120-1.png deleted file mode 100644 index caf908791..000000000 Binary files a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/120-1.png and /dev/null differ diff --git a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/120.png b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/120.png deleted file mode 100644 index caf908791..000000000 Binary files a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/120.png and /dev/null differ diff --git a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/152.png b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/152.png deleted file mode 100644 index 6305baca7..000000000 Binary files a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/152.png and /dev/null differ diff --git a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/167.png b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/167.png deleted file mode 100644 index 1518987e4..000000000 Binary files a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/167.png and /dev/null differ diff --git a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/180.png b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/180.png deleted file mode 100644 index 503d8e9bc..000000000 Binary files a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/180.png and /dev/null differ diff --git a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/20.png b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/20.png deleted file mode 100644 index be314b4be..000000000 Binary files a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/20.png and /dev/null differ diff --git a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/29.png b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/29.png deleted file mode 100644 index f519e0ef7..000000000 Binary files a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/29.png and /dev/null differ diff --git a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/40-1.png b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/40-1.png deleted file mode 100644 index 8d01111b5..000000000 Binary files a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/40-1.png and /dev/null differ diff --git a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/40-2.png b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/40-2.png deleted file mode 100644 index 8d01111b5..000000000 Binary files a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/40-2.png and /dev/null differ diff --git a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/40.png b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/40.png deleted file mode 100644 index 8d01111b5..000000000 Binary files a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/40.png and /dev/null differ diff --git a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/58-1.png b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/58-1.png deleted file mode 100644 index 176084a43..000000000 Binary files a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/58-1.png and /dev/null differ diff --git a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/58.png b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/58.png deleted file mode 100644 index 176084a43..000000000 Binary files a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/58.png and /dev/null differ diff --git a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/60.png b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/60.png deleted file mode 100644 index b0866469b..000000000 Binary files a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/60.png and /dev/null differ diff --git a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/76.png b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/76.png deleted file mode 100644 index ed3874ed0..000000000 Binary files a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/76.png and /dev/null differ diff --git a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/80-1.png b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/80-1.png deleted file mode 100644 index 40211f8c6..000000000 Binary files a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/80-1.png and /dev/null differ diff --git a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/80.png b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/80.png deleted file mode 100644 index 40211f8c6..000000000 Binary files a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/80.png and /dev/null differ diff --git a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/87.png b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/87.png deleted file mode 100644 index bf2b5bd7c..000000000 Binary files a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/87.png and /dev/null differ diff --git a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json index e59407748..c928251a4 100644 --- a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,116 +1,41 @@ { - "images" : [ - { - "filename" : "40.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" - }, - { - "filename" : "60.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" - }, - { - "filename" : "58.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "filename" : "87.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" - }, - { - "filename" : "80.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "filename" : "120.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" - }, - { - "filename" : "120-1.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "filename" : "180.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" - }, - { - "filename" : "20.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "20x20" - }, - { - "filename" : "40-1.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "20x20" - }, - { - "filename" : "29.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "29x29" - }, - { - "filename" : "58-1.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "29x29" - }, - { - "filename" : "40-2.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "40x40" - }, - { - "filename" : "80-1.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "40x40" - }, - { - "filename" : "76.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "76x76" - }, - { - "filename" : "152.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "76x76" - }, - { - "filename" : "167.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "83.5x83.5" - }, - { - "filename" : "1024.png", - "idiom" : "ios-marketing", - "scale" : "1x", - "size" : "1024x1024" + "images" : [ + { + "filename" : "1024.png", + "idiom" : "universal", + "platform" : "ios", + "scale" : "1x", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "1024-dark.png", + "idiom" : "universal", + "platform" : "ios", + "scale" : "1x", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "filename" : "1024-tinted.png", + "idiom" : "universal", + "platform" : "ios", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } } diff --git a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/convert_icon.sh b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/convert_icon.sh index f8dfc48c0..9981f3db5 100755 --- a/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/convert_icon.sh +++ b/LoopFollow/Resources/Assets.xcassets/AppIcon.appiconset/convert_icon.sh @@ -1,8 +1,11 @@ #!/bin/bash -# Convert SVG icon to all required iOS app icon PNG sizes using Inkscape +# Convert SVG icon to required iOS app icon PNG sizes (light, dark, tinted) using Inkscape + +set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SVG_PATH="$SCRIPT_DIR/loopfollow-icon.svg" +CONTENTS_PATH="$SCRIPT_DIR/Contents.json" if [ ! -f "$SVG_PATH" ]; then echo "Error: SVG file not found at $SVG_PATH" @@ -14,58 +17,144 @@ if ! command -v inkscape &> /dev/null; then exit 1 fi -echo "Converting SVG to iOS app icon PNGs using Inkscape..." +TMP_DIR="$(mktemp -d)" +trap 'rm -rf "$TMP_DIR"' EXIT + +LIGHT_SVG="$TMP_DIR/light.svg" +DARK_SVG="$TMP_DIR/dark.svg" +TINTED_SVG="$TMP_DIR/tinted.svg" + +cp "$SVG_PATH" "$LIGHT_SVG" +cp "$SVG_PATH" "$DARK_SVG" +cp "$SVG_PATH" "$TINTED_SVG" + +echo "Preparing dark/tinted SVG variants without changing geometry..." + +# Dark mode: keep geometry unchanged, force dark perimeter and suppress bright edge glare. +sed -i '' 's/#F8F9FA/#020617/g' "$DARK_SVG" +sed -i '' 's/#FFFFFF/#0A0F1A/g' "$DARK_SVG" +sed -i '' 's/#F0F2F5/#020617/g' "$DARK_SVG" +sed -i '' 's/opacity="0.8"/opacity="0"/g' "$DARK_SVG" +sed -i '' 's/opacity="0.25"/opacity="0"/g' "$DARK_SVG" +sed -i '' 's/stop-opacity:0.6/stop-opacity:0/g' "$DARK_SVG" +sed -i '' 's/stop-opacity:0.5/stop-opacity:0.04/g' "$DARK_SVG" +sed -i '' 's/stop-opacity:0.4/stop-opacity:0.06/g' "$DARK_SVG" +sed -i '' 's/stop-opacity:0.3/stop-opacity:0/g' "$DARK_SVG" +sed -i '' 's/stop-opacity:0.25/stop-opacity:0.08/g' "$DARK_SVG" +sed -i '' 's/stop-opacity:0.2/stop-opacity:0.04/g' "$DARK_SVG" +sed -i '' 's/stop-opacity:0.15/stop-opacity:0.08/g' "$DARK_SVG" +sed -i '' 's/stop-opacity:0.1/stop-opacity:0.03/g' "$DARK_SVG" +sed -i '' 's/stop-opacity:0.08/stop-opacity:0/g' "$DARK_SVG" +sed -i '' 's/stop-opacity:0.05/stop-opacity:0.02/g' "$DARK_SVG" + +# Tinted mode: true high-contrast monochrome source so iOS tinting is visibly distinct. +sed -i '' 's/#F8F9FA/#000000/g' "$TINTED_SVG" +sed -i '' 's/#FFFFFF/#0A0A0A/g' "$TINTED_SVG" +sed -i '' 's/#F0F2F5/#000000/g' "$TINTED_SVG" +sed -i '' 's/opacity="0.8"/opacity="0"/g' "$TINTED_SVG" +sed -i '' 's/opacity="0.25"/opacity="0"/g' "$TINTED_SVG" +sed -i '' 's/#5BA3F5/#FFFFFF/g' "$TINTED_SVG" +sed -i '' 's/#4A90E2/#FFFFFF/g' "$TINTED_SVG" +sed -i '' 's/#3A7BC8/#FFFFFF/g' "$TINTED_SVG" +sed -i '' 's/stop-opacity:0.6/stop-opacity:0/g' "$TINTED_SVG" +sed -i '' 's/stop-opacity:0.5/stop-opacity:0/g' "$TINTED_SVG" +sed -i '' 's/stop-opacity:0.4/stop-opacity:0.02/g' "$TINTED_SVG" +sed -i '' 's/stop-opacity:0.3/stop-opacity:0/g' "$TINTED_SVG" +sed -i '' 's/stop-opacity:0.25/stop-opacity:0/g' "$TINTED_SVG" +sed -i '' 's/stop-opacity:0.2/stop-opacity:0/g' "$TINTED_SVG" +sed -i '' 's/stop-opacity:0.15/stop-opacity:0/g' "$TINTED_SVG" +sed -i '' 's/stop-opacity:0.1/stop-opacity:0/g' "$TINTED_SVG" +sed -i '' 's/stop-opacity:0.08/stop-opacity:0/g' "$TINTED_SVG" +sed -i '' 's/stop-opacity:0.05/stop-opacity:0/g' "$TINTED_SVG" + +echo "Converting SVG variants to iOS app icon PNGs using Inkscape..." echo "Source: $SVG_PATH" echo "" -# iOS app icon sizes (filename size pairs) -icon_sizes=( - "20.png 20" - "29.png 29" - "40.png 40" - "40-1.png 40" - "40-2.png 40" - "58.png 58" - "58-1.png 58" - "60.png 60" - "76.png 76" - "80.png 80" - "80-1.png 80" - "87.png 87" - "120.png 120" - "120-1.png 120" - "152.png 152" - "167.png 167" - "180.png 180" - "1024.png 1024" -) +ICON_SIZE=1024 +OUTPUT_LIGHT="$SCRIPT_DIR/1024.png" +OUTPUT_DARK="$SCRIPT_DIR/1024-dark.png" +OUTPUT_TINTED="$SCRIPT_DIR/1024-tinted.png" + +# Remove only generated app icon files. +rm -f "$OUTPUT_LIGHT" "$OUTPUT_DARK" "$OUTPUT_TINTED" success_count=0 -total_count=${#icon_sizes[@]} - -for entry in "${icon_sizes[@]}"; do - filename=$(echo $entry | cut -d' ' -f1) - size=$(echo $entry | cut -d' ' -f2) - png_path="$SCRIPT_DIR/$filename" - - # Inkscape export command - if inkscape "$SVG_PATH" --export-filename="$png_path" --export-width=$size --export-height=$size --export-type=png 2>/dev/null; then - echo "✓ Created $filename (${size}x${size})" - ((success_count++)) +total_count=3 + +export_png() { + local source_svg="$1" + local output_path="$2" + local output_name + output_name="$(basename "$output_path")" + + if inkscape "$source_svg" --export-filename="$output_path" --export-width="$ICON_SIZE" --export-height="$ICON_SIZE" --export-type=png 2>/dev/null; then + echo "✓ Created $output_name (${ICON_SIZE}x${ICON_SIZE})" + ((success_count+=1)) else - echo "✗ Error creating $filename" + echo "✗ Error creating $output_name" fi -done +} + +export_png "$LIGHT_SVG" "$OUTPUT_LIGHT" +export_png "$DARK_SVG" "$OUTPUT_DARK" +export_png "$TINTED_SVG" "$OUTPUT_TINTED" echo "" echo "✓ Successfully created $success_count/$total_count icon files" -if [ $success_count -eq $total_count ]; then - echo "" - echo "All icons created successfully!" - exit 0 -else +if [ "$success_count" -ne "$total_count" ]; then echo "" echo "Some icons failed to create. Please check errors above." exit 1 fi + +echo "" +echo "Regenerating $CONTENTS_PATH in iOS single-size Any/Dark/Tinted format..." + +cat > "$CONTENTS_PATH" << 'EOF' +{ + "images" : [ + { + "filename" : "1024.png", + "idiom" : "universal", + "platform" : "ios", + "scale" : "1x", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "1024-dark.png", + "idiom" : "universal", + "platform" : "ios", + "scale" : "1x", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "filename" : "1024-tinted.png", + "idiom" : "universal", + "platform" : "ios", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} +EOF + +echo "" +echo "All icons and appearance mappings created successfully."