baumblatt / capacitor-firebase-auth

Capacitor Firebase Authentication Plugin
MIT License
261 stars 129 forks source link

GoogleSignIn-iOS #176

Open MNorgren opened 3 years ago

MNorgren commented 3 years ago

v3.0.0-rc.0 Angular 11

It appears, since yesterday, my builds have been failing in relation to the GoogleProviderHandler.

I have been digging into this for the past couple hours and have found that the Pod GoogleSignIn was just released yesterday with v6.0.0

I see that capacitor-firebase-auth does not specify a version of GoogleSignIn, and I am not familiar enough with pod files to figure it out.

Any suggestions?

❌ /Users/runner/work/1/s/node_modules/capacitor-firebase-auth/ios/Plugin/Handlers/GoogleProviderHandler.swift:8:57: cannot find type 'GIDSignInDelegate' in scope class GoogleProviderHandler: NSObject, ProviderHandler, GIDSignInDelegate { ^~~~

❌ /Users/runner/work/1/s/node_modules/capacitor-firebase-auth/ios/Plugin/Handlers/GoogleProviderHandler.swift:17:19: cannot call value of non-function type 'GIDSignIn' return GIDSignIn.sharedInstance()?.currentUser != nil



❌  /Users/runner/work/1/s/node_modules/capacitor-firebase-auth/ios/Plugin/Handlers/GoogleProviderHandler.swift:81:61: type of expression is ambiguous without more context
        guard let currentUser = GIDSignIn.sharedInstance()?.currentUser else {
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~

⚠️  /Users/runner/work/1/s/node_modules/capacitor-firebase-auth/ios/Plugin/Handlers/GoogleProviderHandler.swift:85:23: 'PluginResultData' is deprecated: renamed to 'PluginCallResultData'
        var jsResult: PluginResultData = [:]
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~

❌  /Users/runner/work/1/s/node_modules/capacitor-firebase-auth/ios/Plugin/Handlers/GoogleProviderHandler.swift:96:37: type of expression is ambiguous without more context
        GIDSignIn.sharedInstance()?.signOut()
MNorgren commented 3 years ago

I think I may have resolved a workaround by adding the following to my pod file: pod 'GoogleSignIn', '~> 5.0.2'

target 'App' do
  capacitor_pods
  # Add your Pods here
  # add the Firebase pod for Google Analytics
  pod 'Firebase/Analytics'
  # Add the pods for any other Firebase products you want to use in your app
  # For example, to use Firebase Authentication and Cloud Firestore
  pod 'Firebase/Auth'
  pod 'Firebase/Firestore'

  # Add the pod for Firebase Cloud Messaging
  pod 'Firebase/Messaging'

  pod 'GoogleSignIn', '~> 5.0.2'
end

If anyone has other suggestions, please let me know. /thanks!

zombieleet commented 3 years ago

@MNorgren We are also having the same issue on our build as well. I will try your suggested solution and see if it works :) Thanks for sharing

zombieleet commented 3 years ago

@MNorgren Thanks It worked.

leochaddad commented 3 years ago

Ty, I had the same issue and it also worked for me!

rashad commented 3 years ago

I just encoutered the same issue but the workaround suggested by @MNorgren did not work 😢 Any chance anyone got an idea about I'm missing here or another suggestion to fix this ?

Cheers !

lucapale commented 3 years ago

Hi. Same problem here. Solved by downgrading to 5.0.2. Any plan to update the code for 6.0.0? Thanks

alexookah commented 3 years ago

Can someone test my PR that should work for version 6.0.0? https://github.com/baumblatt/capacitor-firebase-auth/pull/184

Use this in your package.json to test my branch "capacitor-firebase-auth": "github:alexookah/capacitor-firebase-auth#next", Thanks

Berihugebre commented 3 years ago

Thank you @MNorgren adding pod 'GoogleSignIn', '~> 5.0.2' in Podfile solves my problem