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