Skip to content

Commit 9b88ad5

Browse files
authored
Update all dependencies
1 parent b67946a commit 9b88ad5

File tree

2 files changed

+133
-8
lines changed

2 files changed

+133
-8
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
os: [ubuntu-latest, macos-latest, windows-latest]
1616
node: [20]
1717
steps:
18-
- uses: actions/checkout@v5
18+
- uses: actions/checkout@v6
1919
- uses: actions/setup-node@v6
2020
with:
2121
node-version: ${{ matrix.node }}
@@ -30,10 +30,10 @@ jobs:
3030
matrix:
3131
os: [ubuntu-latest, macos-latest, windows-latest]
3232
steps:
33-
- uses: actions/checkout@v5
33+
- uses: actions/checkout@v6
3434
- uses: actions/setup-node@v6
3535
with:
36-
node-version: 20
36+
node-version: 24
3737
- name: Setup environment
3838
uses: ./
3939
with:
@@ -52,7 +52,7 @@ jobs:
5252
ionic cordova platform add android@latest
5353
ionic cordova build android
5454
- name: Upload Android APK (Cordova)
55-
uses: actions/upload-artifact@v4
55+
uses: actions/upload-artifact@v5
5656
with:
5757
name: android-apk-cordova-${{ matrix.os }}
5858
path: |
@@ -63,7 +63,17 @@ jobs:
6363
run: |
6464
cd testapp
6565
ionic cordova platform add ios@latest
66-
ionic cordova build ios --no-interactive -- --buildFlag="-sdk iphonesimulator"
66+
# run the patch script from the repository root to adjust generated iOS files in CI
67+
bash ../scripts/patch-ios.sh platforms/ios
68+
# verify CocoaPods and ensure specs are up-to-date (redundant with script but safe)
69+
pod --version || true
70+
if [ -f platforms/ios/Podfile ]; then (cd platforms/ios && pod install --repo-update); fi
71+
# build and instruct Cordova/Xcode to use the xcconfig the script creates
72+
XCOV=$(pwd)/platforms/ios/xcconfigs/ci-overrides.xcconfig
73+
ionic cordova build ios --no-interactive -- \
74+
--buildFlag="-xcconfig ${XCOV}" \
75+
--buildFlag="-sdk iphonesimulator" \
76+
--buildFlag="-destination generic/platform=iOS Simulator"
6777
6878
test-capacitor:
6979
name: Test (Capacitor)
@@ -75,10 +85,10 @@ jobs:
7585
matrix:
7686
os: [ubuntu-latest, macos-latest, windows-latest]
7787
steps:
78-
- uses: actions/checkout@v5
88+
- uses: actions/checkout@v6
7989
- uses: actions/setup-node@v6
8090
with:
81-
node-version: 20
91+
node-version: 24
8292
- name: Setup environment
8393
uses: ./
8494
with:
@@ -105,7 +115,7 @@ jobs:
105115
shell: pwsh
106116
run: pwsh -File scripts/inject-gradle-java17.ps1 -AppPath testapp
107117
- name: Upload Android APK (Capacitor)
108-
uses: actions/upload-artifact@v4
118+
uses: actions/upload-artifact@v5
109119
with:
110120
name: android-apk-${{ runner.os }}
111121
path: |

