Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot find protocol declaration for 'GIDSignInUIDelegate'; did you mean 'GIDSignInDelegate #102

Closed
TWBestATM opened this issue Aug 17, 2019 · 44 comments

Comments

@TWBestATM
Copy link

TWBestATM commented Aug 17, 2019

▸ ❌; /BUILD_PATH/gamewolfinc.testslots.release_ios/temp.XXXXXX20190816-5373-lqln/Libraries/Plugins/IOS/GoogleSignIn/GoogleSignIn.h:18:36: cannot find protocol declaration for 'GIDSignInUIDelegate'; did you mean 'GIDSignInDelegate'?
8124: ▸ ❌; /BUILD_PATH/gamewolfinc.testslots.release_ios/temp.XXXXXX20190816-5373-lqln/Libraries/Plugins/IOS/GoogleSignIn/GoogleSignInAppController.mm:78:10: property 'uiDelegate' not found on object of type 'GIDSignIn *'; did you mean 'delegate'?
8125: ▸ ❌; /BUILD_PATH/gamewolfinc.testslots.release_ios/temp.XXXXXX20190816-5373-lqln/Libraries/Plugins/IOS/GoogleSignIn/GoogleSignInAppController.mm:99:38: no visible @interface for 'GIDSignIn' declares the selector 'handleURL:sourceApplication:annotation:'
8126: ▸ ❌; /BUILD_PATH/gamewolfinc.testslots.release_ios/temp.XXXXXX20190816-5373-lqln/Libraries/Plugins/IOS/GoogleSignIn/GoogleSignInAppController.mm:116:22: no visible @interface for 'GIDSignIn' declares the selector 'handleURL:sourceApplication:annotation:

I get this error
how can I fix that?
can someone help?
is they replace name or other?

@kevinfoley
Copy link

Why would you write your message like that? It's so difficult to read.

I am experiencing the same issue. Possibly related: react-native-google-signin/google-signin#707

@TWBestATM
Copy link
Author

TWBestATM commented Aug 18, 2019

Why would you write your message like that? It's so difficult to read.

I am experiencing the same issue. Possibly related: react-native-community/react-native-google-signin#707
I fix my message . It's easy to read

@Kromzem
Copy link

Kromzem commented Aug 19, 2019

I was having the same error and by looking at my Podfile I now know why:

https://developers.google.com/identity/sign-in/ios/release
They renamed something and the Podfile was taking every version above 4.0.2 (">=4.0.2").

So a simple fix is to change the version to be always below 5.0.0.

Either you change it in your Podfile directly:
"pod 'GoogleSignIn', '>= 4.0.2'" to "pod 'GoogleSignIn', '< 5.0.0'"

or you change it in the GoogleSignInDependencies.xml (for future rebuilds of the XCode proj.):
File: /Assets/GoogleSignIn/Editor/GoogleSignInDependencies.xml
"<iosPod name="GoogleSignIn" version=">=4.0.2" ...>" to
"<iosPod name="GoogleSignIn" version="< 5.0.0" ...>"

@TWBestATM
Copy link
Author

I was having the same error and by looking at my Podfile I now know why:

https://developers.google.com/identity/sign-in/ios/release
They renamed something and the Podfile was taking every version above 4.0.2 (">=4.0.2").

So a simple fix is to change the version to be always below 5.0.0.

Either you change it in your Podfile directly:
"pod 'GoogleSignIn', '>= 4.0.2'" to "pod 'GoogleSignIn', '< 5.0.0'"

or you change it in the GoogleSignInDependencies.xml (for future rebuilds of the XCode proj.):
File: /Assets/GoogleSignIn/Editor/GoogleSignInDependencies.xml
"<iosPod name="GoogleSignIn" version=">=4.0.2" ...>" to
"<iosPod name="GoogleSignIn" version="< 5.0.0" ...>"
Thx
this is work
they change somename in googlesignin 5.0.0

@ottolb
Copy link

ottolb commented Aug 22, 2019

hi, @Kromzem solution worked for me on local builds, on the cloud build the XML parser throws an error when using the '<' 5.0.0
Perhaps using an escape might solve, temporarily I just set to = 5.0.0 and cloud build worked fine

@mklitsner
Copy link

Thanks this worked for me!

@fpbolivar
Copy link

Same problem here!!!
Screen Shot 2019-08-25 at 12 43 02 AM

@fpbolivar
Copy link

still without answer I tried changing 4.0.2 to 5 and still not working for me

@TWBestATM
Copy link
Author

still without answer I tried changing 4.0.2 to 5 and still not working for me

you need to change >= to< . it will work when version less than 5

@TWBestATM
Copy link
Author

TWBestATM commented Aug 26, 2019

hi, @Kromzem solution worked for me on local builds, on the cloud build the XML parser throws an error when using the '<' 5.0.0
Perhaps using an escape might solve, temporarily I just set to = 5.0.0 and cloud build worked fine
try"& lt;" (no cantain space and "") replease '<' . it can solve xml error

