diff --git a/BUILDING.md b/BUILDING.md index 2b5803f0..78e376b7 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -1604,6 +1604,11 @@ Use the commands above to check and fix code quality issues. 4. **Native Build**: Platform-specific compilation 5. **Package Creation**: APK/IPA generation +`resources/` is the canonical source for app icons and splash screens. +Do not keep a legacy top-level `assets/` directory unless it is intentionally +used: `@capacitor/assets` prioritizes `assets/` over `resources/`, which can +prevent the canonical assets from being discovered. + ## Architecture Environment Configuration ### Environment Files diff --git a/resources/README.md b/resources/README.md index d8290cd3..631685aa 100644 --- a/resources/README.md +++ b/resources/README.md @@ -56,7 +56,10 @@ npx capacitor-assets generate --web ## Configuration -Asset generation is configured in `capacitor-assets.config.json` at the project root. +`resources/` is this project's canonical asset source. `@capacitor/assets` +prioritizes a top-level `assets/` directory over `resources/`, so a legacy +`assets/` directory can prevent these assets from being discovered. Remove that +directory when it is empty or obsolete. ## Version Control diff --git a/scripts/build-ios.sh b/scripts/build-ios.sh index 6479f8aa..11e9a872 100755 --- a/scripts/build-ios.sh +++ b/scripts/build-ios.sh @@ -172,12 +172,12 @@ check_ios_resources() { log_info "Checking iOS resources..." # Check for required assets - if [ ! -f "assets/icon.png" ]; then - log_warn "App icon not found at assets/icon.png" + if [ ! -f "resources/icon.png" ]; then + log_warn "App icon not found at resources/icon.png" fi - if [ ! -f "assets/splash.png" ]; then - log_warn "Splash screen not found at assets/splash.png" + if [ ! -f "resources/splash.png" ]; then + log_warn "Splash screen not found at resources/splash.png" fi # Check for iOS-specific files @@ -295,6 +295,11 @@ apply_ios_app_icon_appearances() { # Generate iOS assets (capacitor-assets), then apply optional appearance variants. generate_ios_assets() { ensure_ios_capacitor_asset_directories + if [ -d "assets" ]; then + log_warn "@capacitor/assets prioritizes the top-level assets/ directory over resources/." + log_warn "This project intentionally uses resources/ as the canonical asset source." + log_warn "Remove the legacy assets/ directory if it is empty or obsolete." + fi npx capacitor-assets generate --ios apply_ios_app_icon_appearances }