scripts/patch-ios.sh

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# Usage: scripts/patch-ios.sh [target-dir ...]
5+
6+
if [[ $# -gt 0 ]]; then
7+
TARGETS=("$@")
8+
else
9+
TARGETS=("platforms/ios")
10+
fi
11+
12+
# Helper for portable sed - macOS needs -i ''
13+
if [[ "$(uname -s)" == "Darwin" ]]; then
14+
SED_INPLACE=(sed -i '')
15+
else
16+
SED_INPLACE=(sed -i)
17+
fi
18+
19+
echo "Patching iOS generated files for targets: ${TARGETS[*]}"
20+
21+
for BASE in "${TARGETS[@]}"; do
22+
echo "Processing target: ${BASE}"
23+
PBX_PATH="${BASE}/App.xcodeproj/project.pbxproj"
24+
APPDELEGATE_PATH="${BASE}/App/AppDelegate.swift"
25+
XC_CONFIG_DIR="${BASE}/xcconfigs"
26+
XC_CONFIG_PATH="${XC_CONFIG_DIR}/ci-overrides.xcconfig"
27+
PODFILE_PATH="${BASE}/Podfile"
28+
29+
# 1) Bump IPHONEOS_DEPLOYMENT_TARGET to 13.0 (only if file exists)
30+
if [[ -f "$PBX_PATH" ]]; then
31+
echo " - Updating deployment target in ${PBX_PATH}"
32+
"${SED_INPLACE[@]}" "s/IPHONEOS_DEPLOYMENT_TARGET = [0-9]\{1,2\}\.[0-9]\{1,2\} *;/IPHONEOS_DEPLOYMENT_TARGET = 13.0;/g" "$PBX_PATH" || true
33+
34+
# Do not modify pbxproj with sdk-conditional settings; use xcconfig below instead
35+
else
36+
echo " - ${PBX_PATH} not found, skipping deployment target patch"
37+
fi
38+
39+
# 2) Add @available(iOS 13.0, *) before extension AppDelegate { if not already present
40+
if [[ -f "$APPDELEGATE_PATH" ]]; then
41+
if ! grep -q "@available(iOS 13.0" "$APPDELEGATE_PATH"; then
42+
echo " - Adding @available(iOS 13.0, *) to ${APPDELEGATE_PATH}"
43+
awk '
44+
BEGIN { added=0 }
45+
{
46+
if (!added && $0 ~ /^extension[[:space:]]+AppDelegate[[:space:]]*\{/ ) {
47+
print "@available(iOS 13.0, *)"
48+
added=1
49+
}
50+
print $0
51+
}
52+
' "$APPDELEGATE_PATH" > "${APPDELEGATE_PATH}.patched" && mv "${APPDELEGATE_PATH}.patched" "$APPDELEGATE_PATH"
53+
else
54+
echo " - @available already present in ${APPDELEGATE_PATH}"
55+
fi
56+
else
57+
echo " - ${APPDELEGATE_PATH} not found, skipping AppDelegate patch"
58+
fi
59+
60+
# 3) Ensure Podfile platform is at least 13.0
61+
if [[ -f "$PODFILE_PATH" ]]; then
62+
echo " - Ensuring Podfile platform is at least iOS 13.0"
63+
if grep -q "^\s*platform\s*:\s*.*ios" "$PODFILE_PATH"; then
64+
awk '
65+
{
66+
if ($0 ~ /^\s*platform\s*:\s*.*ios/) {
67+
print "platform :ios, '\''13.0'\''"
68+
} else {
69+
print
70+
}
71+
}
72+
' "$PODFILE_PATH" > "${PODFILE_PATH}.patched" && mv "${PODFILE_PATH}.patched" "$PODFILE_PATH" || true
73+
else
74+
# Prepend platform line if missing
75+
{
76+
echo "platform :ios, '13.0'"
77+
cat "$PODFILE_PATH"
78+
} > "${PODFILE_PATH}.patched" && mv "${PODFILE_PATH}.patched" "$PODFILE_PATH"
79+
fi
80+
81+
# Ensure pods build with at least iOS 13.0 (add post_install if missing)
82+
if ! grep -q "post_install" "$PODFILE_PATH"; then
83+
cat >> "$PODFILE_PATH" <<'PODPATCH'
84+
post_install do |installer|
85+
installer.pods_project.targets.each do |target|
86+
target.build_configurations.each do |config|
87+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
88+
end
89+
end
90+
end
91+
PODPATCH
92+
fi
93+
94+
echo " - Running CocoaPods install with repo update"
95+
(
96+
cd "$BASE"
97+
pod install --repo-update --silent || pod install --repo-update || true
98+
)
99+
else
100+
echo " - ${PODFILE_PATH} not found, skipping Podfile patch"
101+
fi
102+
103+
# 4) Create an xcconfig to add GeneratedModuleMaps-iphonesimulator to header search paths
104+
mkdir -p "$XC_CONFIG_DIR"
105+
cat > "$XC_CONFIG_PATH" <<'XC'
106+
HEADER_SEARCH_PATHS = $(inherited) $(DERIVED_FILE_DIR)/GeneratedModuleMaps-iphonesimulator
107+
EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64
108+
ONLY_ACTIVE_ARCH = YES
109+
IPHONEOS_DEPLOYMENT_TARGET = 13.0
110+
XC
111+
echo " - Created ${XC_CONFIG_PATH}"
112+
113+
done
114+
115+
echo "Patching complete."

0 commit comments

Comments
 (0)