From 77e8d2d2ab61f4f06b2fee5a31442a81da60116b Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Tue, 27 Jan 2026 15:53:11 +0800 Subject: [PATCH] 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. --- scripts/build-ios.sh | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/scripts/build-ios.sh b/scripts/build-ios.sh index ca594f3c..c0182bf3 100755 --- a/scripts/build-ios.sh +++ b/scripts/build-ios.sh @@ -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