From ec2057320c5af17b0b531384740466060a2347af Mon Sep 17 00:00:00 2001 From: louisg1337 Date: Fri, 3 May 2024 16:57:42 -0400 Subject: [PATCH 1/5] Added in script to change deployment for all pods --- config.cordovabuild.xml | 2 + .../before_build/ios/ios_change_deployment.js | 37 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 hooks/before_build/ios/ios_change_deployment.js diff --git a/config.cordovabuild.xml b/config.cordovabuild.xml index d3d562802..07a9573de 100644 --- a/config.cordovabuild.xml +++ b/config.cordovabuild.xml @@ -36,6 +36,8 @@ + + diff --git a/hooks/before_build/ios/ios_change_deployment.js b/hooks/before_build/ios/ios_change_deployment.js new file mode 100644 index 000000000..be1d39aac --- /dev/null +++ b/hooks/before_build/ios/ios_change_deployment.js @@ -0,0 +1,37 @@ +const fs = require('fs'); +const path = require('path'); + +function findFilePathsByFilename(directory, filename) { + const files = fs.readdirSync(directory); + const filePaths = []; + + for (const file of files) { + const filePath = path.join(directory, file); + const stats = fs.statSync(filePath); + + if (stats.isDirectory()) { + // Recursively search in subdirectories + const subdirectoryFilePaths = findFilePathsByFilename(filePath, filename); + filePaths.push(...subdirectoryFilePaths); + } else if (stats.isFile() && file === filename) { + // If the file matches the filename, add its path to the result + filePaths.push(filePath); + } + } + return filePaths; +} + + +const paths1 = findFilePathsByFilename('.', 'project.pbxproj'); +const paths2 = findFilePathsByFilename('.', 'Pods.xcodeproj'); +const paths = paths1.concat(paths2) + +console.log('Apply patch to', paths); + +for (let path of paths) { + let content = fs.readFileSync(path, { encoding: 'utf-8' }); + content = content.replace(/IPHONEOS_DEPLOYMENT_TARGET = [0-9]+.0;/g, 'IPHONEOS_DEPLOYMENT_TARGET = 12.0;'); + fs.writeFileSync(path, content); +} + +console.log('Done setting IPHONEOS_DEPLOYMENT_TARGET'); \ No newline at end of file From 8aa00107b0386a548ab033aebfaf177b9a1a8f5c Mon Sep 17 00:00:00 2001 From: louisg1337 Date: Fri, 3 May 2024 16:59:33 -0400 Subject: [PATCH 2/5] Reverted back to old workflow that uses Xcode 15 --- .github/workflows/ios-build.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ios-build.yml b/.github/workflows/ios-build.yml index ac6bb76f3..cd195b6c9 100644 --- a/.github/workflows/ios-build.yml +++ b/.github/workflows/ios-build.yml @@ -22,7 +22,7 @@ jobs: # This workflow contains a single job called "build" build: # The type of runner that the job will run on - runs-on: macos-13 + runs-on: macos-lateset # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -33,12 +33,6 @@ jobs: - name: Print the xcode path run: xcode-select --print-path - - name: Set xcode to 14.1 - run: | - sudo xcode-select --switch /Applications/Xcode_14.1.app - echo "After setting xcode version "`xcode-select --print-path` - - - name: Print the xcode setup run: xcodebuild -version -sdk From 75c0c0606dcaffcd95c1f2c6ad8fb3e48b3ccf81 Mon Sep 17 00:00:00 2001 From: louisg1337 Date: Fri, 3 May 2024 17:05:47 -0400 Subject: [PATCH 3/5] Fixed typo in hook file name --- config.cordovabuild.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.cordovabuild.xml b/config.cordovabuild.xml index 07a9573de..bd88c75a3 100644 --- a/config.cordovabuild.xml +++ b/config.cordovabuild.xml @@ -37,7 +37,7 @@ - + From bc4c4ce7800216c6d117a2cc31261496286f47c0 Mon Sep 17 00:00:00 2001 From: "K. Shankari" Date: Sun, 5 May 2024 12:17:55 -0700 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=93=8C=20=E2=AC=86=EF=B8=8F=20=20Upgr?= =?UTF-8?q?ade=20the=20pinned=20version=20of=20the=20OS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - We want to upgrade the pinned version of the OS to the next one - We don't want to run on `latest` because then changes to the underlying runner will break all tests, including for pull requests, and block development. Instead, we should schedule a periodic (~ once a week) check against `latest` so we know when the latest has changed, and can fix it before again bumping up the pinned version @louisg1337 Also, there was a typo in `latest` :smile --- .github/workflows/ios-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ios-build.yml b/.github/workflows/ios-build.yml index cd195b6c9..695ed02de 100644 --- a/.github/workflows/ios-build.yml +++ b/.github/workflows/ios-build.yml @@ -22,7 +22,7 @@ jobs: # This workflow contains a single job called "build" build: # The type of runner that the job will run on - runs-on: macos-lateset + runs-on: macos-14 # Steps represent a sequence of tasks that will be executed as part of the job steps: From ab2ff6ef7ad3fbcc8651232d46274a973889815f Mon Sep 17 00:00:00 2001 From: "K. Shankari" Date: Sun, 5 May 2024 12:23:57 -0700 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=93=8C=20=E2=AC=86=EF=B8=8F=20=20Bump?= =?UTF-8?q?=20up=20the=20pinned=20version=20for=20iOS=20deployment=20to=20?= =?UTF-8?q?13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After the react rewrite, we require a min version of 13 https://github.com/e-mission/e-mission-docs/issues/932#issuecomment-1637153502 to https://github.com/e-mission/e-mission-docs/issues/932#issuecomment-1637170876 to https://github.com/e-mission/e-mission-docs/issues/932#issuecomment-1675644465 to https://github.com/e-mission/e-mission-docs/issues/932#issuecomment-1675703217 --- config.cordovabuild.xml | 2 +- hooks/before_build/ios/ios_change_deployment.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config.cordovabuild.xml b/config.cordovabuild.xml index bd88c75a3..3401b9b9b 100644 --- a/config.cordovabuild.xml +++ b/config.cordovabuild.xml @@ -36,7 +36,7 @@ - + diff --git a/hooks/before_build/ios/ios_change_deployment.js b/hooks/before_build/ios/ios_change_deployment.js index be1d39aac..ad381162d 100644 --- a/hooks/before_build/ios/ios_change_deployment.js +++ b/hooks/before_build/ios/ios_change_deployment.js @@ -30,8 +30,8 @@ console.log('Apply patch to', paths); for (let path of paths) { let content = fs.readFileSync(path, { encoding: 'utf-8' }); - content = content.replace(/IPHONEOS_DEPLOYMENT_TARGET = [0-9]+.0;/g, 'IPHONEOS_DEPLOYMENT_TARGET = 12.0;'); + content = content.replace(/IPHONEOS_DEPLOYMENT_TARGET = [0-9]+.0;/g, 'IPHONEOS_DEPLOYMENT_TARGET = 13.0;'); fs.writeFileSync(path, content); } -console.log('Done setting IPHONEOS_DEPLOYMENT_TARGET'); \ No newline at end of file +console.log('Done setting IPHONEOS_DEPLOYMENT_TARGET');