From c25b58ddfd557eb0031eed78922eebba852168c4 Mon Sep 17 00:00:00 2001 From: Steve Cassidy Date: Thu, 28 Nov 2024 16:01:26 +1100 Subject: [PATCH 01/20] use brew to install jq Signed-off-by: Steve Cassidy --- .github/workflows/appstore-testflight.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/appstore-testflight.yml b/.github/workflows/appstore-testflight.yml index 31665167c..61dae794b 100644 --- a/.github/workflows/appstore-testflight.yml +++ b/.github/workflows/appstore-testflight.yml @@ -61,8 +61,9 @@ jobs: fi - name: Install jq - run: sudo apt-get install -y jq - + run: | + brew update + brew install jq - name: Declare some variables shell: bash run: | From 7c510c32cc640c35f594793de5f72bb674c8cf99 Mon Sep 17 00:00:00 2001 From: Steve Cassidy Date: Thu, 28 Nov 2024 16:08:23 +1100 Subject: [PATCH 02/20] Add missing gemfile, tidy up Fastfile Signed-off-by: Steve Cassidy --- app/ios/App/Gemfile | 7 ++++++ app/ios/App/fastlane/Fastfile | 46 +++-------------------------------- 2 files changed, 10 insertions(+), 43 deletions(-) create mode 100644 app/ios/App/Gemfile diff --git a/app/ios/App/Gemfile b/app/ios/App/Gemfile new file mode 100644 index 000000000..b38f3c1ff --- /dev/null +++ b/app/ios/App/Gemfile @@ -0,0 +1,7 @@ +source "https://rubygems.org" + +gem "fastlane" +gem "cocoapods" + +plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') +eval_gemfile(plugins_path) if File.exist?(plugins_path) diff --git a/app/ios/App/fastlane/Fastfile b/app/ios/App/fastlane/Fastfile index a7af27ad3..3efccba9b 100644 --- a/app/ios/App/fastlane/Fastfile +++ b/app/ios/App/fastlane/Fastfile @@ -34,48 +34,7 @@ def ensure_temp_keychain(name, password) end platform :ios do - lane :test_ipa do - keychain_name = TEMP_KEYCHAIN_USER - keychain_password = TEMP_KEYCHAIN_PASSWORD - ensure_temp_keychain(keychain_name, keychain_password) - - api_key = app_store_connect_api_key( - key_id: APPLE_KEY_ID, - issuer_id: APPLE_ISSUER_ID, - key_content: APPLE_KEY_CONTENT, - duration: 1200, - in_house: false - ) - - #increment_build_number(xcodeproj: "App.xcodeproj") - #handled by script and xcode in build phases, I hope. - - cocoapods( - clean_install: true - ) - - match( - type: 'development', - app_identifier: "#{DEVELOPER_APP_IDENTIFIER}", - git_basic_authorization: Base64.strict_encode64(ENV["GIT_AUTHORIZATION"]), - readonly: false, - keychain_name: keychain_name, - keychain_password: keychain_password, - api_key: api_key - ) - - gym( - configuration: "Debug", - workspace: "App.xcworkspace", - scheme: "App", - export_method: "development", - export_options: { - provisioningProfiles: { - DEVELOPER_APP_ID => "match Development #{DEVELOPER_APP_IDENTIFIER}" - } - } - ) - end + lane :closed_beta_browserstack do keychain_name = TEMP_KEYCHAIN_USER keychain_password = TEMP_KEYCHAIN_PASSWORD @@ -124,6 +83,8 @@ platform :ios do custom_id: "ios-github-actions-fastlane" ) end + + lane :closed_beta_testflight do keychain_name = TEMP_KEYCHAIN_USER keychain_password = TEMP_KEYCHAIN_PASSWORD @@ -171,7 +132,6 @@ platform :ios do merge_commit_filtering: "exclude_merges" ) - pilot( apple_id: "#{DEVELOPER_APP_ID}", app_identifier: "#{DEVELOPER_APP_IDENTIFIER}", From 92a47ddee0e08bc0473a9e08fbae3af8fae28f92 Mon Sep 17 00:00:00 2001 From: Steve Cassidy Date: Thu, 28 Nov 2024 16:15:53 +1100 Subject: [PATCH 03/20] fix path to app Signed-off-by: Steve Cassidy --- .github/workflows/appstore-testflight.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/appstore-testflight.yml b/.github/workflows/appstore-testflight.yml index 61dae794b..3bb5c5097 100644 --- a/.github/workflows/appstore-testflight.yml +++ b/.github/workflows/appstore-testflight.yml @@ -123,7 +123,7 @@ jobs: uses: maierj/fastlane-action@v2.3.0 with: lane: closed_beta_testflight - subdirectory: 'ios/App' + subdirectory: 'app/ios/App' bundle-install-path: '$HOME/vendor/bundle' verbose: false env: From 0986590fb5e704734b448712f20b99931922fffb Mon Sep 17 00:00:00 2001 From: Steve Cassidy Date: Thu, 28 Nov 2024 17:10:08 +1100 Subject: [PATCH 04/20] try disabling Turbo cache Signed-off-by: Steve Cassidy --- .github/workflows/appstore-testflight.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/appstore-testflight.yml b/.github/workflows/appstore-testflight.yml index 3bb5c5097..fe3a875b1 100644 --- a/.github/workflows/appstore-testflight.yml +++ b/.github/workflows/appstore-testflight.yml @@ -29,9 +29,10 @@ jobs: needs: check_date if: ${{ needs.check_date.outputs.should_run != 'false' }} continue-on-error: false - env: - TURBO_TEAM: ${{ vars.TURBO_TEAM }} - TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + # Disable Turbo to see if that fixes the build - possible cache issue + # env: + # TURBO_TEAM: ${{ vars.TURBO_TEAM }} + # TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} steps: - uses: actions/checkout@v4 - name: Cache node modules From ab0fe272d06b0fa7120955f41a1ec4e733aa10d7 Mon Sep 17 00:00:00 2001 From: Steve Cassidy Date: Fri, 29 Nov 2024 06:32:55 +1100 Subject: [PATCH 05/20] Increment Apple version number to 1.0.4 Signed-off-by: Steve Cassidy --- app/ios/App/App/Info.plist | 2 +- app/ios/App/Scripts/get_build_number.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/ios/App/App/Info.plist b/app/ios/App/App/Info.plist index c4bc99d88..f2660f84b 100644 --- a/app/ios/App/App/Info.plist +++ b/app/ios/App/App/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0.3 + 1.0.4 CFBundleURLTypes diff --git a/app/ios/App/Scripts/get_build_number.sh b/app/ios/App/Scripts/get_build_number.sh index 599c830e1..2c4c801a4 100755 --- a/app/ios/App/Scripts/get_build_number.sh +++ b/app/ios/App/Scripts/get_build_number.sh @@ -26,7 +26,7 @@ PROJECT_DIR=$SCRIPT_DIR/../../../ #version=$(grep '"version":' $PROJECT_DIR/package.json | cut -d: -f 2 | sed -e 's/[", ]//g') # since we previously published 1.0.0 on app store we need a higher version # number, set that here until we get the main version above this -version=1.0.3 +version=1.0.4 buildNumber=$(date -u "+%Y%m%d%H%M") /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "App/Info.plist" From 016511882a725bb69d61db4481666d60276cf60e Mon Sep 17 00:00:00 2001 From: Steve Cassidy Date: Mon, 2 Dec 2024 09:59:38 +1100 Subject: [PATCH 06/20] use 'ios' in version string Signed-off-by: Steve Cassidy --- .github/workflows/appstore-testflight.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/appstore-testflight.yml b/.github/workflows/appstore-testflight.yml index fe3a875b1..852927a8b 100644 --- a/.github/workflows/appstore-testflight.yml +++ b/.github/workflows/appstore-testflight.yml @@ -73,7 +73,7 @@ jobs: - name: Create version string shell: bash run: | - echo "version_string=v${{env.app_version}}-android-#${{env.sha_short}}" >> "$GITHUB_ENV" + echo "version_string=v${{env.app_version}}-ios-#${{env.sha_short}}" >> "$GITHUB_ENV" - name: Set up ruby env uses: ruby/setup-ruby@v1 From 6f872a14903ab91cd96c8dcf385c6f8e529b1224 Mon Sep 17 00:00:00 2001 From: Steve Cassidy Date: Mon, 2 Dec 2024 10:30:24 +1100 Subject: [PATCH 07/20] move IOS version/id setting into main config script Signed-off-by: Steve Cassidy --- app/bin/prebuildConfig.sh | 17 ++++++++++++ app/ios/App/App.xcodeproj/project.pbxproj | 25 ++--------------- app/ios/App/App/Info.plist | 6 ++--- app/ios/App/Scripts/get_build_number.sh | 33 ----------------------- 4 files changed, 22 insertions(+), 59 deletions(-) delete mode 100755 app/ios/App/Scripts/get_build_number.sh diff --git a/app/bin/prebuildConfig.sh b/app/bin/prebuildConfig.sh index c2f04414c..d2007add9 100755 --- a/app/bin/prebuildConfig.sh +++ b/app/bin/prebuildConfig.sh @@ -47,3 +47,20 @@ if test -f icons/icon-48.webp; then mkdir -p ./public/assets mv icons ./public/assets/icons fi + + +## IOS specific configuration + +# Setting the IOS build version +# https://pgu.dev/2020/12/16/ios-build-versioning.html + +#version=$(grep '"version":' $PROJECT_DIR/package.json | cut -d: -f 2 | sed -e 's/[", ]//g') +# since we previously published 1.0.0 on app store we need a higher version +# number, set that here until we get the main version above this +version=1.0.4 +buildNumber=$(date -u "+%Y%m%d%H%M") + +/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" ./ios/App/App/Info.plist +/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $version" ./ios/App/App/Info.plist +/usr/libexec/PlistBuddy -c "Set :CFBundleURLTypes:0:CFBundleURLSchemes:0 $VITE_APP_ID" ./ios/App/App/Info.plist +/usr/libexec/PlistBuddy -c "Set :CFBundleURLTypes:0:CFBundleURLName $VITE_APP_ID" ./ios/App/App/Info.plist diff --git a/app/ios/App/App.xcodeproj/project.pbxproj b/app/ios/App/App.xcodeproj/project.pbxproj index 9f592a17a..aa6d01154 100644 --- a/app/ios/App/App.xcodeproj/project.pbxproj +++ b/app/ios/App/App.xcodeproj/project.pbxproj @@ -11,7 +11,6 @@ isa = PBXAggregateTarget; buildConfigurationList = D364126F278CFCD50019D84B /* Build configuration list for PBXAggregateTarget "Version" */; buildPhases = ( - D3641270278CFCD90019D84B /* ShellScript */, ); dependencies = ( ); @@ -236,26 +235,6 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - D3641270278CFCD90019D84B /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "$(SRCROOT)/Scripts/get_build_number.sh", - "$(SRCROOT)/App/Info.plist", - ); - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"$SRCROOT\"/Scripts/get_build_number.sh\n"; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -428,7 +407,7 @@ ENABLE_USER_SCRIPT_SANDBOXING = NO; INFOPLIST_FILE = App/Info.plist; INFOPLIST_PREFIX_HEADER = Plist/Prefix; - INFOPLIST_PREPROCESS = YES; + INFOPLIST_PREPROCESS = NO; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -462,7 +441,7 @@ ENABLE_USER_SCRIPT_SANDBOXING = NO; INFOPLIST_FILE = App/Info.plist; INFOPLIST_PREFIX_HEADER = Plist/Prefix; - INFOPLIST_PREPROCESS = YES; + INFOPLIST_PREPROCESS = NO; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", diff --git a/app/ios/App/App/Info.plist b/app/ios/App/App/Info.plist index f2660f84b..8f580bf94 100644 --- a/app/ios/App/App/Info.plist +++ b/app/ios/App/App/Info.plist @@ -22,15 +22,15 @@ CFBundleURLName - $(PRODUCT_BUNDLE_IDENTIFIER) + au.edu.faims.fieldmark CFBundleURLSchemes - org.fedarch.faims3 + au.edu.faims.fieldmark CFBundleVersion - 202409110011 + 202412012317 ITSAppUsesNonExemptEncryption LSRequiresIPhoneOS diff --git a/app/ios/App/Scripts/get_build_number.sh b/app/ios/App/Scripts/get_build_number.sh deleted file mode 100755 index 2c4c801a4..000000000 --- a/app/ios/App/Scripts/get_build_number.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -euo pipefail -#https://pgu.dev/2020/12/16/ios-build-versioning.html - -#!/bin/sh -euo pipefail - -# Convert elapsed seconds from Unix epoch until now to minutes -# HOURS_SINCE_EPOCH=$(( $(date "+%s")/60/60 )) -# -# # Convert current git HEAD commit (7 characters) to decimal value -# #GIT_HASH_DECIMAL=$(printf "%d" 0x1"$(git rev-parse --short HEAD)") -# -# # Merge both values to a single string -# BUNDLE_VERSION="${HOURS_SINCE_EPOCH}"."${GIT_HASH_DECIMAL}" -# -# # Prepare directory / file where the generated value will be written. -# mkdir -p "${SRCROOT}"/Plist -# touch "${SRCROOT}"/Plist/Prefix -# -# # Write content to a file -# cat < "${SRCROOT}"/Plist/Prefix -# #define BUNDLE_VERSION ${BUNDLE_VERSION} -# EOF -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -PROJECT_DIR=$SCRIPT_DIR/../../../ - -#version=$(grep '"version":' $PROJECT_DIR/package.json | cut -d: -f 2 | sed -e 's/[", ]//g') -# since we previously published 1.0.0 on app store we need a higher version -# number, set that here until we get the main version above this -version=1.0.4 -buildNumber=$(date -u "+%Y%m%d%H%M") - -/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "App/Info.plist" -/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $version" "App/Info.plist" From f62f7ada65cfe0f6d2f10477004e366017aa1ff2 Mon Sep 17 00:00:00 2001 From: Steve Cassidy Date: Mon, 2 Dec 2024 10:44:03 +1100 Subject: [PATCH 08/20] make IOS config conditional Signed-off-by: Steve Cassidy --- app/bin/prebuildConfig.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/bin/prebuildConfig.sh b/app/bin/prebuildConfig.sh index d2007add9..5c271e440 100755 --- a/app/bin/prebuildConfig.sh +++ b/app/bin/prebuildConfig.sh @@ -60,7 +60,10 @@ fi version=1.0.4 buildNumber=$(date -u "+%Y%m%d%H%M") -/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" ./ios/App/App/Info.plist -/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $version" ./ios/App/App/Info.plist -/usr/libexec/PlistBuddy -c "Set :CFBundleURLTypes:0:CFBundleURLSchemes:0 $VITE_APP_ID" ./ios/App/App/Info.plist -/usr/libexec/PlistBuddy -c "Set :CFBundleURLTypes:0:CFBundleURLName $VITE_APP_ID" ./ios/App/App/Info.plist +if test -f /usr/libexec/PlistBuddy; then + echo "\nIOS: Configuring Info.plist settings" + /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" ./ios/App/App/Info.plist + /usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $version" ./ios/App/App/Info.plist + /usr/libexec/PlistBuddy -c "Set :CFBundleURLTypes:0:CFBundleURLSchemes:0 $VITE_APP_ID" ./ios/App/App/Info.plist + /usr/libexec/PlistBuddy -c "Set :CFBundleURLTypes:0:CFBundleURLName $VITE_APP_ID" ./ios/App/App/Info.plist +fi From 49d29faa2e5b2fea2ae4dae6596f1c1a98ad3d19 Mon Sep 17 00:00:00 2001 From: Steve Cassidy Date: Thu, 5 Dec 2024 18:49:19 +1100 Subject: [PATCH 09/20] Update production deploy to match testflight Signed-off-by: Steve Cassidy --- .github/workflows/appstore-deploy.yml | 89 +++++++++++++---------- .github/workflows/appstore-testflight.yml | 22 +----- 2 files changed, 51 insertions(+), 60 deletions(-) diff --git a/.github/workflows/appstore-deploy.yml b/.github/workflows/appstore-deploy.yml index 2cd193099..bd44a61d4 100644 --- a/.github/workflows/appstore-deploy.yml +++ b/.github/workflows/appstore-deploy.yml @@ -1,43 +1,53 @@ ---- name: Deploy to Apple App Store Production, Manual on: workflow_dispatch: jobs: - check_date: - runs-on: ubuntu-latest - name: Check latest commit - outputs: - should_run: ${{ steps.should_run.outputs.should_run }} - steps: - - uses: actions/checkout@v3 - - name: print latest_commit - run: echo ${{ github.sha }} - - - id: should_run - continue-on-error: true - name: check latest commit is less than a day - if: ${{ github.event_name == 'schedule' }} - run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false" - ios-deploy: name: Deploying to Production runs-on: macOS-latest - needs: check_date steps: + # note not using Turbo build as it caused a problem with missing assets - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - name: Cache node modules + uses: actions/cache@v4 + env: + cache-name: cache-node-modules + with: + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: Install jq + run: | + brew update + brew install jq + - name: Declare some variables + shell: bash + run: | + echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" + echo "app_version=$(jq -r '.version' app/package.json)" >> "$GITHUB_ENV" + - name: Create version string + shell: bash + run: | + echo "version_string=v${{env.app_version}}-ios-#${{env.sha_short}}" >> "$GITHUB_ENV" + - name: Set up ruby env uses: ruby/setup-ruby@v1 with: ruby-version: 3.3.1 bundler-cache: false - working-directory: ios/App + working-directory: app/ios/App - run: | - cd ios/App; bundle install; bundle exec fastlane install_plugins + cd app/ios/App + bundle install + bundle exec fastlane install_plugins - name: Use Node.js 20 - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 20 cache: 'npm' @@ -49,30 +59,35 @@ jobs: run: | export platform="github-actions-ios" export serverprefix="fieldmark" - export PYTHON=python3.10 export VITE_CLUSTER_ADMIN_GROUP_NAME=cluster-admin - export VITE_COMMIT_VERSION=$(bin/getDescribeString.sh ios) + export VITE_COMMIT_VERSION=${{env.version_string}} export VITE_SHOW_WIPE=true - export VITE_SHOW_MINIFAUXTON=false - export VITE_DIRECTORY_HOST=db.fieldmark.app - export VITE_DIRECTORY_PORT=443 + export VITE_SHOW_MINIFAUXTON=true + export VITE_CONDUCTOR_URL=${{vars.NIGHTLY_CONDUCTOR_URL}} export VITE_TAG=prodIOS - export VITE_BUGSNAG_KEY=${{secrets.BUGSNAG_KEY}} - git clean -xfd + export VITE_NOTEBOOK_LIST_TYPE=${{vars.NOTEBOOK_LIST_TYPE}} + export VITE_NOTEBOOK_NAME=${{vars.NOTEBOOK_NAME}} + export VITE_THEME=${{vars.THEME}} + export VITE_BUGSNAG_KEY=${{secrets.BUGSNAG_KEY}} + export VITE_APP_ID=${{vars.APP_ID}} + export VITE_APP_NAME="${{vars.APP_NAME}}" + export VITE_SHOW_RECORD_SUMMARY_COUNTS="${{vars.VITE_SHOW_RECORD_SUMMARY_COUNTS}}" npm ci --python=python3.10 npm run build - - run: npx cap update ios - - run: npx cap sync --deployment ios - - run: cd ios/App; pod install + - name: Update IOS Build + run: | + cd app + npx cap update ios + npx cap sync --deployment ios + cd ios/App; pod install - name: Deploy iOS app to production with Fastlane uses: maierj/fastlane-action@v2.3.0 with: lane: production - subdirectory: 'ios/App' + subdirectory: 'app/ios/App' bundle-install-path: '$HOME/vendor/bundle' verbose: false env: - VITE_LOGIN_TOKEN: "${{ secrets.JWT_TEST_TOKEN }}" APP_STORE_CONNECT_TEAM_ID: '${{ secrets.APP_STORE_CONNECT_TEAM_ID }}' DEVELOPER_APP_ID: '${{ secrets.DEVELOPER_APP_ID }}' DEVELOPER_APP_IDENTIFIER: '${{ secrets.DEVELOPER_APP_IDENTIFIER }}' @@ -89,9 +104,3 @@ jobs: APPLE_KEY_CONTENT: '${{ secrets.APPLE_KEY_CONTENT }}' BROWSERSTACK_USERNAME: '${{secrets.BROWSERSTACK_USERNAME}}' BROWSERSTACK_ACCESS_KEY: '${{secrets.BROWSERSTACK_ACCESS_KEY}}' - - name: Archive ipas - uses: actions/upload-artifact@v3 - with: - name: ipa - path: | - /Users/runner/work/FAIMS3/FAIMS3/ios/App/App.ipa \ No newline at end of file diff --git a/.github/workflows/appstore-testflight.yml b/.github/workflows/appstore-testflight.yml index 852927a8b..cba49797c 100644 --- a/.github/workflows/appstore-testflight.yml +++ b/.github/workflows/appstore-testflight.yml @@ -29,11 +29,8 @@ jobs: needs: check_date if: ${{ needs.check_date.outputs.should_run != 'false' }} continue-on-error: false - # Disable Turbo to see if that fixes the build - possible cache issue - # env: - # TURBO_TEAM: ${{ vars.TURBO_TEAM }} - # TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} steps: + # note not using Turbo build as it caused a problem with missing assets - uses: actions/checkout@v4 - name: Cache node modules uses: actions/cache@v4 @@ -46,21 +43,6 @@ jobs: ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- ${{ runner.os }}- - - name: Configure Turborepo Remote Cache - run: | - mkdir -p .turbo - if [ -n "${{ vars.TURBO_API_URL }}" ]; then - echo '{"apiurl": "${{ vars.TURBO_API_URL }}"}' > .turbo/config.json - echo "Turborepo config file created at .turbo/config.json" - else - echo "TURBO_API_URL not set. Skipping Turborepo cache configuration." - fi - if [ -n "$TURBO_TEAM" ] && [ -n "$TURBO_TOKEN" ]; then - echo "TURBO_TEAM and TURBO_TOKEN environment variables set" - else - echo "TURBO_TEAM and/or TURBO_TOKEN not set. Remote caching may not be available." - fi - - name: Install jq run: | brew update @@ -103,7 +85,7 @@ jobs: export VITE_SHOW_WIPE=true export VITE_SHOW_MINIFAUXTON=true export VITE_CONDUCTOR_URL=${{vars.NIGHTLY_CONDUCTOR_URL}} - export VITE_TAG=prodAndroid + export VITE_TAG=prodIOS export VITE_NOTEBOOK_LIST_TYPE=${{vars.NOTEBOOK_LIST_TYPE}} export VITE_NOTEBOOK_NAME=${{vars.NOTEBOOK_NAME}} export VITE_THEME=${{vars.THEME}} From 9e2b51ef1b90cdb4f0a225583347914bef209f50 Mon Sep 17 00:00:00 2001 From: Steve Cassidy Date: Fri, 6 Dec 2024 10:27:09 +1100 Subject: [PATCH 10/20] update fastlane Signed-off-by: Steve Cassidy --- app/ios/App/Gemfile.lock | 74 +++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 35 deletions(-) diff --git a/app/ios/App/Gemfile.lock b/app/ios/App/Gemfile.lock index 8fbb89943..f6917f945 100644 --- a/app/ios/App/Gemfile.lock +++ b/app/ios/App/Gemfile.lock @@ -15,28 +15,28 @@ GEM minitest (>= 5.1) mutex_m tzinfo (~> 2.0) - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) artifactory (3.0.17) atomos (0.1.3) aws-eventstream (1.3.0) - aws-partitions (1.936.0) - aws-sdk-core (3.196.1) + aws-partitions (1.1018.0) + aws-sdk-core (3.214.0) aws-eventstream (~> 1, >= 1.3.0) - aws-partitions (~> 1, >= 1.651.0) - aws-sigv4 (~> 1.8) + aws-partitions (~> 1, >= 1.992.0) + aws-sigv4 (~> 1.9) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.82.0) - aws-sdk-core (~> 3, >= 3.193.0) - aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.151.0) - aws-sdk-core (~> 3, >= 3.194.0) + aws-sdk-kms (1.96.0) + aws-sdk-core (~> 3, >= 3.210.0) + aws-sigv4 (~> 1.5) + aws-sdk-s3 (1.176.0) + aws-sdk-core (~> 3, >= 3.210.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.8) - aws-sigv4 (1.8.0) + aws-sigv4 (~> 1.5) + aws-sigv4 (1.10.1) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) base64 (0.2.0) @@ -95,8 +95,8 @@ GEM escape (0.0.4) ethon (0.16.0) ffi (>= 1.15.0) - excon (0.110.0) - faraday (1.10.3) + excon (0.112.0) + faraday (1.10.4) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -117,15 +117,15 @@ GEM faraday-httpclient (1.0.1) faraday-multipart (1.0.4) multipart-post (~> 2) - faraday-net_http (1.0.1) + faraday-net_http (1.0.2) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) faraday-retry (1.0.3) - faraday_middleware (1.2.0) + faraday_middleware (1.2.1) faraday (~> 1.0) fastimage (2.3.1) - fastlane (2.220.0) + fastlane (2.225.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) @@ -141,6 +141,7 @@ GEM faraday-cookie_jar (~> 0.0.6) faraday_middleware (~> 1.0) fastimage (>= 2.1.0, < 3.0.0) + fastlane-sirp (>= 1.0.0) gh_inspector (>= 1.1.2, < 2.0.0) google-apis-androidpublisher_v3 (~> 0.3) google-apis-playcustomapp_v1 (~> 0.1) @@ -166,8 +167,10 @@ GEM xcodeproj (>= 1.13.0, < 2.0.0) xcpretty (~> 0.3.0) xcpretty-travis-formatter (>= 0.0.3, < 2.0.0) - fastlane-plugin-browserstack (0.3.2) + fastlane-plugin-browserstack (0.3.3) rest-client (~> 2.0, >= 2.0.2) + fastlane-sirp (1.0.0) + sysrandom (~> 1.0) ffi (1.16.3) fourflusher (2.3.1) fuzzy_match (2.0.4) @@ -188,7 +191,7 @@ GEM google-apis-core (>= 0.11.0, < 2.a) google-apis-storage_v1 (0.31.0) google-apis-core (>= 0.11.0, < 2.a) - google-cloud-core (1.7.0) + google-cloud-core (1.7.1) google-cloud-env (>= 1.0, < 3.a) google-cloud-errors (~> 1.0) google-cloud-env (1.6.0) @@ -210,31 +213,33 @@ GEM signet (>= 0.16, < 2.a) highline (2.0.3) http-accept (1.7.0) - http-cookie (1.0.5) + http-cookie (1.0.8) domain_name (~> 0.5) httpclient (2.8.3) i18n (1.14.5) concurrent-ruby (~> 1.0) jmespath (1.6.2) - json (2.7.2) - jwt (2.8.1) + json (2.9.0) + jwt (2.9.3) base64 - mime-types (3.5.2) + logger (1.6.2) + mime-types (3.6.0) + logger mime-types-data (~> 3.2015) - mime-types-data (3.2024.0507) - mini_magick (4.12.0) + mime-types-data (3.2024.1203) + mini_magick (4.13.2) mini_mime (1.1.5) minitest (5.23.1) molinillo (0.8.0) multi_json (1.15.0) multipart-post (2.4.1) mutex_m (0.2.0) - nanaimo (0.3.0) + nanaimo (0.4.0) nap (1.1.0) naturally (2.2.1) netrc (0.11.0) nkf (0.2.0) - optparse (0.5.0) + optparse (0.6.0) os (1.1.4) plist (3.7.1) public_suffix (4.0.7) @@ -249,8 +254,7 @@ GEM mime-types (>= 1.16, < 4.0) netrc (~> 0.8) retriable (3.1.2) - rexml (3.2.8) - strscan (>= 3.0.9) + rexml (3.3.9) rouge (2.0.7) ruby-macho (2.5.1) ruby2_keywords (0.0.5) @@ -264,7 +268,7 @@ GEM simctl (1.6.10) CFPropertyList naturally - strscan (3.1.0) + sysrandom (1.0.5) terminal-notifier (2.0.0) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) @@ -278,15 +282,15 @@ GEM tzinfo (2.0.6) concurrent-ruby (~> 1.0) uber (0.1.0) - unicode-display_width (2.5.0) + unicode-display_width (2.6.0) word_wrap (1.0.0) - xcodeproj (1.24.0) + xcodeproj (1.27.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) - nanaimo (~> 0.3.0) - rexml (~> 3.2.4) + nanaimo (~> 0.4.0) + rexml (>= 3.3.6, < 4.0) xcpretty (0.3.0) rouge (~> 2.0.7) xcpretty-travis-formatter (1.0.1) From 3d4a585db1b229f285694df44c033dc62b7307a5 Mon Sep 17 00:00:00 2001 From: Steve Cassidy Date: Fri, 6 Dec 2024 16:59:43 +1100 Subject: [PATCH 11/20] Tidy up some config variables for IOS build Signed-off-by: Steve Cassidy --- .github/workflows/appstore-deploy.yml | 4 +- .github/workflows/appstore-testflight.yml | 6 +-- app/ios/App/fastlane/Appfile | 2 +- app/ios/App/fastlane/Fastfile | 65 +++++++++++------------ app/ios/App/fastlane/Matchfile | 11 +--- 5 files changed, 36 insertions(+), 52 deletions(-) diff --git a/.github/workflows/appstore-deploy.yml b/.github/workflows/appstore-deploy.yml index bd44a61d4..e037f679b 100644 --- a/.github/workflows/appstore-deploy.yml +++ b/.github/workflows/appstore-deploy.yml @@ -90,15 +90,13 @@ jobs: env: APP_STORE_CONNECT_TEAM_ID: '${{ secrets.APP_STORE_CONNECT_TEAM_ID }}' DEVELOPER_APP_ID: '${{ secrets.DEVELOPER_APP_ID }}' - DEVELOPER_APP_IDENTIFIER: '${{ secrets.DEVELOPER_APP_IDENTIFIER }}' + APPLE_BUNDLE_IDENTIFIER: '${{ vars.APPLE_BUNDLE_IDENTIFIER }}' DEVELOPER_PORTAL_TEAM_ID: '${{ secrets.DEVELOPER_PORTAL_TEAM_ID }}' FASTLANE_APPLE_ID: '${{ secrets.FASTLANE_APPLE_ID }}' FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: '${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}' MATCH_PASSWORD: '${{ secrets.MATCH_PASSWORD }}' GIT_AUTHORIZATION: '${{ secrets.GIT_AUTHORIZATION }}' PROVISIONING_PROFILE_SPECIFIER: '${{ secrets.PROVISIONING_PROFILE_SPECIFIER }}' - TEMP_KEYCHAIN_PASSWORD: '${{ secrets.TEMP_KEYCHAIN_PASSWORD }}' - TEMP_KEYCHAIN_USER: '${{ secrets.TEMP_KEYCHAIN_USER }}' APPLE_KEY_ID: '${{ secrets.APPLE_KEY_ID }}' APPLE_ISSUER_ID: '${{ secrets.APPLE_ISSUER_ID }}' APPLE_KEY_CONTENT: '${{ secrets.APPLE_KEY_CONTENT }}' diff --git a/.github/workflows/appstore-testflight.yml b/.github/workflows/appstore-testflight.yml index cba49797c..57c0fb12e 100644 --- a/.github/workflows/appstore-testflight.yml +++ b/.github/workflows/appstore-testflight.yml @@ -111,16 +111,14 @@ jobs: verbose: false env: APP_STORE_CONNECT_TEAM_ID: '${{ secrets.APP_STORE_CONNECT_TEAM_ID }}' - DEVELOPER_APP_ID: '${{ secrets.DEVELOPER_APP_ID }}' - DEVELOPER_APP_IDENTIFIER: '${{ secrets.DEVELOPER_APP_IDENTIFIER }}' + DEVELOPER_APP_ID: '${{ vars.DEVELOPER_APP_ID }}' + APPLE_BUNDLE_IDENTIFIER: '${{ vars.APPLE_BUNDLE_IDENTIFIER }}' DEVELOPER_PORTAL_TEAM_ID: '${{ secrets.DEVELOPER_PORTAL_TEAM_ID }}' FASTLANE_APPLE_ID: '${{ secrets.FASTLANE_APPLE_ID }}' FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: '${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}' MATCH_PASSWORD: '${{ secrets.MATCH_PASSWORD }}' GIT_AUTHORIZATION: '${{ secrets.GIT_AUTHORIZATION }}' PROVISIONING_PROFILE_SPECIFIER: '${{ secrets.PROVISIONING_PROFILE_SPECIFIER }}' - TEMP_KEYCHAIN_PASSWORD: '${{ secrets.TEMP_KEYCHAIN_PASSWORD }}' - TEMP_KEYCHAIN_USER: '${{ secrets.TEMP_KEYCHAIN_USER }}' APPLE_KEY_ID: '${{ secrets.APPLE_KEY_ID }}' APPLE_ISSUER_ID: '${{ secrets.APPLE_ISSUER_ID }}' APPLE_KEY_CONTENT: '${{ secrets.APPLE_KEY_CONTENT }}' diff --git a/app/ios/App/fastlane/Appfile b/app/ios/App/fastlane/Appfile index 44862300a..f6dd73172 100644 --- a/app/ios/App/fastlane/Appfile +++ b/app/ios/App/fastlane/Appfile @@ -1,4 +1,4 @@ -app_identifier(ENV["DEVELOPER_APP_IDENTIFIER"]) +app_identifier(ENV["APPLE_BUNDLE_IDENTIFIER"]) apple_id(ENV["FASTLANE_APPLE_ID"]) itc_team_id(ENV["APP_STORE_CONNECT_TEAM_ID"]) team_id(ENV["DEVELOPER_PORTAL_TEAM_ID"]) diff --git a/app/ios/App/fastlane/Fastfile b/app/ios/App/fastlane/Fastfile index 3efccba9b..54d07d25a 100644 --- a/app/ios/App/fastlane/Fastfile +++ b/app/ios/App/fastlane/Fastfile @@ -3,42 +3,44 @@ update_fastlane default_platform(:ios) DEVELOPER_APP_ID = ENV["DEVELOPER_APP_ID"] -DEVELOPER_APP_IDENTIFIER = ENV["DEVELOPER_APP_IDENTIFIER"] +APPLE_BUNDLE_IDENTIFIER = ENV["APPLE_BUNDLE_IDENTIFIER"] PROVISIONING_PROFILE_SPECIFIER = ENV["PROVISIONING_PROFILE_SPECIFIER"] -TEMP_KEYCHAIN_USER = ENV["TEMP_KEYCHAIN_USER"] -TEMP_KEYCHAIN_PASSWORD = ENV["TEMP_KEYCHAIN_PASSWORD"] APPLE_ISSUER_ID = ENV["APPLE_ISSUER_ID"] APPLE_KEY_ID = ENV["APPLE_KEY_ID"] APPLE_KEY_CONTENT = ENV["APPLE_KEY_CONTENT"] GIT_AUTHORIZATION = ENV["GIT_AUTHORIZATION"] BROWSERSTACK_USERNAME = ENV["BROWSERSTACK_USERNAME"] BROWSERSTACK_ACCESS_KEY = ENV["BROWSERSTACK_ACCESS_KEY"] -def delete_temp_keychain(name) + + +# keychain details are hard-coded here with a generated password +keychain_name='keychain' +keychain_password = SecureRandom.hex(32) + +def delete_temp_keychain() delete_keychain( - name: name - ) if File.exist? File.expand_path("~/Library/Keychains/#{name}-db") + name: keychain_name + ) if File.exist? File.expand_path("~/Library/Keychains/#{keychain_name}-db") end -def create_temp_keychain(name, password) +def create_temp_keychain() create_keychain( - name: name, - password: password, + name: keychain_name, + password: keychain_password, unlock: false, timeout: 0 ) end -def ensure_temp_keychain(name, password) - delete_temp_keychain(name) - create_temp_keychain(name, password) +def ensure_temp_keychain() + delete_temp_keychain() + create_temp_keychain(keychain_name, keychain_password) end platform :ios do lane :closed_beta_browserstack do - keychain_name = TEMP_KEYCHAIN_USER - keychain_password = TEMP_KEYCHAIN_PASSWORD - ensure_temp_keychain(keychain_name, keychain_password) + ensure_temp_keychain() api_key = app_store_connect_api_key( key_id: APPLE_KEY_ID, @@ -48,16 +50,13 @@ platform :ios do in_house: false ) - #increment_build_number(xcodeproj: "App.xcodeproj") - #handled by script and xcode in build phases, I hope. - cocoapods( clean_install: true ) match( type: 'development', - app_identifier: "#{DEVELOPER_APP_IDENTIFIER}", + app_identifier: "#{APPLE_BUNDLE_IDENTIFIER}", git_basic_authorization: Base64.strict_encode64(ENV["GIT_AUTHORIZATION"]), readonly: false, keychain_name: keychain_name, @@ -72,7 +71,7 @@ platform :ios do export_method: "development", export_options: { provisioningProfiles: { - DEVELOPER_APP_ID => "match Development #{DEVELOPER_APP_IDENTIFIER}" + DEVELOPER_APP_ID => "match Development #{APPLE_BUNDLE_IDENTIFIER}" } } ) @@ -82,13 +81,13 @@ platform :ios do browserstack_access_key: "#{BROWSERSTACK_ACCESS_KEY}", custom_id: "ios-github-actions-fastlane" ) + + delete_temp_keychain() end lane :closed_beta_testflight do - keychain_name = TEMP_KEYCHAIN_USER - keychain_password = TEMP_KEYCHAIN_PASSWORD - ensure_temp_keychain(keychain_name, keychain_password) + ensure_temp_keychain() api_key = app_store_connect_api_key( key_id: APPLE_KEY_ID, @@ -107,7 +106,7 @@ platform :ios do match( type: 'appstore', - app_identifier: "#{DEVELOPER_APP_IDENTIFIER}", + app_identifier: "#{APPLE_BUNDLE_IDENTIFIER}", git_basic_authorization: Base64.strict_encode64(ENV["GIT_AUTHORIZATION"]), readonly: false, keychain_name: keychain_name, @@ -122,7 +121,7 @@ platform :ios do export_method: "app-store", export_options: { provisioningProfiles: { - DEVELOPER_APP_ID => "match AppStore #{DEVELOPER_APP_IDENTIFIER}" + DEVELOPER_APP_ID => "match AppStore #{APPLE_BUNDLE_IDENTIFIER}" # AppStore needs app-store. Browserstack needs development } } @@ -134,7 +133,7 @@ platform :ios do pilot( apple_id: "#{DEVELOPER_APP_ID}", - app_identifier: "#{DEVELOPER_APP_IDENTIFIER}", + app_identifier: "#{APPLE_BUNDLE_IDENTIFIER}", skip_waiting_for_build_processing: false, skip_submission: true, distribute_external: false, @@ -143,13 +142,11 @@ platform :ios do changelog: changelog ) - delete_temp_keychain(keychain_name) + delete_temp_keychain() end lane :production do - keychain_name = TEMP_KEYCHAIN_USER - keychain_password = TEMP_KEYCHAIN_PASSWORD - ensure_temp_keychain(keychain_name, keychain_password) + ensure_temp_keychain() api_key = app_store_connect_api_key( key_id: APPLE_KEY_ID, @@ -168,7 +165,7 @@ platform :ios do match( type: 'appstore', - app_identifier: "#{DEVELOPER_APP_IDENTIFIER}", + app_identifier: "#{APPLE_BUNDLE_IDENTIFIER}", git_basic_authorization: Base64.strict_encode64(ENV["GIT_AUTHORIZATION"]), readonly: false, keychain_name: keychain_name, @@ -183,14 +180,14 @@ platform :ios do export_method: "app-store", export_options: { provisioningProfiles: { - DEVELOPER_APP_ID => "match AppStore #{DEVELOPER_APP_IDENTIFIER}" + DEVELOPER_APP_ID => "match AppStore #{APPLE_BUNDLE_IDENTIFIER}" # AppStore needs app-store. Browserstack needs development } } ) deliver( - app_identifier: "#{DEVELOPER_APP_IDENTIFIER}", + app_identifier: "#{APPLE_BUNDLE_IDENTIFIER}", ipa: "App.ipa", submit_for_review: false, automatic_release: false, @@ -198,6 +195,6 @@ platform :ios do run_precheck_before_submit: false ) - delete_temp_keychain(keychain_name) + delete_temp_keychain() end end diff --git a/app/ios/App/fastlane/Matchfile b/app/ios/App/fastlane/Matchfile index 88757e138..91d2d5762 100644 --- a/app/ios/App/fastlane/Matchfile +++ b/app/ios/App/fastlane/Matchfile @@ -1,13 +1,4 @@ git_url("https://github.com/FAIMS/fastlane-keys.git") app_identifier('au.edu.faims.electronicfieldnotebook') storage_mode("git") -type("appstore") # The default type, can be: appstore, adhoc, enterprise or development -# username("brian@faims.edu.au") - -# app_identifier(["tools.fastlane.app", "tools.fastlane.app2"]) -# username("user@fastlane.tools") # Your Apple Developer Portal username - -# For all available options run `fastlane match --help` -# Remove the # in the beginning of the line to enable the other options - -# The docs are available on https://docs.fastlane.tools/actions/match +type("appstore") From bd49d56048d578d9959ae724c2461bb2d36cafeb Mon Sep 17 00:00:00 2001 From: Steve Cassidy Date: Fri, 6 Dec 2024 17:14:13 +1100 Subject: [PATCH 12/20] fix ruby syntax in fastfile Signed-off-by: Steve Cassidy --- app/ios/App/fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/ios/App/fastlane/Fastfile b/app/ios/App/fastlane/Fastfile index 54d07d25a..c754e4adf 100644 --- a/app/ios/App/fastlane/Fastfile +++ b/app/ios/App/fastlane/Fastfile @@ -14,7 +14,7 @@ BROWSERSTACK_ACCESS_KEY = ENV["BROWSERSTACK_ACCESS_KEY"] # keychain details are hard-coded here with a generated password -keychain_name='keychain' +keychain_name = 'keychain' keychain_password = SecureRandom.hex(32) def delete_temp_keychain() From 7dac9065b3ee38b9e944120ea017e0215209bc45 Mon Sep 17 00:00:00 2001 From: Steve Cassidy Date: Fri, 6 Dec 2024 17:37:00 +1100 Subject: [PATCH 13/20] trying to fix fastfile error Signed-off-by: Steve Cassidy --- app/ios/App/fastlane/Fastfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/ios/App/fastlane/Fastfile b/app/ios/App/fastlane/Fastfile index c754e4adf..1952f4670 100644 --- a/app/ios/App/fastlane/Fastfile +++ b/app/ios/App/fastlane/Fastfile @@ -14,13 +14,13 @@ BROWSERSTACK_ACCESS_KEY = ENV["BROWSERSTACK_ACCESS_KEY"] # keychain details are hard-coded here with a generated password -keychain_name = 'keychain' +keychain_name = "keychain" keychain_password = SecureRandom.hex(32) def delete_temp_keychain() delete_keychain( name: keychain_name - ) if File.exist? File.expand_path("~/Library/Keychains/#{keychain_name}-db") + ) if File.exist? File.expand_path("~/Library/Keychains/keychain-db") end def create_temp_keychain() From 5b64e4a86765f0fe2c347c9f7dcac596ece6cabb Mon Sep 17 00:00:00 2001 From: Steve Cassidy Date: Fri, 6 Dec 2024 17:48:06 +1100 Subject: [PATCH 14/20] Ruby globals need to be capitalised! Signed-off-by: Steve Cassidy --- app/ios/App/fastlane/Fastfile | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/app/ios/App/fastlane/Fastfile b/app/ios/App/fastlane/Fastfile index 1952f4670..66102262f 100644 --- a/app/ios/App/fastlane/Fastfile +++ b/app/ios/App/fastlane/Fastfile @@ -14,19 +14,19 @@ BROWSERSTACK_ACCESS_KEY = ENV["BROWSERSTACK_ACCESS_KEY"] # keychain details are hard-coded here with a generated password -keychain_name = "keychain" -keychain_password = SecureRandom.hex(32) +KEYCHAIN_NAME = "keychain" +KEYCHAIN_PASSWORD = SecureRandom.hex(32) def delete_temp_keychain() delete_keychain( - name: keychain_name - ) if File.exist? File.expand_path("~/Library/Keychains/keychain-db") + name: KEYCHAIN_NAME + ) if File.exist? File.expand_path("~/Library/Keychains/#{KEYCHAIN_NAME}-db") end def create_temp_keychain() create_keychain( - name: keychain_name, - password: keychain_password, + name: KEYCHAIN_NAME, + password: KEYCHAIN_PASSWORD, unlock: false, timeout: 0 ) @@ -34,7 +34,7 @@ end def ensure_temp_keychain() delete_temp_keychain() - create_temp_keychain(keychain_name, keychain_password) + create_temp_keychain(KEYCHAIN_NAME, KEYCHAIN_PASSWORD) end platform :ios do @@ -59,8 +59,8 @@ platform :ios do app_identifier: "#{APPLE_BUNDLE_IDENTIFIER}", git_basic_authorization: Base64.strict_encode64(ENV["GIT_AUTHORIZATION"]), readonly: false, - keychain_name: keychain_name, - keychain_password: keychain_password, + keychain_name: KEYCHAIN_NAME, + keychain_password: KEYCHAIN_PASSWORD, api_key: api_key ) @@ -109,8 +109,8 @@ platform :ios do app_identifier: "#{APPLE_BUNDLE_IDENTIFIER}", git_basic_authorization: Base64.strict_encode64(ENV["GIT_AUTHORIZATION"]), readonly: false, - keychain_name: keychain_name, - keychain_password: keychain_password, + keychain_name: KEYCHAIN_NAME, + keychain_password: KEYCHAIN_PASSWORD, api_key: api_key ) @@ -168,8 +168,8 @@ platform :ios do app_identifier: "#{APPLE_BUNDLE_IDENTIFIER}", git_basic_authorization: Base64.strict_encode64(ENV["GIT_AUTHORIZATION"]), readonly: false, - keychain_name: keychain_name, - keychain_password: keychain_password, + keychain_name: KEYCHAIN_NAME, + keychain_password: KEYCHAIN_PASSWORD, api_key: api_key ) From 5f1467643d7d080995b381905372a8c94b599ca1 Mon Sep 17 00:00:00 2001 From: Steve Cassidy Date: Fri, 6 Dec 2024 18:01:49 +1100 Subject: [PATCH 15/20] fix ruby error Signed-off-by: Steve Cassidy --- app/ios/App/fastlane/Fastfile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/ios/App/fastlane/Fastfile b/app/ios/App/fastlane/Fastfile index 66102262f..8dc94a116 100644 --- a/app/ios/App/fastlane/Fastfile +++ b/app/ios/App/fastlane/Fastfile @@ -23,7 +23,8 @@ def delete_temp_keychain() ) if File.exist? File.expand_path("~/Library/Keychains/#{KEYCHAIN_NAME}-db") end -def create_temp_keychain() +def ensure_temp_keychain() + delete_temp_keychain() create_keychain( name: KEYCHAIN_NAME, password: KEYCHAIN_PASSWORD, @@ -32,11 +33,6 @@ def create_temp_keychain() ) end -def ensure_temp_keychain() - delete_temp_keychain() - create_temp_keychain(KEYCHAIN_NAME, KEYCHAIN_PASSWORD) -end - platform :ios do lane :closed_beta_browserstack do From 63528347205322f82fc931bae4001968e8b3b2a3 Mon Sep 17 00:00:00 2001 From: Steve Cassidy Date: Fri, 6 Dec 2024 19:33:14 +1100 Subject: [PATCH 16/20] Fix canScan logic in QRCode button Signed-off-by: Steve Cassidy --- app/src/gui/fields/qrcode/QRCodeFormField.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/gui/fields/qrcode/QRCodeFormField.tsx b/app/src/gui/fields/qrcode/QRCodeFormField.tsx index d830616a3..1e15e2cf7 100644 --- a/app/src/gui/fields/qrcode/QRCodeFormField.tsx +++ b/app/src/gui/fields/qrcode/QRCodeFormField.tsx @@ -276,7 +276,7 @@ export function QRCodeButton(props: QRCodeButtonProps): JSX.Element { ); } - if (canScan) { + if (!canScan) { return (