google / google/GoogleSignIn-iOS

[GIDSignIn signInWithConfiguration:..] too draconian with NS_EXTENSION_UNAVAILABLE

Ouverte
#90 1 commentaire 1 réaction 0 personnes assignées Voir sur GitHub
Langage dominant
Objective-C
Étoiles
750
Forks
282
Merge moyen
2 j 15 h
PR mergées (30 j)
9

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.