From 277610891602b2fbd17a554430d6dd67d79f1e71 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 18 Mar 2024 13:46:38 +0100 Subject: [PATCH 01/14] Setup testflight against v8 branch --- .github/workflows/testflight.yaml | 56 +++++++++++++ .../ios/Flutter/AppFrameworkInfo.plist | 2 +- flutter/example/ios/Gemfile | 3 + flutter/example/ios/Podfile | 2 +- .../ios/Runner.xcodeproj/project.pbxproj | 21 ++--- flutter/example/ios/Runner/Info.plist | 8 +- flutter/example/ios/fastlane/Appfile | 7 ++ flutter/example/ios/fastlane/Fastfile | 80 +++++++++++++++++++ flutter/example/ios/fastlane/Matchfile | 5 ++ scripts/ci-select-xcode.sh | 14 ++++ 10 files changed, 183 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/testflight.yaml create mode 100644 flutter/example/ios/Gemfile create mode 100644 flutter/example/ios/fastlane/Appfile create mode 100644 flutter/example/ios/fastlane/Fastfile create mode 100644 flutter/example/ios/fastlane/Matchfile create mode 100644 scripts/ci-select-xcode.sh diff --git a/.github/workflows/testflight.yaml b/.github/workflows/testflight.yaml new file mode 100644 index 0000000000..cc3aa63f6d --- /dev/null +++ b/.github/workflows/testflight.yaml @@ -0,0 +1,56 @@ +name: Upload to Testflight +on: + push: + branches: + - main + - release/** + pull_request: +# paths: +# - '.github/workflows/testflight.yml' +jobs: + upload_to_testflight: + name: Build and Upload to Testflight + runs-on: macos-13 + steps: + - uses: actions/checkout@v4 + - uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0 + - run: ./scripts/ci-select-xcode.sh + - uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # pin@v1.152.0 + with: + ruby-version: '2.7.5' + bundler-cache: true + + - name: flutter + working-directory: ./flutter/example + run: | + flutter upgrade + flutter pub get + flutter build ios --no-codesign + + - name: Install Fastlane + working-directory: ./flutter/example/ios + run: bundle install + + - name: Bump, Build & Upload App to TestFlight + working-directory: ./flutter/example/ios + env: + APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }} + APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} + APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }} + FASTLANE_BUNDLE_VERSION: ${{ github.run_number }} + FASTLANE_KEYCHAIN_PASSWORD: ${{ secrets.FASTLANE_KEYCHAIN_PASSWORD }} + MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }} + MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} + MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_LOG_LEVEL: DEBUG + run: | + bundle exec fastlane bump_build_number + bundle exec fastlane build_release + bundle exec fastlane upload_testflight + + - name: Upload Symbols to Sentry + working-directory: ./flutter/example + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + run: flutter packages pub run sentry_dart_plugin \ No newline at end of file diff --git a/flutter/example/ios/Flutter/AppFrameworkInfo.plist b/flutter/example/ios/Flutter/AppFrameworkInfo.plist index 1bdf525f9f..b7506dd05b 100644 --- a/flutter/example/ios/Flutter/AppFrameworkInfo.plist +++ b/flutter/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.0 diff --git a/flutter/example/ios/Gemfile b/flutter/example/ios/Gemfile new file mode 100644 index 0000000000..7a118b49be --- /dev/null +++ b/flutter/example/ios/Gemfile @@ -0,0 +1,3 @@ +source "https://rubygems.org" + +gem "fastlane" diff --git a/flutter/example/ios/Podfile b/flutter/example/ios/Podfile index 55ddd63416..8cb4ddb285 100644 --- a/flutter/example/ios/Podfile +++ b/flutter/example/ios/Podfile @@ -44,7 +44,7 @@ post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) target.build_configurations.each do |config| - config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' end end end diff --git a/flutter/example/ios/Runner.xcodeproj/project.pbxproj b/flutter/example/ios/Runner.xcodeproj/project.pbxproj index 29c58327af..ac52d1dcc4 100644 --- a/flutter/example/ios/Runner.xcodeproj/project.pbxproj +++ b/flutter/example/ios/Runner.xcodeproj/project.pbxproj @@ -460,7 +460,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -483,6 +483,7 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -491,7 +492,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = io.sentry.flutter.example; + PRODUCT_BUNDLE_IDENTIFIER = io.sentry.flutter.sample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -518,7 +519,7 @@ MARKETING_VERSION = 1.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = io.sentry.flutter.example.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = io.sentry.flutter.sample.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_EMIT_LOC_STRINGS = NO; @@ -547,7 +548,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 16.2; MARKETING_VERSION = 1.0; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = io.sentry.flutter.example.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = io.sentry.flutter.sample.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; @@ -574,7 +575,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 16.2; MARKETING_VERSION = 1.0; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = io.sentry.flutter.example.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = io.sentry.flutter.sample.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; @@ -631,7 +632,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -681,7 +682,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -706,6 +707,7 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -714,7 +716,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = io.sentry.flutter.example; + PRODUCT_BUNDLE_IDENTIFIER = io.sentry.flutter.sample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -737,6 +739,7 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -745,7 +748,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = io.sentry.flutter.example; + PRODUCT_BUNDLE_IDENTIFIER = io.sentry.flutter.sample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; diff --git a/flutter/example/ios/Runner/Info.plist b/flutter/example/ios/Runner/Info.plist index 91d89f84d6..2df117fbe0 100644 --- a/flutter/example/ios/Runner/Info.plist +++ b/flutter/example/ios/Runner/Info.plist @@ -2,6 +2,8 @@ + CADisableMinimumFrameDurationOnPhone + CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleExecutable @@ -22,6 +24,8 @@ $(FLUTTER_BUILD_NUMBER) LSRequiresIPhoneOS + UIApplicationSupportsIndirectInputEvents + UILaunchStoryboardName LaunchScreen UIMainStoryboardFile @@ -41,9 +45,5 @@ UIViewControllerBasedStatusBarAppearance - CADisableMinimumFrameDurationOnPhone - - UIApplicationSupportsIndirectInputEvents - diff --git a/flutter/example/ios/fastlane/Appfile b/flutter/example/ios/fastlane/Appfile new file mode 100644 index 0000000000..1f85333eac --- /dev/null +++ b/flutter/example/ios/fastlane/Appfile @@ -0,0 +1,7 @@ +app_identifier("io.sentry.flutter.sample") # The bundle identifier of your app + +itc_team_id("96157806") # App Store Connect Team ID +team_id("97JCY7859U") # Developer Portal Team ID + +# For more information about the Appfile, see: +# https://docs.fastlane.tools/advanced/#appfile diff --git a/flutter/example/ios/fastlane/Fastfile b/flutter/example/ios/fastlane/Fastfile new file mode 100644 index 0000000000..ad44fabd06 --- /dev/null +++ b/flutter/example/ios/fastlane/Fastfile @@ -0,0 +1,80 @@ +default_platform(:ios) + +platform :ios do + + desc "Bump Build Number" + lane :bump_build_number do + fetch_api_key() + increment_build_number( + build_number: latest_testflight_build_number + 1, + xcodeproj: "./Runner.xcodeproj" + ) + end + + desc "Build Release" + lane :build_release do + + setup_ci + + disable_automatic_code_signing + + sync_code_signing( + type: "development", + readonly: true, + app_identifier: ["io.sentry.flutter.sample"] + ) + + sync_code_signing( + type: "appstore", + readonly: true, + app_identifier: ["io.sentry.flutter.sample"] + ) + + update_project_provisioning( + xcodeproj: "Runner.xcodeproj", + target_filter: "Runner", + profile: ENV["sigh_io.sentry.flutter.sample_appstore_profile-path"], + build_configuration: "Release" + ) + + build_app( + workspace: "Runner.xcworkspace", + scheme: "Runner", + configuration: "Release", + clean: true, + include_symbols: true, + export_method: "app-store", + output_directory:"./build/", + export_options: { + method: "app-store", + provisioningProfiles: { + "io.sentry.flutter.sample" => ENV["sigh_io.sentry.flutter.sample_appstore_profile-name"] + } + }, + codesigning_identity: ENV["sigh_io.sentry.flutter.sample_appstore_certificate-name"], + output_name: "sentry_flutter_sample.ipa" + ) + + delete_keychain( + name: "fastlane_tmp_keychain" + ) unless is_ci + end + + desc "Upload to TestFlight" + lane :upload_testflight do + fetch_api_key() + testflight( + skip_waiting_for_build_processing: true, + ipa: "./build/sentry_flutter_sample.ipa" + ) + end + + desc "Fetch ASC API Key" + lane :fetch_api_key do + app_store_connect_api_key( + key_id: ENV["APP_STORE_CONNECT_KEY_ID"], + issuer_id: ENV["APP_STORE_CONNECT_ISSUER_ID"], + key_content: ENV["APP_STORE_CONNECT_KEY"] + ) + end +end diff --git a/flutter/example/ios/fastlane/Matchfile b/flutter/example/ios/fastlane/Matchfile new file mode 100644 index 0000000000..054fef1c37 --- /dev/null +++ b/flutter/example/ios/fastlane/Matchfile @@ -0,0 +1,5 @@ +git_url("git@github.com:getsentry/codesigning.git") +storage_mode("git") +username("bot@getsentry.com") # Your Apple Developer Portal username + +# The docs are available on https://docs.fastlane.tools/actions/match diff --git a/scripts/ci-select-xcode.sh b/scripts/ci-select-xcode.sh new file mode 100644 index 0000000000..326ef74467 --- /dev/null +++ b/scripts/ci-select-xcode.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# For available Xcode versions see: +# - https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md#xcode +# - https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md +# - https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md + +set -euo pipefail + +# 14.3 is the default +XCODE_VERSION="${1:-14.3}" + +sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app/Contents/Developer +swiftc --version \ No newline at end of file From 46b5e7e0cf187cc572c16bab122eb0a98e212c5c Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 18 Mar 2024 14:13:39 +0100 Subject: [PATCH 02/14] enable run on pr --- .github/workflows/testflight.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testflight.yaml b/.github/workflows/testflight.yaml index cc3aa63f6d..937425c542 100644 --- a/.github/workflows/testflight.yaml +++ b/.github/workflows/testflight.yaml @@ -5,8 +5,9 @@ on: - main - release/** pull_request: -# paths: -# - '.github/workflows/testflight.yml' + paths: + - '.github/workflows/testflight.yml' + jobs: upload_to_testflight: name: Build and Upload to Testflight From 453ecb3f918689dd329f7354135e304065911852 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 18 Mar 2024 14:18:21 +0100 Subject: [PATCH 03/14] run on push --- .github/workflows/testflight.yaml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/testflight.yaml b/.github/workflows/testflight.yaml index 937425c542..570cb0e3e4 100644 --- a/.github/workflows/testflight.yaml +++ b/.github/workflows/testflight.yaml @@ -1,12 +1,13 @@ name: Upload to Testflight on: - push: - branches: - - main - - release/** - pull_request: - paths: - - '.github/workflows/testflight.yml' + pull_request: # TODO: Remove after running once... +# push: +# branches: +# - main +# - release/** +# pull_request: +# paths: +# - '.github/workflows/testflight.yml' jobs: upload_to_testflight: From 3652ef9ce409a820571ea0f8554d74221c8d66cb Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 18 Mar 2024 14:26:40 +0100 Subject: [PATCH 04/14] make executable --- scripts/ci-select-xcode.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 scripts/ci-select-xcode.sh diff --git a/scripts/ci-select-xcode.sh b/scripts/ci-select-xcode.sh old mode 100644 new mode 100755 From 32eed11db4ddd2e3c4948ee6147f421b78dcf831 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 18 Mar 2024 15:00:41 +0100 Subject: [PATCH 05/14] fix beta version number --- flutter/example/ios/fastlane/Fastfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/flutter/example/ios/fastlane/Fastfile b/flutter/example/ios/fastlane/Fastfile index ad44fabd06..e14ca13d3c 100644 --- a/flutter/example/ios/fastlane/Fastfile +++ b/flutter/example/ios/fastlane/Fastfile @@ -5,6 +5,21 @@ platform :ios do desc "Bump Build Number" lane :bump_build_number do fetch_api_key() + + version_string = get_version_number(xcodeproj: "./Runner.xcodeproj") + version_parts = version_string.split(".") + + # Remove last digit if necessary + if version_parts.length > 3 + version_parts.pop + end + + new_version = version_parts.join(".") + + increment_version_number( + version_number: new_version, + xcodeproj: "./Runner.xcodeproj" + ) increment_build_number( build_number: latest_testflight_build_number + 1, xcodeproj: "./Runner.xcodeproj" From 4724c96ef7b65acdceb44768ead6a0adf6404ff6 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 18 Mar 2024 15:19:48 +0100 Subject: [PATCH 06/14] push on main, release and workflow update --- .github/workflows/testflight.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/testflight.yaml b/.github/workflows/testflight.yaml index 570cb0e3e4..937425c542 100644 --- a/.github/workflows/testflight.yaml +++ b/.github/workflows/testflight.yaml @@ -1,13 +1,12 @@ name: Upload to Testflight on: - pull_request: # TODO: Remove after running once... -# push: -# branches: -# - main -# - release/** -# pull_request: -# paths: -# - '.github/workflows/testflight.yml' + push: + branches: + - main + - release/** + pull_request: + paths: + - '.github/workflows/testflight.yml' jobs: upload_to_testflight: From 998c7e1087d5fc0c0497410e9ff93717321d45b9 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Tue, 19 Mar 2024 09:58:17 +0100 Subject: [PATCH 07/14] bump xcode default version to 15.0.1 --- scripts/ci-select-xcode.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/ci-select-xcode.sh b/scripts/ci-select-xcode.sh index 326ef74467..b2063c6893 100755 --- a/scripts/ci-select-xcode.sh +++ b/scripts/ci-select-xcode.sh @@ -1,14 +1,13 @@ #!/bin/bash # For available Xcode versions see: -# - https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md#xcode -# - https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md # - https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md +# - https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md set -euo pipefail # 14.3 is the default -XCODE_VERSION="${1:-14.3}" +XCODE_VERSION="${1:-15.0.1}" sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app/Contents/Developer swiftc --version \ No newline at end of file From 987fc43236abc1214ef6663cc06be4da60495619 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Tue, 19 Mar 2024 09:58:26 +0100 Subject: [PATCH 08/14] add newline --- scripts/ci-select-xcode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci-select-xcode.sh b/scripts/ci-select-xcode.sh index b2063c6893..e620aa71ac 100755 --- a/scripts/ci-select-xcode.sh +++ b/scripts/ci-select-xcode.sh @@ -10,4 +10,4 @@ set -euo pipefail XCODE_VERSION="${1:-15.0.1}" sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app/Contents/Developer -swiftc --version \ No newline at end of file +swiftc --version From 1dfe25199fb3bdd94275c95ca37db1acc2f49468 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Tue, 19 Mar 2024 10:00:57 +0100 Subject: [PATCH 09/14] Add ITSAppUsesNonExemptEncryption to info.plist --- .github/workflows/testflight.yaml | 2 +- flutter/example/ios/Runner/Info.plist | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testflight.yaml b/.github/workflows/testflight.yaml index 937425c542..6cbd485298 100644 --- a/.github/workflows/testflight.yaml +++ b/.github/workflows/testflight.yaml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0 - - run: ./scripts/ci-select-xcode.sh + - run: ./scripts/ci-select-xcode.sh # Select Xcode 15.0.1 - uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # pin@v1.152.0 with: ruby-version: '2.7.5' diff --git a/flutter/example/ios/Runner/Info.plist b/flutter/example/ios/Runner/Info.plist index 2df117fbe0..1023c8c85e 100644 --- a/flutter/example/ios/Runner/Info.plist +++ b/flutter/example/ios/Runner/Info.plist @@ -2,6 +2,8 @@ + ITSAppUsesNonExemptEncryption + CADisableMinimumFrameDurationOnPhone CFBundleDevelopmentRegion From e5ede833092b09f6285a02a65d39e2c7023450c3 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Tue, 19 Mar 2024 10:18:59 +0100 Subject: [PATCH 10/14] select with xcodes --- .github/workflows/testflight.yaml | 2 +- scripts/ci-select-xcode.sh | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100755 scripts/ci-select-xcode.sh diff --git a/.github/workflows/testflight.yaml b/.github/workflows/testflight.yaml index 6cbd485298..3e05b6afbb 100644 --- a/.github/workflows/testflight.yaml +++ b/.github/workflows/testflight.yaml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0 - - run: ./scripts/ci-select-xcode.sh # Select Xcode 15.0.1 + - run: xcodes select 15.0.1 - uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # pin@v1.152.0 with: ruby-version: '2.7.5' diff --git a/scripts/ci-select-xcode.sh b/scripts/ci-select-xcode.sh deleted file mode 100755 index e620aa71ac..0000000000 --- a/scripts/ci-select-xcode.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -# For available Xcode versions see: -# - https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md -# - https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md - -set -euo pipefail - -# 14.3 is the default -XCODE_VERSION="${1:-15.0.1}" - -sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app/Contents/Developer -swiftc --version From 60aa6b87e1cffc99a5eba2665f7d68e8e5f139dc Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Tue, 19 Mar 2024 10:25:20 +0100 Subject: [PATCH 11/14] fix file extension --- .github/workflows/{testflight.yaml => testflight.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{testflight.yaml => testflight.yml} (100%) diff --git a/.github/workflows/testflight.yaml b/.github/workflows/testflight.yml similarity index 100% rename from .github/workflows/testflight.yaml rename to .github/workflows/testflight.yml From 50d555ddc0ff2c81771a231ba7bcb707b05d5298 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Tue, 9 Apr 2024 16:10:59 +0200 Subject: [PATCH 12/14] fix warnings --- flutter/example/lib/main.dart | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/flutter/example/lib/main.dart b/flutter/example/lib/main.dart index 26bbdce6d8..ac7d2c0f9b 100644 --- a/flutter/example/lib/main.dart +++ b/flutter/example/lib/main.dart @@ -478,12 +478,7 @@ class MainScaffold extends StatelessWidget { TooltipButton( onPressed: () async { final id = await Sentry.captureMessage('UserFeedback'); - // ignore: use_build_context_synchronously - if (!context.isMounted) { - return; - } - - // ignore: use_build_context_synchronously + if (!context.isMounted) return; await showDialog( context: context, builder: (context) { @@ -906,12 +901,7 @@ Future makeWebRequest(BuildContext context) async { await transaction.finish(status: const SpanStatus.ok()); - // ignore: use_build_context_synchronously - if (!context.isMounted) { - return; - } - - // ignore: use_build_context_synchronously + if (!context.isMounted) return; await showDialog( context: context, builder: (context) { @@ -957,12 +947,7 @@ Future makeWebRequestWithDio(BuildContext context) async { await span.finish(); } - // ignore: use_build_context_synchronously - if (!context.isMounted) { - return; - } - - // ignore: use_build_context_synchronously + if (!context.isMounted) return; await showDialog( context: context, builder: (context) { @@ -992,12 +977,7 @@ Future showDialogWithTextAndImage(BuildContext context) async { final text = await DefaultAssetBundle.of(context).loadString('assets/lorem-ipsum.txt'); - // ignore: use_build_context_synchronously - if (!context.isMounted) { - return; - } - - // ignore: use_build_context_synchronously + if (!context.isMounted) return; await showDialog( context: context, // gets tracked if using SentryNavigatorObserver From 15d8b8c2d39b63ffe129691bd6900aa91c4c14b4 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Tue, 9 Apr 2024 16:19:49 +0200 Subject: [PATCH 13/14] use correct property to remove warning --- flutter/example/lib/main.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flutter/example/lib/main.dart b/flutter/example/lib/main.dart index ac7d2c0f9b..64bfba90e3 100644 --- a/flutter/example/lib/main.dart +++ b/flutter/example/lib/main.dart @@ -478,7 +478,7 @@ class MainScaffold extends StatelessWidget { TooltipButton( onPressed: () async { final id = await Sentry.captureMessage('UserFeedback'); - if (!context.isMounted) return; + if (!context.mounted) return; await showDialog( context: context, builder: (context) { @@ -901,7 +901,7 @@ Future makeWebRequest(BuildContext context) async { await transaction.finish(status: const SpanStatus.ok()); - if (!context.isMounted) return; + if (!context.mounted) return; await showDialog( context: context, builder: (context) { @@ -947,7 +947,7 @@ Future makeWebRequestWithDio(BuildContext context) async { await span.finish(); } - if (!context.isMounted) return; + if (!context.mounted) return; await showDialog( context: context, builder: (context) { @@ -977,7 +977,7 @@ Future showDialogWithTextAndImage(BuildContext context) async { final text = await DefaultAssetBundle.of(context).loadString('assets/lorem-ipsum.txt'); - if (!context.isMounted) return; + if (!context.mounted) return; await showDialog( context: context, // gets tracked if using SentryNavigatorObserver From c5de52d336f35d59aeafb56a8544e8c21c17e1df Mon Sep 17 00:00:00 2001 From: GIancarlo Buenaflor Date: Wed, 10 Apr 2024 10:01:16 +0200 Subject: [PATCH 14/14] Update ktlint --- .github/workflows/flutter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flutter.yml b/.github/workflows/flutter.yml index 02d9a1f012..7a4ee5df84 100644 --- a/.github/workflows/flutter.yml +++ b/.github/workflows/flutter.yml @@ -188,7 +188,7 @@ jobs: - uses: actions/checkout@v4 - name: ktlint - uses: ScaCap/action-ktlint@0ff81efa49425bd0df46caabd8005aafdc8f2cf2 # pin@1.8.0 + uses: ScaCap/action-ktlint@38262d0fb8bff43ddafc8b3c04bce6e6c7263319 # pin@1.8.1 with: github_token: ${{ secrets.github_token }} reporter: github-pr-review