[Auth] Remove deprecated pre-iOS 13.5 GameCenter workaround and fix force-unwrap#16136
[Auth] Remove deprecated pre-iOS 13.5 GameCenter workaround and fix force-unwrap#16136crleonard wants to merge 1 commit into
Conversation
Using Gemini Code AssistThe 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
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 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. |
|
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. |
|
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 |
|
I'll add it to our major version backlog for consideration. If the macOS minimum version is raised then, we can revive this PR. |
Closes #16135
Description
GameCenterAuthProvider.swiftcontained aWarningWorkaroundprotocol andpre135Credential()method added to suppress deprecation warnings forGKLocalPlayer.playerIDandgenerateIdentityVerificationSignature. Theseexisted to support iOS < 13.5 before
fetchItemswas available, and wereexplicitly 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-unwrappederror!witha TODO noting it should be replaced — swapped for a safe
AuthErrorUtils.error(code: .internalError)fallback.Changes
WarningWorkaroundprivate protocolextension GameCenterAuthProvider: WarningWorkaround#available(iOS 13.5, ...)runtime branch and theelsefallbackpre135Credential()method (~30 lines of dead code)error!→ safe fallback in asyncgetCredential()Testing
Existing
SignInWithGameCenterTestspass with no changes required:testGameCenterAuthCredentialCoding✓testRequestResponseEncoding✓