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:
@@ -404,7 +404,24 @@ elif [ "$BUILD_MODE" = "production" ]; then
|
|||||||
safe_execute "Building Capacitor version (production)" "npm run build:capacitor -- --mode production" || exit 3
|
safe_execute "Building Capacitor version (production)" "npm run build:capacitor -- --mode production" || exit 3
|
||||||
fi
|
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
|
# 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
|
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
|
# Capacitor sync internally runs pod install, so we need to apply the workaround here too
|
||||||
run_cap_sync_with_workaround() {
|
run_cap_sync_with_workaround() {
|
||||||
local PROJECT_FILE="ios/App/App.xcodeproj/project.pbxproj"
|
local PROJECT_FILE="ios/App/App.xcodeproj/project.pbxproj"
|
||||||
@@ -538,18 +555,6 @@ run_cap_sync_with_workaround() {
|
|||||||
fi
|
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
|
safe_execute "Syncing with Capacitor" "run_cap_sync_with_workaround" || exit 6
|
||||||
|
|
||||||
# Step 7: Generate assets
|
# Step 7: Generate assets
|
||||||
|
|||||||
Reference in New Issue
Block a user