fix(ios): validate resources/ and warn if assets/ shadows it
Point iOS asset checks at resources/ and document that a leftover assets/ directory makes @capacitor/assets ignore the canonical sources.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user