From 678388480b31b2a55af7b64100c690d549ed8532 Mon Sep 17 00:00:00 2001 From: W <115107835+w-goog@users.noreply.github.com> Date: Thu, 14 Aug 2025 13:07:26 -0700 Subject: [PATCH 01/15] Update Github workflow build & run destinations. Integration tests will let the default Xcode install choose the run destination. Unit tests will target the generic iOS platform. --- .github/workflows/integration_tests.yml | 4 ---- .github/workflows/unit_tests.yml | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 7b303e38..e65196c5 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -64,7 +64,6 @@ jobs: build-for-testing \ -scheme DaysUntilBirthday\ \(iOS\) \ -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.4' - name: Run test target for Google Sign-in button for Swift env: EMAIL_SECRET : ${{ secrets.EMAIL_SECRET }} @@ -75,7 +74,6 @@ jobs: test-without-building \ -scheme DaysUntilBirthday\ \(iOS\) \ -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.4' \ EMAIL_SECRET=$EMAIL_SECRET \ PASSWORD_SECRET=$PASSWORD_SECRET @@ -99,7 +97,6 @@ jobs: build-for-testing \ -scheme AppAttestExample \ -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 15' - name: Run test target for App Check Example env: AppCheckDebugToken : ${{ secrets.APP_CHECK_DEBUG_TOKEN }} @@ -110,6 +107,5 @@ jobs: test-without-building \ -scheme AppAttestExample \ -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 15' \ AppCheckDebugToken=$AppCheckDebugToken \ APP_CHECK_WEB_API_KEY=$APP_CHECK_WEB_API_KEY diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 19e75f5e..314e719a 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -45,7 +45,7 @@ jobs: - sdk: 'macosx' destination: '"platform=OS X,arch=x86_64"' - sdk: 'iphonesimulator' - destination: '"platform=iOS Simulator,name=iPhone 15"' + destination: '"generic/platform=iOS Simulator"' steps: - uses: actions/checkout@v3 - name: Build unit test target From 4e2fa334e5b5a5eb7375908ba8085b118be86ccb Mon Sep 17 00:00:00 2001 From: W <115107835+w-goog@users.noreply.github.com> Date: Fri, 15 Aug 2025 12:29:30 -0700 Subject: [PATCH 02/15] Hardcoded unit tests to run on Xcode 16.4 on macos-15, due to breaking changes to macos image. --- .github/workflows/unit_tests.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 314e719a..531b88b5 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-13] + os: [macos-latest] podspec: [GoogleSignIn.podspec, GoogleSignInSwiftSupport.podspec] flag: [ "", @@ -39,7 +39,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest] + os: [macos-15] sdk: ['macosx', 'iphonesimulator'] include: - sdk: 'macosx' @@ -48,6 +48,8 @@ jobs: destination: '"generic/platform=iOS Simulator"' steps: - uses: actions/checkout@v3 + - name: Select Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - name: Build unit test target run: | xcodebuild \ From 2dff854f88c452ebc450fc997699f67029c0e64c Mon Sep 17 00:00:00 2001 From: W <115107835+w-goog@users.noreply.github.com> Date: Fri, 15 Aug 2025 12:31:36 -0700 Subject: [PATCH 03/15] Align macOS version with builds.yml with *-tests files. --- .github/workflows/builds.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index cb26e338..27783dda 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest] + os: [macos-15] steps: - uses: actions/checkout@v3 From 2773064c4231605e7c8d0975d7f7bf0eace0d3c0 Mon Sep 17 00:00:00 2001 From: W <115107835+w-goog@users.noreply.github.com> Date: Fri, 15 Aug 2025 12:37:14 -0700 Subject: [PATCH 04/15] Hardcoded integration tests to run on Xcode 16.4 on macos-15, due to breaking changes to macos image. --- .github/workflows/integration_tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index e65196c5..bf7b32fc 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -47,7 +47,7 @@ jobs: fi swift-button-functional-test: - runs-on: macos-latest + runs-on: macos-15 needs: check-pr-body-for-key # Don't run if triggered by a PR from a fork since our Secrets won't be provided to the runner. if: ${{ needs.check-pr-body-for-key.outputs.RUN_INTEGRATION == 'yes' && !github.event.pull_request.head.repo.fork }} @@ -57,6 +57,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - name: Select Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - name: Build test target for Google Sign-in button for Swift run: | xcodebuild \ From 184f5b855da22ddf33cc4295c699651ede9ba2e5 Mon Sep 17 00:00:00 2001 From: W <115107835+w-goog@users.noreply.github.com> Date: Fri, 15 Aug 2025 12:38:34 -0700 Subject: [PATCH 05/15] Let selected Xcode determine run destination for unit test builds. --- .github/workflows/unit_tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 531b88b5..acb4e48a 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -62,6 +62,5 @@ jobs: xcodebuild \ -scheme GoogleSignIn-Package \ -sdk ${{ matrix.sdk }} \ - -destination ${{ matrix.destination }} \ test-without-building From d665e1ef0a9f986f41c993d10cc7316d93868191 Mon Sep 17 00:00:00 2001 From: W <115107835+w-goog@users.noreply.github.com> Date: Fri, 15 Aug 2025 12:44:45 -0700 Subject: [PATCH 06/15] Revert "Let selected Xcode determine run destination for unit test builds." This reverts commit 184f5b855da22ddf33cc4295c699651ede9ba2e5. --- .github/workflows/unit_tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index acb4e48a..531b88b5 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -62,5 +62,6 @@ jobs: xcodebuild \ -scheme GoogleSignIn-Package \ -sdk ${{ matrix.sdk }} \ + -destination ${{ matrix.destination }} \ test-without-building From 045a92455f17a13b5e657714ec5a92f2d64e796b Mon Sep 17 00:00:00 2001 From: W <115107835+w-goog@users.noreply.github.com> Date: Fri, 15 Aug 2025 13:17:45 -0700 Subject: [PATCH 07/15] Hardcode build, integration, & unit tests to iPhone 16 again :( --- .github/workflows/builds.yml | 2 ++ .github/workflows/integration_tests.yml | 1 + .github/workflows/unit_tests.yml | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 27783dda..4abdcaf3 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -19,6 +19,8 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Select Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - name: Archive for iOS run: | xcodebuild \ diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index bf7b32fc..eeff6398 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -76,6 +76,7 @@ jobs: test-without-building \ -scheme DaysUntilBirthday\ \(iOS\) \ -sdk iphonesimulator \ + -destination 'platform=iOS Simulator,name=iPhone 16' \ EMAIL_SECRET=$EMAIL_SECRET \ PASSWORD_SECRET=$PASSWORD_SECRET diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 531b88b5..de62a5b2 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -45,7 +45,7 @@ jobs: - sdk: 'macosx' destination: '"platform=OS X,arch=x86_64"' - sdk: 'iphonesimulator' - destination: '"generic/platform=iOS Simulator"' + destination: '"platform=iOS Simulator,name=iPhone 16"' steps: - uses: actions/checkout@v3 - name: Select Xcode From ae8429f6670c1cf332b32293804ab5157132aaeb Mon Sep 17 00:00:00 2001 From: W <115107835+w-goog@users.noreply.github.com> Date: Fri, 15 Aug 2025 13:35:02 -0700 Subject: [PATCH 08/15] Update AppAttest integration tests to use Xcode 16.4 + macos-15 as well --- .github/workflows/integration_tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index eeff6398..a064bb1c 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -81,7 +81,7 @@ jobs: PASSWORD_SECRET=$PASSWORD_SECRET app-check-api-token-tests: - runs-on: macOS-13 + runs-on: macos-15 # Don't run if triggered by a PR from a fork since our Secrets won't be provided to the runner. if: "!github.event.pull_request.head.repo.fork" defaults: @@ -90,9 +90,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Use Xcode 15.0.1 - run: | - sudo xcode-select -s /Applications/Xcode_15.0.1.app + - name: Select Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - name: Build test target for App Check Example run: | xcodebuild \ @@ -110,5 +109,6 @@ jobs: test-without-building \ -scheme AppAttestExample \ -sdk iphonesimulator \ + -destination 'platform=iOS Simulator,name=iPhone 16' \ AppCheckDebugToken=$AppCheckDebugToken \ APP_CHECK_WEB_API_KEY=$APP_CHECK_WEB_API_KEY From 46dedc175cd42703a5eb832102dcb89cdee86b7f Mon Sep 17 00:00:00 2001 From: W <115107835+w-goog@users.noreply.github.com> Date: Fri, 15 Aug 2025 14:34:27 -0700 Subject: [PATCH 09/15] Update pod linting back to macOS 13, because it is failing for odd reasons. --- .github/workflows/unit_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index de62a5b2..a80f14fd 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest] + os: [macos-13] podspec: [GoogleSignIn.podspec, GoogleSignInSwiftSupport.podspec] flag: [ "", From e191bd5e0b09e1b9196777297713d3d0a107196d Mon Sep 17 00:00:00 2001 From: W <115107835+w-goog@users.noreply.github.com> Date: Mon, 18 Aug 2025 15:11:04 -0700 Subject: [PATCH 10/15] Update test runners to use explicit iOS 18.6 version (keyboards are not appearing on iOS 18 sim) --- .github/workflows/integration_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index a064bb1c..ddfd3a26 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -76,7 +76,7 @@ jobs: test-without-building \ -scheme DaysUntilBirthday\ \(iOS\) \ -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 16' \ + -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.6' \ EMAIL_SECRET=$EMAIL_SECRET \ PASSWORD_SECRET=$PASSWORD_SECRET @@ -109,6 +109,6 @@ jobs: test-without-building \ -scheme AppAttestExample \ -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 16' \ + -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.6' \ AppCheckDebugToken=$AppCheckDebugToken \ APP_CHECK_WEB_API_KEY=$APP_CHECK_WEB_API_KEY From 76cdad6cd3654968b58c68fe8f311ef3ef2ca2e0 Mon Sep 17 00:00:00 2001 From: W <115107835+w-goog@users.noreply.github.com> Date: Mon, 18 Aug 2025 15:36:06 -0700 Subject: [PATCH 11/15] Update UI tests to work on iOS 18.6, expand on documentation for local testing. --- .../DaysUntilBirthdayUITests_iOS.swift | 6 ++++-- Samples/Swift/DaysUntilBirthday/README.md | 10 +++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Samples/Swift/DaysUntilBirthday/DaysUntilBirthdayUITests(iOS)/DaysUntilBirthdayUITests_iOS.swift b/Samples/Swift/DaysUntilBirthday/DaysUntilBirthdayUITests(iOS)/DaysUntilBirthdayUITests_iOS.swift index 5156e607..7c9bafee 100644 --- a/Samples/Swift/DaysUntilBirthday/DaysUntilBirthdayUITests(iOS)/DaysUntilBirthdayUITests_iOS.swift +++ b/Samples/Swift/DaysUntilBirthday/DaysUntilBirthdayUITests(iOS)/DaysUntilBirthdayUITests_iOS.swift @@ -20,7 +20,7 @@ class DaysUntilBirthdayUITests_iOS: XCTestCase { private let signInStaticText = "“DaysUntilBirthday (iOS)” Wants to Use “google.com” to Sign In" private let passwordManagerPrompt = - "Would you like to save this password to use with apps and websites?" + "Save Password?" private let signInDisclaimerHeaderText = "Sign in to Days Until Birthday" private let returningUserSignInDisclaimerHeaderText = @@ -177,6 +177,7 @@ extension DaysUntilBirthdayUITests_iOS { // Proceed through sign-in disclaimer and/or access request view(s) if needed handleSignInDisclaimerIfNeeded() handleAccessRequestIfNeeded() + handleReturningUserSignInDisclaimerIfNeeded() return true } @@ -191,8 +192,9 @@ extension DaysUntilBirthdayUITests_iOS { return false } - handleReturningUserSignInDisclaimerIfNeeded() + handleSignInDisclaimerIfNeeded() handleAccessRequestIfNeeded() + handleReturningUserSignInDisclaimerIfNeeded() return true } diff --git a/Samples/Swift/DaysUntilBirthday/README.md b/Samples/Swift/DaysUntilBirthday/README.md index 9b49509c..ddca0d62 100644 --- a/Samples/Swift/DaysUntilBirthday/README.md +++ b/Samples/Swift/DaysUntilBirthday/README.md @@ -35,6 +35,10 @@ The email and password that we use are defined as [secrets](https://docs.github.com/en/actions/learn-github-actions/contexts#secrets-context) on our GitHub repo, and we retrieve these from the workflow environment. -Locally, both the email and password need to be passed to `xcodebuild` as -arguments: `xcodebuild EMAIL_SECRET=... PASSWORD_SECRET=...`. -Refer to the repo's Secrets for these values. +When run locally, both the email and password need to be passed to `xcodebuild`. + +From in Xcode, you can add arguments by selecting "Edit Scheme > Run > Environment Variables", and replace the variables with your test account. Alternatively, edit Credential.swift directly. WARNING: Don't check these into the repo! + +From the command line, you can do this as arguments: `xcodebuild EMAIL_SECRET=... PASSWORD_SECRET=...`. + +For Googlers, refer to CSI internal Workflow documentation for how to access these values, or access them via the repo's Secrets. From 364e7c8ae3f79e2dfc7e78c4a6698237f14c544d Mon Sep 17 00:00:00 2001 From: W <115107835+w-goog@users.noreply.github.com> Date: Tue, 19 Aug 2025 09:52:24 -0700 Subject: [PATCH 12/15] Specify required simulator on SPM unit tests --- .github/workflows/unit_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index a80f14fd..ee5fd660 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -45,7 +45,7 @@ jobs: - sdk: 'macosx' destination: '"platform=OS X,arch=x86_64"' - sdk: 'iphonesimulator' - destination: '"platform=iOS Simulator,name=iPhone 16"' + destination: '"platform=iOS Simulator,name=iPhone 16,OS=18.6"' steps: - uses: actions/checkout@v3 - name: Select Xcode From d5e39ba7f29b85b1fb2f376765778c92a58f9c69 Mon Sep 17 00:00:00 2001 From: W <115107835+w-goog@users.noreply.github.com> Date: Tue, 19 Aug 2025 11:20:47 -0700 Subject: [PATCH 13/15] Update README.md for formatting & typos --- Samples/Swift/DaysUntilBirthday/README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Samples/Swift/DaysUntilBirthday/README.md b/Samples/Swift/DaysUntilBirthday/README.md index ddca0d62..97147f26 100644 --- a/Samples/Swift/DaysUntilBirthday/README.md +++ b/Samples/Swift/DaysUntilBirthday/README.md @@ -37,8 +37,12 @@ on our GitHub repo, and we retrieve these from the workflow environment. When run locally, both the email and password need to be passed to `xcodebuild`. -From in Xcode, you can add arguments by selecting "Edit Scheme > Run > Environment Variables", and replace the variables with your test account. Alternatively, edit Credential.swift directly. WARNING: Don't check these into the repo! +In Xcode, you can add arguments by selecting "Edit Scheme > Run > Environment Variables", and +replace the variables with your test account. Alternatively, edit `Credential.swift` directly. +WARNING: Don't check these into the repo! -From the command line, you can do this as arguments: `xcodebuild EMAIL_SECRET=... PASSWORD_SECRET=...`. +From the command line, you can do this as arguments: +`xcodebuild EMAIL_SECRET=... PASSWORD_SECRET=...`. -For Googlers, refer to CSI internal Workflow documentation for how to access these values, or access them via the repo's Secrets. +For Googlers, refer to CSI internal Workflow documentation for how to access these values, or access +them via the repo's Secrets. From 6aaf9d84aafd86bbd48ada9d9e7847dd702d054e Mon Sep 17 00:00:00 2001 From: W <115107835+w-goog@users.noreply.github.com> Date: Tue, 19 Aug 2025 14:08:17 -0700 Subject: [PATCH 14/15] Update UI test element strings to DaysUntilBirthday(iOS) --- .../DaysUntilBirthdayUITests_iOS.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Samples/Swift/DaysUntilBirthday/DaysUntilBirthdayUITests(iOS)/DaysUntilBirthdayUITests_iOS.swift b/Samples/Swift/DaysUntilBirthday/DaysUntilBirthdayUITests(iOS)/DaysUntilBirthdayUITests_iOS.swift index 7c9bafee..1e0bcdb2 100644 --- a/Samples/Swift/DaysUntilBirthday/DaysUntilBirthdayUITests(iOS)/DaysUntilBirthdayUITests_iOS.swift +++ b/Samples/Swift/DaysUntilBirthday/DaysUntilBirthdayUITests(iOS)/DaysUntilBirthdayUITests_iOS.swift @@ -22,14 +22,14 @@ class DaysUntilBirthdayUITests_iOS: XCTestCase { private let passwordManagerPrompt = "Save Password?" private let signInDisclaimerHeaderText = - "Sign in to Days Until Birthday" + "Sign in to DaysUntilBirthday (iOS)" private let returningUserSignInDisclaimerHeaderText = - "You’re signing back in to Days Until Birthday" - private let additionalAccessHeaderText = "Days Until Birthday wants additional access to your Google Account" - private let appTrustWarningText = "Make sure you trust Days Until Birthday" + "You’re signing back in to DaysUntilBirthday (iOS)" + private let additionalAccessHeaderText = "DaysUntilBirthday (iOS) wants additional access to your Google Account" + private let appTrustWarningText = "Make sure you trust DaysUntilBirthday (iOS)" private let chooseAnAccountHeaderText = "Choose an account" private let notNowText = "Not Now" - private let timeout: TimeInterval = 30 + private let timeout: TimeInterval = 3//0 private let sampleApp = XCUIApplication() private let springboardApp = XCUIApplication( From afa177c6aef624dfb2af791bbaadf24444d47f14 Mon Sep 17 00:00:00 2001 From: W <115107835+w-goog@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:08:15 -0700 Subject: [PATCH 15/15] Reset UI timeout to 30 seconds --- .../DaysUntilBirthdayUITests_iOS.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Samples/Swift/DaysUntilBirthday/DaysUntilBirthdayUITests(iOS)/DaysUntilBirthdayUITests_iOS.swift b/Samples/Swift/DaysUntilBirthday/DaysUntilBirthdayUITests(iOS)/DaysUntilBirthdayUITests_iOS.swift index 1e0bcdb2..1c80701c 100644 --- a/Samples/Swift/DaysUntilBirthday/DaysUntilBirthdayUITests(iOS)/DaysUntilBirthdayUITests_iOS.swift +++ b/Samples/Swift/DaysUntilBirthday/DaysUntilBirthdayUITests(iOS)/DaysUntilBirthdayUITests_iOS.swift @@ -29,7 +29,7 @@ class DaysUntilBirthdayUITests_iOS: XCTestCase { private let appTrustWarningText = "Make sure you trust DaysUntilBirthday (iOS)" private let chooseAnAccountHeaderText = "Choose an account" private let notNowText = "Not Now" - private let timeout: TimeInterval = 3//0 + private let timeout: TimeInterval = 30 private let sampleApp = XCUIApplication() private let springboardApp = XCUIApplication(