fix(ios): iOS 13.0 compatibility and test app UI unification
Fixed iOS 13.0 compatibility issue in test harness by replacing Logger (iOS 14+) with os_log (iOS 13+). Fixed build script to correctly detect and sync Capacitor config from App subdirectory. Unified both Android and iOS test app UIs to use www/index.html as the canonical source. Changes: - DailyNotificationBackgroundTaskTestHarness: Replace Logger with os_log for iOS 13.0 deployment target compatibility - build-ios-test-app.sh: Fix Capacitor sync path detection to check both current directory and App/ subdirectory for config files - test-apps: Update both Android and iOS test apps to use www/index.html as the canonical UI source for consistency This ensures the plugin builds on iOS 13.0+ and both test apps provide the same testing experience across platforms.
This commit is contained in:
@@ -174,12 +174,28 @@ build_ios_test_app() {
|
||||
fi
|
||||
|
||||
# Sync Capacitor if needed
|
||||
if command -v npx &> /dev/null && [ -f "capacitor.config.ts" ] || [ -f "capacitor.config.json" ]; then
|
||||
# Check for config in current directory or App subdirectory
|
||||
CAP_CONFIG_DIR=""
|
||||
if [ -f "capacitor.config.ts" ] || [ -f "capacitor.config.json" ]; then
|
||||
CAP_CONFIG_DIR="."
|
||||
elif [ -f "App/capacitor.config.json" ] || [ -f "App/capacitor.config.ts" ]; then
|
||||
CAP_CONFIG_DIR="App"
|
||||
fi
|
||||
|
||||
if command -v npx &> /dev/null && [ -n "$CAP_CONFIG_DIR" ]; then
|
||||
log_step "Syncing Capacitor..."
|
||||
# Run sync from directory containing config
|
||||
if [ "$CAP_CONFIG_DIR" != "." ]; then
|
||||
cd "$CAP_CONFIG_DIR" || exit 1
|
||||
fi
|
||||
if ! npx cap sync ios; then
|
||||
log_error "Capacitor sync failed"
|
||||
exit 1
|
||||
fi
|
||||
# Return to ios/App directory if we changed
|
||||
if [ "$CAP_CONFIG_DIR" != "." ]; then
|
||||
cd .. || exit 1
|
||||
fi
|
||||
log_info "Capacitor synced"
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user