@fpbolivar
Copy link

@TWBestATM i did that and still without working :c

@TWBestATM
Copy link
Author

@TWBestATM i did that and still without working :c

which erro you get?

@fpbolivar
Copy link

Same problem here!!!
Screen Shot 2019-08-25 at 12 43 02 AM

those ones

@TWBestATM

@TWBestATM
Copy link
Author

Same problem here!!!
Screen Shot 2019-08-25 at 12 43 02 AM

those ones

@TWBestATM

can i see your setting about iospod?

@fpbolivar
Copy link

@TWBestATM im new with cocoa how can i do that?

@TWBestATM
Copy link
Author

@TWBestATM im new with cocoa how can i do that?

what do you mean?
it's mean cocoapod?
if it is .it should work as well

@fpbolivar
Copy link

i mean how can i show you my settings about iospod? @TWBestATM

@TWBestATM
Copy link
Author

i mean how can i show you my settings about iospod? @TWBestATM
show me you file in
File: /Assets/GoogleSignIn/Editor/GoogleSignInDependencies.xml
and try replease
"<iosPod name="GoogleSignIn" version=">=4.0.2" ...>" to
"<iosPod name="GoogleSignIn" version="& lt; 5.0.0" ...>"(without space between & and lt)

@fpbolivar
Copy link

Screen Shot 2019-08-25 at 11 20 41 PM

@fpbolivar
Copy link

unity doesn't let me build if I use '<'

@TWBestATM
Copy link
Author

TWBestATM commented Aug 26, 2019

unity doesn't let me build if I use '<'
use & lt; try again
image

they change some name in googlesiginsdk 5.0.0 so only work in less than 5.0.0 or you can just use version = "4.4.0" not add any symbol

@fpbolivar
Copy link

lol it work with those symbols thanks so much!!!

@mavc18
Copy link

mavc18 commented Aug 28, 2019

omg im stuck here like all of you guys!... help meeee!

@ottolb
Copy link

ottolb commented Aug 28, 2019

We aren't stuck anymore... the solution is simple, follow the posts solutions and post here if you didn't get some specific part.

@mavc18
Copy link

mavc18 commented Sep 1, 2019

I got this errors in xcode:
Screen Shot 2019-09-01 at 1 08 19 AM

1------
#import <GoogleSignIn/GIDSignIn.h>
@interface GoogleSignInHandler
: NSObject <GIDSignInDelegate, GIDSignInUIDelegate>

error
'Cannot find protocol declaration for 'GIDSignInUIDelegate'; did you mean 'GIDSignInDelegate'?'
2------
// Setup the Sign-In instance.
GIDSignIn *signIn = [GIDSignIn sharedInstance];
signIn.clientID = clientId;
signIn.uiDelegate = gsiHandler;
signIn.delegate = gsiHandler;

error:
'Property 'uiDelegate' not found on object of type 'GIDSignIn *'; did you mean 'delegate'?'

3--------

Handle the auth URL
*/

(BOOL)GoogleSignInAppController:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
BOOL handled = [self GoogleSignInAppController:application
openURL:url
sourceApplication:sourceApplication
annotation:annotation];

return [[GIDSignIn sharedInstance] handleURL:url
sourceApplication:sourceApplication
annotation:annotation] ||

error:
'No visible @interface for 'GIDSignIn' declares the selector 'handleURL:sourceApplication:annotation:'


and to fix change this code
Screen Shot 2019-09-01 at 1 05 40 AM

to this code....
Screen Shot 2019-09-01 at 1 09 20 AM

