@@ -58,35 +58,13 @@ jobs:
5858 export PATH=~/.npm-global/bin:$PATH
5959 npm install cordova@$CORDOVA_VERSION -g
6060
61- - name : Create Cordova app, install plugin
61+ - name : Create Cordova app, install plugin then build app
6262 env :
63- CORDOVA_IOS_VERSION : " latest"
63+ CORDOVA_IOS_VERSION : latest
6464 run : |
6565 npm config set prefix '~/.npm-global'
6666 export PATH=~/.npm-global/bin:$PATH
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 ../myApp
76- # Check if iOS platform section exists and add deployment target
77- if grep -q '<platform name="ios">' config.xml; then
78- echo "iOS platform section found, adding deployment target preference"
79- perl -i -pe 's|(<platform name="ios">)|$1\n <preference name="deployment-target" value="12.0" />|g' config.xml
80- else
81- echo "iOS platform section not found, adding entire section"
82- perl -i -pe 's|</widget>| <platform name="ios">\n <preference name="deployment-target" value="12.0" />\n </platform>\n</widget>|g' config.xml
83- fi
84- # Verify the change
85- echo "Config.xml after modification:"
86- cat config.xml
87- - name : Build app
88- run : |
89- npm config set prefix '~/.npm-global'
90- export PATH=~/.npm-global/bin:$PATH
91- cd ../myApp
9270 cordova build ios --verbose
0 commit comments