Skip to content

[Auth] Remove deprecated pre-iOS 13.5 GameCenter workaround and fix force-unwrap#16136

Open
crleonard wants to merge 1 commit into
firebase:mainfrom
crleonard:fix/gamecenter-remove-pre-13-5-workaround
Open

[Auth] Remove deprecated pre-iOS 13.5 GameCenter workaround and fix force-unwrap#16136
crleonard wants to merge 1 commit into
firebase:mainfrom
crleonard:fix/gamecenter-remove-pre-13-5-workaround

Conversation

@crleonard
Copy link
Copy Markdown

Closes #16135

Description

GameCenterAuthProvider.swift contained a WarningWorkaround protocol and
pre135Credential() method added to suppress deprecation warnings for
GKLocalPlayer.playerID and generateIdentityVerificationSignature. These
existed to support iOS < 13.5 before fetchItems was available, and were
explicitly marked for deletion:

// TODO: Delete this when minimum iOS version passes 13.5.

The SDK minimum is now iOS 15 (Package.swift), so this condition is satisfied.

Additionally, the async getCredential() overload force-unwrapped error! with
a TODO noting it should be replaced — swapped for a safe
AuthErrorUtils.error(code: .internalError) fallback.

Changes

  • Removed WarningWorkaround private protocol
  • Removed extension GameCenterAuthProvider: WarningWorkaround
  • Removed #available(iOS 13.5, ...) runtime branch and the else fallback
  • Removed pre135Credential() method (~30 lines of dead code)
  • Fixed force-unwrap error! → safe fallback in async getCredential()

Testing

Existing SignInWithGameCenterTests pass with no changes required:

  • testGameCenterAuthCredentialCoding
  • testRequestResponseEncoding

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

@google-cla
Copy link
Copy Markdown

google-cla Bot commented Apr 29, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@paulb777
Copy link
Copy Markdown
Member

Thanks for the PR! Based on the CI failures, it looks like we still need this code as long as we're supporting macOS 10.15

@ncooke3 ncooke3 added this to the Firebase 13 milestone Apr 30, 2026
@ncooke3
Copy link
Copy Markdown
Member

ncooke3 commented Apr 30, 2026

I'll add it to our major version backlog for consideration. If the macOS minimum version is raised then, we can revive this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove deprecated pre-iOS 13.5 GameCenter code path and fix force-unwrap

3 participants