google / google/GoogleSignIn-iOS

[GIDSignIn signInWithConfiguration:..] too draconian with NS_EXTENSION_UNAVAILABLE

Abierto
#90 1 comentario 1 reacción 0 asignados Ver en GitHub
Lenguaje dominante
Objective-C
Estrellas
750
Forks
282
Merge medio
2 d 15 h
PR fusionados (30 d)
9

Descripción

v6.1.0 of the SDK changed some of the methods in GIDSignIn to become unavailable to extensions. Whilst I can understand the motive, I think this is too draconian a change. In my app, I have a shared library that is used by the main app itself and various extensions. This library includes the Google sign-in support, but that side of things is only ever used by the app itself, not the extensions and the code already ensures you aren't running as an extension before attempting to sign-in. But with 6.1.0, my library no longer builds as it hits this error:

'signIn(with:presenting:callback:)' is unavailable in application extensions for iOS: The sign-in flow is not supported in App Extensions.

Whilst I 'could' refactor my library to extract out the non-extension friendly parts into another shared library, this is no small undertaking and provides no real-world benefit for the time involved.

I have a couple of solutions:

1. Just revert the change that added `NS_EXTENSION_UNAVAILABLE` to the various calls.
2. Add explicit equivalents of the `NS_EXTENSION_UNAVAILABLE` calls that make it clear that its OK to include them in a library, but that they MUST not be actually called from an extension.

For now, my only solution is to just limit my SDK usage to pre 6.1.0 versions.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.