GoogleSignIn plugin not working on iOS

@Scott_Harrison I have an iOS app using some plugins in native mode, like facebook or apple sign in. I intended to add google sign in (not using firebase) and I can’t manage to make it work. Looking at another thread (googleSignIn not loading in Native), it’s unclear whether it actually works. The zip file provided in that thread as an example “as is” doesn’t work: I’m using Corono 3706.

Has anything changed in Corona or on the google side that has changed since that thread that could explain this?

Thanks.

There should be an option to download plugins in newer native templates.

Are you referring to the build.settings urls? I have this, the same way for other plugins:

    ["plugin.googleSignIn"] =
    {
        publisherId = "tech.scotth",
        marketplaceId = "XXXXXX",
        supportedPlatforms = {
            iphone = { url="https://github.com/solar2d/tech.scotth-plugin.googleSignIn/releases/download/v1/2019.3504-iphone.tgz" },
            ["iphone-sim"] = { url="https://github.com/solar2d/tech.scotth-plugin.googleSignIn/releases/download/v1/2019.3504-iphone-sim.tgz" },
        }
    },

You should not need the urls anymore if you are using a newer version of Solar2D

I noticed that the call to the plugin was not returning or displaying any error, so I wrote my own native code to invoke the GoogleSignIn library. It works fine when I call it at init time from my delegate: the sign in window appears and I can sign in. However, if I invoke the same code from a plugin I wrote, I get the same behavior as the GoogleSignIn plugin: the code goes into the google call but never returns and no window is displayed.

It’s as if there was a window presented to the user and there’s no way to see it or interact with it. It’s odd because other plugins like facebook or apple sign in work fine.

Well, I found the answer: swift - iOS Google Sign In not displaying above modally-presented view controller - Stack Overflow

Apparently the google code doesn’t like if there’s already a tap listener, so I removed my EventListener for the sign in button before calling the plugin and that did the trick.