but still failling :(

@lunarsugu
Copy link

After I fixed the code,
Error disappeared when running Xcode -> Product -> build folder clean.

@mavc18
Copy link

mavc18 commented Sep 1, 2019

After I fixed the code,
Error disappeared when running Xcode -> Product -> build folder clean.

i've been build folder clean, and then build and same error :(

------ UPDATE

Fixe the problem!!!!, i change from C# without simbols, just '4.0.2' and works! thanks to all!

@devteamsolar
Copy link

"<iosPod name="GoogleSignIn" version="& #60; 5.0.0" ...>"(without space between & and #60) Also works

@surbhiMagplus
Copy link

I am using direct sdk implementation not via pods and having same problem, can any one help?

Value of type 'GIDSignIn' has no member 'uiDelegate'

Thanks in advance.

@gr9
Copy link

gr9 commented Oct 23, 2019

@surbhiMagplus me too; (hate cocoapods with the passion of 1000 burning suns) anyways; doesn't look like that property is there anymore in the new code base. Readme.md from the 'no cocoapods' static library lead me to this repo: https://github.com/firebase/quickstart-ios

Through which I found this code:
That I put inside my viewDidLoad callback for my main view controller:

// [START setup_gid_uidelegate]
    [GIDSignIn sharedInstance].presentingViewController = self;
    [[GIDSignIn sharedInstance] signIn];
    // [END setup_gid_uidelegate]

Doesn't look like theres a GIDSignInUIDelegate exists anymore so I simply removed that from my protocols declared in my view controller's .h file.. I also had to add this line to the code above to get it to avoid a runtime error that was complaining about lack of client id:

[GIDSignIn sharedInstance].clientID = @"your-client-id-defined-in-your-google-services-plist.apps.googleusercontent.com";

@surbhiMagplus
Copy link

@gr9 I am facing another problem, My permission pop-up comes and go away I am not able to allow it. Also it is giving me google/link/?dismiss=1&is_weak_match=1 url is openURL method. Can you help me

@gr9
Copy link

gr9 commented Oct 24, 2019

@surbhiMagplus yeh me too.. getting this error in the console (obviously related to memory management somehow):

[Warning] Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior (<SFAuthenticationViewController: 0x7fd9b48a2a00>)

will let you know if i make any progress. Seems to be related to whatever that ios alert box popping up asking for permission for the app to use google sign in; that immediately dissapears before you can tap 'ok'.

Might be iOS 13 related; I noticed the same alert box on an iOS 13 device running the older 4.1 google sign in (not firebase version); but that version of my app is still working fine re: google signin. Wonder if there's a way to check if the app has user permission to use google sign in first & then if not first present them with the request for permission (e.g. the same way you do when requesting location permissions).

@gr9
Copy link

gr9 commented Oct 28, 2019

Only way I was able to figure this out was using cocoapods and the instructions above (e.g limit google sign on to version 4.x.) There's something wrong obviously with the firebase 6.x build vis a vis google sign in.

@benmore99
Copy link

Just see a migration guide > https://developers.google.com/identity/sign-in/ios/quick-migration-guide

@gr9
Copy link

gr9 commented Dec 13, 2019

Thanks for the link @benmore99 ; ended up sticking with 4.x as the so called "sunsetting" of Google Analytics didn't affect GA for my apps. Will check out your link when I eventually upgrade - at a glance I did all of that already, however it might contain something I missed. Regardless, would be nice if the general documentation (not the more obscure and harder to find migration documentation) was correct.

@keyurdoshi18
Copy link

Just see a migration guide > https://developers.google.com/identity/sign-in/ios/quick-migration-guide

Solved my problem.. Thanks @benmore99

@unbounded26
Copy link

unbounded26 commented May 21, 2020

I'm using Unity 2019.3.0f6 and GoogleSignIn 5.0.2 via pod, but still can't figure out the solution. I'm still stuck on the issues mentioned in first screenshot, as I just imported this plugin and change the GoogleSignIn version.

Kindly someone zip the solution or upload on git and share over here, after doing the changes.

Apologies, I'm a bit noob in the native iOS. Thanks!

@ahsan-khalil
Copy link

They have made some major changes after the 4.4.0 version which are incompatible with the previous version.
And one of the significant changes is GIDSignInUIDelegate functionalities are now implemented in GIDSignInDelegate and they have removed GIDSignInUIDelegate class.
For more, you can read this link https://developers.google.com/identity/sign-in/ios/quick-migration-guide

@renanmgs
Copy link

Actually we need to use 5.0.0+ to be in conformity with the new requisite by apple to not use UIWebView.
But if we use 5.0.0+ we got this error, what to do?

@renanmgs
Copy link

Found a solution here

@Christian254
Copy link

Christian254 commented May 12, 2021

After I fixed the code,
Error disappeared when running Xcode -> Product -> build folder clean.

i've been build folder clean, and then build and same error :(

------ UPDATE

Fixe the problem!!!!, i change from C# without simbols, just '4.0.2' and works! thanks to all!

I change just '4.0.2' without symbols and works too!

@alexlukens82991
Copy link

@surbhiMagplus yeh me too.. getting this error in the console (obviously related to memory management somehow):

[Warning] Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior (<SFAuthenticationViewController: 0x7fd9b48a2a00>)

will let you know if i make any progress. Seems to be related to whatever that ios alert box popping up asking for permission for the app to use google sign in; that immediately dissapears before you can tap 'ok'.

Might be iOS 13 related; I noticed the same alert box on an iOS 13 device running the older 4.1 google sign in (not firebase version); but that version of my app is still working fine re: google signin. Wonder if there's a way to check if the app has user permission to use google sign in first & then if not first present them with the request for permission (e.g. the same way you do when requesting location permissions).

I am having this same issue. Did you find a solution to this?

@collectivemass
Copy link

unity doesn't let me build if I use '<'
use & lt; try again
image

they change some name in googlesiginsdk 5.0.0 so only work in less than 5.0.0 or you can just use version = "4.4.0" not add any symbol

This worked like a charm for me! Thank you!

@manirana94
Copy link

Visit this link to get the best solution to resolve this.

https://stackoverflow.com/a/70984618/10635425

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests