Go To File: GoogleSignInPlugin/Assets/GoogleSignIn/Editor/GoogleSignInDependencies.xml
Replace line No 15:
<iosPod name="GoogleSignIn" version=">= 4.0.2" bitcodeEnabled="false"
With
<iosPod name="GoogleSignIn" version="~> 5.0.0" bitcodeEnabled="false"
<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Go To File: GoogleSignInPlugin/Assets/Plugins/iOS/GoogleSignIn/GoogleSignIn.h
Replace line No 18:
NSObject <GIDSignInDelegate, GIDSignInUIDelegate>
With
NSObject <GIDSignInDelegate>
<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Go To File: GoogleSignInPlugin/Assets/Plugins/iOS/GoogleSignIn/GoogleSignIn.mm
Remove Line No 108,109,110
case kGIDSignInErrorCodeNoSignInHandlersInstalled:
currentResult_->result_code = kStatusCodeDeveloperError;
break;
Add this line after line No 194:
[GIDSignIn sharedInstance].presentingViewController = UnityGetGLViewController();
return !useGameSignIn;
Replace line No 242:
[[GIDSignIn sharedInstance] signInSilently];
With
[[GIDSignIn sharedInstance] restorePreviousSignIn];
<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Go To File: GoogleSignInPlugin/Assets/Plugins/iOS/GoogleSignIn/GoogleSignInAppController.mm
Remove line no 78:
signIn.uiDelegate = gsiHandler;
Replace line No 99,100,101:
return [[GIDSignIn sharedInstance] handleURL:url
sourceApplication:sourceApplication
annotation:annotation] ||
With
return [[GIDSignIn sharedInstance] handleURL:url] ||
Replace line No 115,116,117,118,119,120:
return [[GIDSignIn sharedInstance]
handleURL:url
sourceApplication:
options[UIApplicationOpenURLOptionsSourceApplicationKey]
annotation:
options[UIApplicationOpenURLOptionsAnnotationKey]] ||
With
return [[GIDSignIn sharedInstance] handleURL:url] ||
<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
If you're seeing a "selector not recognized" runtime exception when calling a category method that is implemented in a static library, you are hitting the link-time build issue described here, and need to add the -ObjC linker flag to your project, by following these steps:
- In Xcode, choose View > Navigators > Show Project Navigator, or press ⌘1.
- Select your project under the PROJECT heading in the Project Navigator, then select the Build Settings tab.
- Scroll down to the Other Linker Flags build setting under the Linking collection, or type "Other Linker Flags" into the search bar.
- Set the value of the Other Linker Flags build setting to $(OTHER_LDFLAGS) -ObjC.