fix(ios): run podspec fix script before pod install

Move the Daily Notification Plugin podspec fix script to execute before
the first pod install operation. Previously, the fix script ran after
pod install but before Capacitor sync, causing "No podspec found for
TimesafariDailyNotificationPlugin" errors when pod install tried to
resolve dependencies.

The Podfile expects TimesafariDailyNotificationPlugin.podspec, but the
plugin package only includes CapacitorDailyNotification.podspec. The
fix script creates the expected podspec file, but it must run before
CocoaPods attempts to resolve dependencies.

Fixes build failures on fresh installations where the podspec file
doesn't exist yet.
This commit is contained in:
Jose Olarte III
2026-01-27 15:53:11 +08:00
parent 31dfeb0988
commit 77e8d2d2ab

View File

@@ -404,7 +404,24 @@ elif [ "$BUILD_MODE" = "production" ]; then
safe_execute "Building Capacitor version (production)" "npm run build:capacitor -- --mode production" || exit 3
fi
# Step 6: Install CocoaPods dependencies (with Xcode 26 workaround)
# Step 6: Fix Daily Notification Plugin podspec name (must run before pod install)
# ===================================================================
# The Podfile expects TimesafariDailyNotificationPlugin.podspec, but the plugin
# package only includes CapacitorDailyNotification.podspec. This script creates
# the expected podspec file before CocoaPods tries to resolve dependencies.
# ===================================================================
log_info "Fixing Daily Notification Plugin podspec name..."
if [ -f "./scripts/fix-daily-notification-podspec.sh" ]; then
if ./scripts/fix-daily-notification-podspec.sh; then
log_success "Daily Notification Plugin podspec created"
else
log_warn "Failed to create podspec (may already exist)"
fi
else
log_warn "fix-daily-notification-podspec.sh not found, skipping"
fi
# Step 6.5: Install CocoaPods dependencies (with Xcode 26 workaround)
# ===================================================================
# WORKAROUND: Xcode 26 / CocoaPods Compatibility Issue
# ===================================================================
@@ -488,7 +505,7 @@ run_pod_install_with_workaround() {
safe_execute "Installing CocoaPods dependencies" "run_pod_install_with_workaround" || exit 6
# Step 6.5: Sync with Capacitor (also needs workaround since it runs pod install internally)
# Step 6.6: Sync with Capacitor (also needs workaround since it runs pod install internally)
# Capacitor sync internally runs pod install, so we need to apply the workaround here too
run_cap_sync_with_workaround() {
local PROJECT_FILE="ios/App/App.xcodeproj/project.pbxproj"
@@ -538,18 +555,6 @@ run_cap_sync_with_workaround() {
fi
}
# Step 6.4: Fix Daily Notification Plugin podspec name for Capacitor sync
log_info "Fixing Daily Notification Plugin podspec name..."
if [ -f "./scripts/fix-daily-notification-podspec.sh" ]; then
if ./scripts/fix-daily-notification-podspec.sh; then
log_success "Daily Notification Plugin podspec symlink created"
else
log_warn "Failed to create podspec symlink (may already exist)"
fi
else
log_warn "fix-daily-notification-podspec.sh not found, skipping"
fi
safe_execute "Syncing with Capacitor" "run_cap_sync_with_workaround" || exit 6
# Step 7: Generate assets