From 2186691bbe59616cec319757f559a6e2ed86443e Mon Sep 17 00:00:00 2001 From: Chris Tomlinson Date: Thu, 16 Nov 2023 20:13:26 +0000 Subject: [PATCH] Upgrade some build dependencies and attempt ios native build every push --- .github/workflows/flutter_build.yml | 19 ++++++++- .github/workflows/flutter_release_ios.yml | 12 +++--- ios/Podfile | 16 ++++---- ios/Podfile.lock | 20 +++++----- ios/fastlane/Fastfile | 48 +++++++++++++++++++++++ 5 files changed, 89 insertions(+), 26 deletions(-) diff --git a/.github/workflows/flutter_build.yml b/.github/workflows/flutter_build.yml index a57c0bb..7fc2639 100644 --- a/.github/workflows/flutter_build.yml +++ b/.github/workflows/flutter_build.yml @@ -113,5 +113,22 @@ jobs: with: xcode-version: '15.0' - - name: Build iOS App + - name: Build iOS Flutter App run: flutter build ios --config-only --release --no-codesign --dart-define KEEVAULT_STAGE=prod --dart-define KEEVAULT_NAME_SUFFIX= --dart-define KEEVAULT_ID_SUFFIX= --dart-define IAP_APPLE_APP_STORE=yes + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.0' + bundler: 2.4.19 + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + + - name: Build iOS App bundle + env: + MATCH_GIT_BASIC_AUTHORIZATION: '${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}' + MATCH_PASSWORD: '${{ secrets.MATCH_PASSWORD }}' + TEMP_KEYCHAIN_USER: '${{ secrets.TEMP_KEYCHAIN_USER }}' + TEMP_KEYCHAIN_PASSWORD: '${{ secrets.TEMP_KEYCHAIN_PASSWORD }}' + run: | + cd ios + bundle exec fastlane beta_build_only diff --git a/.github/workflows/flutter_release_ios.yml b/.github/workflows/flutter_release_ios.yml index 91f67c1..833ba2c 100644 --- a/.github/workflows/flutter_release_ios.yml +++ b/.github/workflows/flutter_release_ios.yml @@ -50,14 +50,14 @@ jobs: with: xcode-version: '15.0' - - name: Build iOS App + - name: Build iOS Flutter App run: flutter build ios --config-only --release --no-codesign --dart-define KEEVAULT_STAGE=beta --dart-define KEEVAULT_NAME_SUFFIX='(b)' --dart-define KEEVAULT_ID_SUFFIX=.beta - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7 - bundler: 2.3.19 + ruby-version: '3.0' + bundler: 2.4.19 bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Release beta stage app to beta delivery platform @@ -119,14 +119,14 @@ jobs: - name: Run tests run: flutter test - - name: Build iOS App + - name: Build iOS Flutter App run: flutter build ios --config-only --release --no-codesign --dart-define KEEVAULT_STAGE=prod --dart-define KEEVAULT_NAME_SUFFIX= --dart-define KEEVAULT_ID_SUFFIX= --dart-define IAP_APPLE_APP_STORE=yes - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7 - bundler: 2.3.19 + ruby-version: '3.0' + bundler: 2.4.19 bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Release prod stage app to appstore testflight diff --git a/ios/Podfile b/ios/Podfile index 442623c..b47e6c8 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -42,16 +42,14 @@ target 'Runner' do flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) end -# post_install do |installer| -# installer.generated_projects.each do |project| -# project.targets.each do |target| -# target.build_configurations.each do |config| -# config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' -# end -# end -# end - post_install do |installer| + installer.generated_projects.each do |project| + project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.5' + end + end + end installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index fcef2cd..ff775a4 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -60,9 +60,9 @@ PODS: - Flutter - rate_my_app (1.1.4): - Flutter - - SDWebImage (5.14.2): - - SDWebImage/Core (= 5.14.2) - - SDWebImage/Core (5.14.2) + - SDWebImage (5.16.0): + - SDWebImage/Core (= 5.16.0) + - SDWebImage/Core (5.16.0) - sensitive_clipboard (0.0.1): - Flutter - share_plus (0.0.1): @@ -70,8 +70,8 @@ PODS: - shared_preferences_foundation (0.0.1): - Flutter - FlutterMacOS - - SwiftProtobuf (1.20.3) - - SwiftyGif (5.4.3) + - SwiftProtobuf (1.22.0) + - SwiftyGif (5.4.4) - url_launcher_ios (0.0.1): - Flutter @@ -156,14 +156,14 @@ SPEC CHECKSUMS: path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6 rate_my_app: e249ec0751c276811746ff89558c23dc0da39f0c - SDWebImage: b9a731e1d6307f44ca703b3976d18c24ca561e84 + SDWebImage: 2aea163b50bfcb569a2726b6a754c54a4506fcf6 sensitive_clipboard: d4866e5d176581536c27bb1618642ee83adca986 share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5 shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 - SwiftProtobuf: b02b5075dcf60c9f5f403000b3b0c202a11b6ae1 - SwiftyGif: 6c3eafd0ce693cad58bb63d2b2fb9bacb8552780 + SwiftProtobuf: 40bd808372cb8706108f22d28f8ab4a6b9bc6989 + SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f url_launcher_ios: 68d46cc9766d0c41dbdc884310529557e3cd7a86 -PODFILE CHECKSUM: 0f9f002d1b656a9e3daaf89beca155cdf7f30114 +PODFILE CHECKSUM: 0658f7bb36458779f6da1691e33f9d925242f612 -COCOAPODS: 1.11.3 +COCOAPODS: 1.14.2 diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index 94eb181..e752b34 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -244,4 +244,52 @@ platform :ios do delete_temp_keychain(keychain_name) end end + + ### Warning!! Only thing that determines whether this points at beta or prod servers is + # the command most recently executed! + # + # Remember to revert the changes made to ios/Runner.xcodeproj/project.pbxproj before comitting! + desc "Build a new beta package but do nothing with it" + lane :beta_build_only do + keychain_name = TEMP_KEYCHAIN_USER + keychain_password = TEMP_KEYCHAIN_PASSWORD + + begin + ensure_temp_keychain(keychain_name, keychain_password) + + match( + type: "adhoc", + app_identifier: ['com.keevault.keevault.beta', 'com.keevault.keevault.beta.autofill'], + readonly: true, + keychain_name: keychain_name, + keychain_password: keychain_password + ) + update_project_provisioning( + xcodeproj: "Runner.xcodeproj", + profile: ENV['sigh_com.keevault.keevault.beta_adhoc_profile-path'], + target_filter: ".*Runner.*", + build_configuration: "Release" + ) + update_project_provisioning( + xcodeproj: "Runner.xcodeproj", + profile: ENV['sigh_com.keevault.keevault.beta.autofill_adhoc_profile-path'], + target_filter: ".*KeeVaultAutofill.*", + build_configuration: "Release" + ) + build_app( + workspace: "Runner.xcworkspace", + scheme: "Runner", + configuration: 'Release', + export_method: 'ad-hoc', + export_options: { + provisioningProfiles: { + 'com.keevault.keevault.beta' => 'match AdHoc com.keevault.keevault.beta', + 'com.keevault.keevault.beta.autofill' => 'match AdHoc com.keevault.keevault.beta.autofill' + } + } + ) + ensure + delete_temp_keychain(keychain_name) + end + end end