Skip to content

Commit 77c0c3a

Browse files
committed
fix CI
1 parent ee9013a commit 77c0c3a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/main.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,22 @@ jobs:
6767
cd ..; cordova create myApp org.apache.cordova.myApp myApp; cd myApp;
6868
cordova platform add ios@$CORDOVA_IOS_VERSION --verbose
6969
cordova plugin add ../cordova-plugin-iosrtc --verbose
70+
71+
- name: Set iOS Deployment Target
72+
run: |
73+
npm config set prefix '~/.npm-global'
74+
export PATH=~/.npm-global/bin:$PATH
75+
cd ..; cd myApp;
76+
# Check if iOS platform section exists
77+
if grep -q '<platform name="ios">' config.xml; then
78+
# Add preference after the opening platform tag
79+
sed -i '' '/<platform name="ios">/a\
80+
\ \ \ \ <preference name="deployment-target" value="12.0" />
81+
' config.xml
82+
83+
- name: Create Cordova app, install plugin then build app
84+
run: |
85+
npm config set prefix '~/.npm-global'
86+
export PATH=~/.npm-global/bin:$PATH
87+
cd ..; cd myApp;
7088
cordova build ios --verbose

0 commit comments

Comments
 (0)