diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml index 77723218db5..d684c25d5bd 100644 --- a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml @@ -54,6 +54,7 @@ body: - Authentication - Crashlytics - Database + - Data Connect - DynamicLinks - Firestore - Functions diff --git a/.github/workflows/auth.yml b/.github/workflows/auth.yml index a65db1340c8..ffb858b589b 100644 --- a/.github/workflows/auth.yml +++ b/.github/workflows/auth.yml @@ -221,7 +221,7 @@ jobs: env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - runs-on: macos-14 + runs-on: macos-15 steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index d3ac22b6b9b..ebd5bdfb3f6 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -22,16 +22,19 @@ jobs: matrix: # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532 target: [ios, tvos, macos --skip-tests, watchos] - os: [macos-14] - xcode: [Xcode_15.2, Xcode_16] - runs-on: ${{ matrix.os }} + build-env: + - os: macos-14 + xcode: Xcode_15.2 + - os: macos-15 + xcode: Xcode_16.1 + runs-on: ${{ matrix.build-env.os }} steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 - name: Setup Bundler run: scripts/setup_bundler.sh - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - name: Build and test run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }} @@ -72,22 +75,22 @@ jobs: xcode: Xcode_15.4 target: iOS - os: macos-15 - xcode: Xcode_16 + xcode: Xcode_16.1 target: iOS - os: macos-15 - xcode: Xcode_16 + xcode: Xcode_16.1 target: tvOS - os: macos-15 - xcode: Xcode_16 + xcode: Xcode_16.1 target: macOS - os: macos-15 - xcode: Xcode_16 + xcode: Xcode_16.1 target: watchOS - os: macos-15 - xcode: Xcode_16 + xcode: Xcode_16.1 target: catalyst - os: macos-15 - xcode: Xcode_16 + xcode: Xcode_16.1 target: visionOS runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/core_internal.yml b/.github/workflows/core_internal.yml index c9db19c0b3d..9846172135a 100644 --- a/.github/workflows/core_internal.yml +++ b/.github/workflows/core_internal.yml @@ -18,16 +18,19 @@ jobs: strategy: matrix: target: [ios, tvos, macos, watchos] - os: [macos-14] - xcode: [Xcode_15.2, Xcode_16] - runs-on: ${{ matrix.os }} + build-env: + - os: macos-14 + xcode: Xcode_15.2 + - os: macos-15 + xcode: Xcode_16.1 + runs-on: ${{ matrix.build-env.os }} steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 - name: Setup Bundler run: scripts/setup_bundler.sh - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - name: Build and test run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreInternal.podspec --platforms=${{ matrix.target }} @@ -68,22 +71,22 @@ jobs: xcode: Xcode_15.4 target: iOS - os: macos-15 - xcode: Xcode_16 + xcode: Xcode_16.1 target: iOS - os: macos-15 - xcode: Xcode_16 + xcode: Xcode_16.1 target: tvOS - os: macos-15 - xcode: Xcode_16 + xcode: Xcode_16.1 target: macOS - os: macos-15 - xcode: Xcode_16 + xcode: Xcode_16.1 target: watchOS - os: macos-15 - xcode: Xcode_16 + xcode: Xcode_16.1 target: catalyst - os: macos-15 - xcode: Xcode_16 + xcode: Xcode_16.1 target: visionOS runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/dynamiclinks.yml b/.github/workflows/dynamiclinks.yml index 777cba16742..61439d6cc3c 100644 --- a/.github/workflows/dynamiclinks.yml +++ b/.github/workflows/dynamiclinks.yml @@ -22,8 +22,11 @@ jobs: strategy: matrix: - os: [macos-14] - xcode: [Xcode_15.2, Xcode_16] + include: + - os: macos-14 + xcode: Xcode_15.2 + - os: macos-15 + xcode: Xcode_16.1 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -70,7 +73,7 @@ jobs: - os: macos-14 xcode: Xcode_15.4 - os: macos-15 - xcode: Xcode_16 + xcode: Xcode_16.1 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/functions.yml b/.github/workflows/functions.yml index 49d26b29a5c..5b7dc6c26cc 100644 --- a/.github/workflows/functions.yml +++ b/.github/workflows/functions.yml @@ -30,17 +30,17 @@ jobs: strategy: matrix: target: [ios, tvos, macos, watchos] - include: + build-env: - os: macos-14 xcode: Xcode_15.2 - os: macos-15 xcode: Xcode_16.1 - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.build-env.os }} steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - name: Setup Bundler run: scripts/setup_bundler.sh # The integration tests are flaky on Xcode 15 so only run the unit tests. The integration tests still run with SPM. diff --git a/.github/workflows/mlmodeldownloader.yml b/.github/workflows/mlmodeldownloader.yml index 81da1ab1a83..39d4ba45558 100644 --- a/.github/workflows/mlmodeldownloader.yml +++ b/.github/workflows/mlmodeldownloader.yml @@ -22,9 +22,12 @@ jobs: strategy: matrix: target: [ios, tvos, macos, watchos] - os: [macos-14] - xcode: [Xcode_15.2, Xcode_16] - runs-on: ${{ matrix.os }} + build-env: + - os: macos-14 + xcode: Xcode_15.2 + - os: macos-15 + xcode: Xcode_16.1 + runs-on: ${{ matrix.build-env.os }} steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 @@ -38,7 +41,7 @@ jobs: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \ FirebaseMLModelDownloader/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret" - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - name: Build and test run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMLModelDownloader.podspec --platforms=${{ matrix.target }}) @@ -102,22 +105,22 @@ jobs: xcode: Xcode_15.4 target: iOS - os: macos-15 - xcode: Xcode_16 + xcode: Xcode_16.1 target: iOS - os: macos-15 - xcode: Xcode_16 + xcode: Xcode_16.1 target: tvOS - os: macos-15 - xcode: Xcode_16 + xcode: Xcode_16.1 target: macOS - os: macos-15 - xcode: Xcode_16 + xcode: Xcode_16.1 target: watchOS - os: macos-15 - xcode: Xcode_16 + xcode: Xcode_16.1 target: catalyst - os: macos-15 - xcode: Xcode_16 + xcode: Xcode_16.1 target: visionOS runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 67a89aef2ae..af24594c944 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -55,16 +55,19 @@ jobs: strategy: matrix: target: [ios, tvos] - os: [macos-14] - xcode: [Xcode_15.2, Xcode_16] - runs-on: ${{ matrix.os }} + build-env: + - os: macos-14 + xcode: Xcode_15.2 + - os: macos-15 + xcode: Xcode_16.1 + runs-on: ${{ matrix.build-env.os }} steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 - name: Setup Bundler run: scripts/setup_bundler.sh - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - name: Build #TODO: tests are not supported with Xcode 15 because the test spec depends on the iOS 8 GDCWebServer run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebasePerformance.podspec --skip-tests --platforms=${{ matrix.target }} @@ -155,10 +158,10 @@ jobs: xcode: Xcode_15.4 target: iOS - os: macos-15 - xcode: Xcode_16 + xcode: Xcode_16.1 target: iOS - os: macos-15 - xcode: Xcode_16 + xcode: Xcode_16.1 target: tvOS runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/shared-swift.yml b/.github/workflows/shared-swift.yml index 40f1d46fa19..6a6785b9752 100644 --- a/.github/workflows/shared-swift.yml +++ b/.github/workflows/shared-swift.yml @@ -24,16 +24,19 @@ jobs: strategy: matrix: target: [ios, tvos, macos, watchos] - os: [macos-14] - xcode: [Xcode_15.2, Xcode_16] - runs-on: ${{ matrix.os }} + build-env: + - os: macos-14 + xcode: Xcode_15.2 + - os: macos-15 + xcode: Xcode_16.1 + runs-on: ${{ matrix.build-env.os }} steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 - name: Setup Bundler run: scripts/setup_bundler.sh - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - name: Build and test run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSharedSwift.podspec --platforms=${{ matrix.target }} @@ -67,9 +70,12 @@ jobs: strategy: matrix: target: [iOS, tvOS, macOS, catalyst, watchOS] - os: [macos-14] - xcode: [Xcode_15.2, Xcode_16] - runs-on: ${{ matrix.os }} + build-env: + - os: macos-14 + xcode: Xcode_15.2 + - os: macos-15 + xcode: Xcode_16.1 + runs-on: ${{ matrix.build-env.os }} steps: - uses: actions/checkout@v4 - uses: actions/cache/restore@v4 @@ -77,7 +83,7 @@ jobs: path: .build key: ${{needs.spm-package-resolved.outputs.cache_key}} - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - name: Initialize xcodebuild run: scripts/setup_spm_tests.sh - name: Unit Tests diff --git a/.github/workflows/storage.yml b/.github/workflows/storage.yml index 6c4f331dbde..220f98b5741 100644 --- a/.github/workflows/storage.yml +++ b/.github/workflows/storage.yml @@ -195,15 +195,14 @@ jobs: strategy: matrix: target: [ios, tvos, macos, watchos] - os: [macos-14] - include: + build-env: - os: macos-14 xcode: Xcode_15.3 tests: --skip-tests - os: macos-15 xcode: Xcode_16.1 tests: --test-specs=unit - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.build-env.os }} steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 @@ -212,10 +211,10 @@ jobs: - name: Xcodes run: ls -l /Applications/Xcode* - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - name: Build and test run: | - scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec ${{ matrix.tests }} \ + scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec ${{ matrix.build-env.tests }} \ --platforms=${{ matrix.target }} storage-cron-only: @@ -224,13 +223,12 @@ jobs: strategy: matrix: target: [ios, tvos, macos, watchos] - os: [macos-14, macos-15] - include: + build-env: - os: macos-14 xcode: Xcode_15.3 - os: macos-15 xcode: Xcode_16.1 - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.build-env.os }} needs: pod-lib-lint steps: - uses: actions/checkout@v4 @@ -238,6 +236,6 @@ jobs: - name: Setup Bundler run: scripts/setup_bundler.sh - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - name: PodLibLint Storage Cron run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} --use-static-frameworks --skip-tests diff --git a/FirebaseAuth/CHANGELOG.md b/FirebaseAuth/CHANGELOG.md index d5e3b31c3ba..c627b29eed5 100644 --- a/FirebaseAuth/CHANGELOG.md +++ b/FirebaseAuth/CHANGELOG.md @@ -1,3 +1,13 @@ +# 11.5.0 +- [fixed] Restore pre-Firebase 11 decoding behavior to prevent users getting + logged out when upgrading from Firebase 8.10.0 or earlier to Firebase 11. + Note that this fix will not be in the 11.5.0 zip and Carthage + distributions, but will be included from 11.6.0 onwards. (#14011) +- [fixed] Restore Firebase 10 keychain error handling behavior when retrieving + Firebase Auth tokens, potentially causing user sign-out on Firebase 11. Note + that this fix will not be in the 11.5.0 zip and Carthage distributions, but + will be included from 11.6.0 onwards. (#14067) + # 11.4.0 - [fixed] Restore Firebase 10 behavior by ignoring `nil` display names used during multi factor enrollment. (#13856) diff --git a/FirebaseAuth/Sources/Swift/User/User.swift b/FirebaseAuth/Sources/Swift/User/User.swift index 94d1c13dd0a..3371520bdf8 100644 --- a/FirebaseAuth/Sources/Swift/User/User.swift +++ b/FirebaseAuth/Sources/Swift/User/User.swift @@ -1598,18 +1598,22 @@ extension User: NSSecureCoding {} /// Retrieves the Firebase authentication token, possibly refreshing it if it has expired. /// - Parameter forceRefresh func internalGetTokenAsync(forceRefresh: Bool = false) async throws -> String { + var keychainError = false do { let (token, tokenUpdated) = try await tokenService.fetchAccessToken( forcingRefresh: forceRefresh ) if tokenUpdated { if let error = updateKeychain() { + keychainError = true throw error } } return token! } catch { - signOutIfTokenIsInvalid(withError: error) + if !keychainError { + signOutIfTokenIsInvalid(withError: error) + } throw error } } @@ -1704,11 +1708,6 @@ extension User: NSSecureCoding {} public required init?(coder: NSCoder) { guard let userID = coder.decodeObject(of: NSString.self, forKey: kUserIDCodingKey) as? String, - let apiKey = coder.decodeObject(of: NSString.self, forKey: kAPIKeyCodingKey) as? String, - let appID = coder.decodeObject( - of: NSString.self, - forKey: kFirebaseAppIDCodingKey - ) as? String, let tokenService = coder.decodeObject(of: SecureTokenService.self, forKey: kTokenServiceCodingKey) else { return nil @@ -1746,8 +1745,17 @@ extension User: NSSecureCoding {} self.phoneNumber = phoneNumber self.metadata = metadata ?? UserMetadata(withCreationDate: nil, lastSignInDate: nil) self.tenantID = tenantID - // The `heartbeatLogger` and `appCheck` will be set later via a property update. - requestConfiguration = AuthRequestConfiguration(apiKey: apiKey, appID: appID) + + // Note, in practice, the caller will set the `auth` property of this user + // instance which will as a side-effect overwrite the request configuration. + // The assignment here is a best-effort placeholder. + let apiKey = coder.decodeObject(of: NSString.self, forKey: kAPIKeyCodingKey) as? String + let appID = coder.decodeObject( + of: NSString.self, + forKey: kFirebaseAppIDCodingKey + ) as? String + requestConfiguration = AuthRequestConfiguration(apiKey: apiKey ?? "", appID: appID ?? "") + userProfileUpdate = UserProfileUpdate() #if os(iOS) self.multiFactor = multiFactor ?? MultiFactor() diff --git a/FirebasePerformance/CHANGELOG.md b/FirebasePerformance/CHANGELOG.md index b0de57ecb27..fd98d461eee 100644 --- a/FirebasePerformance/CHANGELOG.md +++ b/FirebasePerformance/CHANGELOG.md @@ -1,3 +1,9 @@ +# 11.5.0 +- [fixed] Replaced usage of the deprecated `UIApplication.keyWindow` property + with `UIWindow.isKeyWindow`; this API is also available on visionOS. Note that + this fix will not be in the 11.5.0 zip and Carthage distributions, but will be + included from 11.6.0 onwards. (#14048) + # 11.4.0 - [fixed] Fix a crash related to thread sanitization on FPRNetworkTrace class (#13581).