fix(assets): rename splash_dark.png to splash-dark.png

Match the filename @capacitor/assets expects so iOS uses the custom
dark splash instead of the logo-on-black fallback.
This commit is contained in:
Jose Olarte III
2026-07-17 20:04:08 +08:00
parent cfe90fd04e
commit 8e6c83021f
9 changed files with 14 additions and 14 deletions

View File

@@ -1360,7 +1360,7 @@ npm run assets:validate
**Source Assets (Required):**
- `resources/icon.png` - App icon source
- `resources/splash.png` - Splash screen source
- `resources/splash_dark.png` - Dark mode splash source
- `resources/splash-dark.png` - Dark mode splash source
**Android Resources (Generated):**
- `android/app/src/main/res/drawable/splash.png` - Splash screen drawable

View File

@@ -199,7 +199,7 @@ icon and splash screen generation across all platforms.
### Asset Sources
- **Single source of truth**: `resources/` directory (Capacitor default)
- **Source files**: `icon.png`, `splash.png`, `splash_dark.png`
- **Source files**: `icon.png`, `splash.png`, `splash-dark.png`
- **Format**: PNG or SVG files for optimal quality
### Asset Generation

View File

@@ -22,7 +22,7 @@
"scale": "cover",
"target": "android/app/src/main/res"
},
"darkSource": "resources/splash_dark.png",
"darkSource": "resources/splash-dark.png",
"ios": {
"target": "ios/App/App/Assets.xcassets",
"useStoryBoard": true

View File

@@ -22,7 +22,7 @@
"scale": "cover",
"target": "android/app/src/main/res"
},
"darkSource": "resources/splash_dark.png",
"darkSource": "resources/splash-dark.png",
"ios": {
"target": "ios/App/App/Assets.xcassets",
"useStoryBoard": true

View File

@@ -47,7 +47,7 @@ npm run build:android:studio
#### Source Assets (Required)
- `resources/icon.png` - App icon source
- `resources/splash.png` - Splash screen source
- `resources/splash_dark.png` - Dark mode splash source
- `resources/splash-dark.png` - Dark mode splash source
#### Android Resources (Generated)
- `android/app/src/main/res/drawable/splash.png` - Splash screen drawable
@@ -201,13 +201,13 @@ mkdir -p android/app/src/main/res/mipmap-{mdpi,hdpi,xhdpi,xxhdpi,xxxhdpi}
# Copy source assets to assets directory
cp resources/icon.png assets/
cp resources/splash.png assets/
cp resources/splash_dark.png assets/
cp resources/splash-dark.png assets/
# Generate assets manually
npx @capacitor/assets generate
# Clean up
rm assets/icon.png assets/splash.png assets/splash_dark.png
rm assets/icon.png assets/splash.png assets/splash-dark.png
```
## Future Enhancements

View File

@@ -89,7 +89,7 @@ system to a standardized, single-source asset configuration approach using
resources/ # Image sources ONLY
icon.png
splash.png
splash_dark.png
splash-dark.png
config/assets/ # Versioned config & schema
capacitor-assets.config.json

View File

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

View File

@@ -92,7 +92,7 @@ function generateAssetConfig(): AssetConfig {
},
splash: {
source: "resources/splash.png",
darkSource: "resources/splash_dark.png",
darkSource: "resources/splash-dark.png",
android: {
scale: "cover",
target: "android/app/src/main/res"
@@ -138,7 +138,7 @@ function validateSourceFiles(): void {
const requiredFiles = [
'resources/icon.png',
'resources/splash.png',
'resources/splash_dark.png'
'resources/splash-dark.png'
];
const missingFiles = requiredFiles.filter(file => {

View File

@@ -230,8 +230,8 @@ validate_android_assets() {
missing_assets+=("resources/splash.png")
fi
if [ ! -f "resources/splash_dark.png" ]; then
missing_assets+=("resources/splash_dark.png")
if [ ! -f "resources/splash-dark.png" ]; then
missing_assets+=("resources/splash-dark.png")
fi
if [ ${#missing_assets[@]} -gt 0 ]; then
@@ -278,14 +278,14 @@ validate_android_assets() {
# Copy source assets to assets directory for capacitor-assets
cp resources/icon.png assets/ 2>/dev/null || log_warn "Could not copy icon.png"
cp resources/splash.png assets/ 2>/dev/null || log_warn "Could not copy splash.png"
cp resources/splash_dark.png assets/ 2>/dev/null || log_warn "Could not copy splash_dark.png"
cp resources/splash-dark.png assets/ 2>/dev/null || log_warn "Could not copy splash-dark.png"
# Generate assets
if npx @capacitor/assets generate >/dev/null 2>&1; then
log_success "Android assets regenerated successfully"
# Clean up temporary assets
rm -f assets/icon.png assets/splash.png assets/splash_dark.png
rm -f assets/icon.png assets/splash.png assets/splash-dark.png
# Verify the resources were created
local verification_failed=false