googlesamples / google-signin-unity

Google Sign-In API plugin for Unity game engine. Works with Android and iOS.
Other
420 stars 227 forks source link

Dependency on iOS GoogleSignIn pod needs to be updated to work with 5.0.0+ #122

Open lukezbihlyj opened 4 years ago

lukezbihlyj commented 4 years ago

Apple's upcoming policy enforcement of ITMS-90809 (see https://developer.apple.com/news/?id=12232019b) requires that apps can no longer depend on the UIWebView component. The main iOS dependency for this plugin only works with GoogleSignIn versions under 5.0.0 which still uses the deprecated component.

The plugin needs to be updated to support the newer version of that pod. If I have time in the coming weeks I'll tackle this myself but if there's any kind of official response from the dev team that maintains this plugin that would be awesome!

aidanikuz02 commented 4 years ago

Hi! Did u manage to "tackle" it yourself? I'm currently only working with this plugin on Android(which im already having problems with). But if im going to have other issues later on when i port it to iOS then I'd like to know how it can be resolved.

lukezbihlyj commented 4 years ago

@aidanikuz02 I made some fixes on a fork and made a PR for it, it fixes the issue for me on iOS with the latest version of the pod.

yoshisan0123 commented 4 years ago

hi all. I suffer from the same challenge.

There was a statement that changing the version of GoogleSignIn from 4.4.0 to 5.0.0 would calm down, so I tried it. Change before: pod 'GoogleSignIn', '4.4.0' After change: pod 'GoogleSignIn', '5.0.0'

But I got an error and couldn't build. Error message: Cannot find protocol declaration for 'GIDSignInUIDelegate'; did you mean 'GIDSignInDelegate'? Property 'uiDelegate' not found on object of type 'GIDSignIn *'; did you mean 'delegate'? No visible @interface for 'GIDSignIn' declares the selector 'handleURL:sourceApplication:annotation:' No visible @interface for 'GIDSignIn' declares the selector 'handleURL:sourceApplication:annotation:'

I hope that version 5.0.0 of GoogleSignIn can build normally and ITMS-90809 will not be sent.

lukezbihlyj commented 4 years ago

@yoshisan0123 For now you can use my fork which has the fixes applied: https://github.com/lukezbihlyj/google-signin-unity

I have a PR open to merge these changes into the official repo but the maintenance team is likely spread too thin and don't have time to review it.

yoshisan0123 commented 4 years ago

wow! Thank you for the meaningful information! I will try these within a few days.

yoshisan0123 commented 4 years ago

@lukezbihlyj hi lukezbihlyj. I changed the code and confirmed that it can be built normally with 5.0.0. Thank you for releasing the code.

Immediately uploaded to TestFlight but received ITMS-90809 by email. Please let me know if you know anything.

Podfile's current state. pod 'Firebase/Auth' pod 'GoogleSignIn', '5.0.0'

lukezbihlyj commented 4 years ago

@lukezbihlyj hi lukezbihlyj. I changed the code and confirmed that it can be built normally with 5.0.0. Thank you for releasing the code.

Immediately uploaded to TestFlight but received ITMS-90809 by email. Please let me know if you know anything.

Podfile's current state. pod 'Firebase/Auth' pod 'GoogleSignIn', '5.0.0'

Make sure you're using a version of Unity that also removes their dependency on UIWebView. I was using 2019.2.3f1 but they didn't fix the issue internally. I tried uploading an almost-blank project with no plugins and still received the warning on a fresh app, and it seems that they fixed it in a later version: https://unity3d.com/unity/whats-new/2019.2.7

yoshisan0123 commented 4 years ago

I checked about Unity version. As you say, the 2019 series has been fixed in 2019.2.7.

Unity 2019.2.7 Release Notes iOS: Fixed a deprecated API usage warning for using UIWebView when submitting Builds to the App Store Connect. (1180664, 1182272)

In the 2018 series, the correction has been made in 2018.4.10.

https://unity3d.com/unity/whats-new/2018.4.10 2018.4.10f1 Release Notes iOS: Fixed Deprecated API Usage warning for using UIWebView when submitting Builds to the App Store Connect. (1180664, 1182273)

In the 2017 series, a correction has been made in 2017.4.33.

https://unity3d.com/unity/whats-new/2017.4.33 Unity 2017.4.33 Release Notes iOS: Fixed Deprecated API Usage warning for using UIWebView when submitting Builds to the App Store Connect. (1180664, 1182274)

Currently my development environment is Unity 2018.4.14. We are currently investigating the cause.

yoshisan0123 commented 4 years ago

I wanted to find out why and once I re-imported all the certificate related sources. Then ITMS-90809 was not sent.

The problem has been solved thanks to you. The project members I belong to are also happy. Thank you very much.

karam89 commented 4 years ago

Hello @lukezbihlyj : After updating the code, I get the following errors (Even on new project) :

Assets/GoogleSignIn.cs(130,12): error CS0433: The type 'Task<T>' exists in both 'Unity.Tasks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'netstandard, Version=2.0.0.0, Culture=neutral' publicKeyToken=cc7b13ffcd2ddd51

Unity version 2018.4.14f1

lukezbihlyj commented 4 years ago

Hello @lukezbihlyj : After updating the code, I get the following errors (Even on new project) :

Assets/GoogleSignIn.cs(130,12): error CS0433: The type 'Task<T>' exists in both 'Unity.Tasks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'netstandard, Version=2.0.0.0, Culture=neutral' publicKeyToken=cc7b13ffcd2ddd51

Unity version 2018.4.14f1

Just delete this file Assets/Parse/Plugins/Unity.Tasks.dll and it should fix the problem - the latest versions of Unity include Tasks by default now so this plugin is legacy.

shinsim commented 4 years ago

hi all. I suffer from the same challenge.

There was a statement that changing the version of GoogleSignIn from 4.4.0 to 5.0.0 would calm down, so I tried it. Change before: pod 'GoogleSignIn', '4.4.0' After change: pod 'GoogleSignIn', '5.0.0'

But I got an error and couldn't build. Error message: Cannot find protocol declaration for 'GIDSignInUIDelegate'; did you mean 'GIDSignInDelegate'? Property 'uiDelegate' not found on object of type 'GIDSignIn *'; did you mean 'delegate'? No visible @interface for 'GIDSignIn' declares the selector 'handleURL:sourceApplication:annotation:' No visible @interface for 'GIDSignIn' declares the selector 'handleURL:sourceApplication:annotation:'

I hope that version 5.0.0 of GoogleSignIn can build normally and ITMS-90809 will not be sent.

I was having the same issue here.. apparently the Pods file need to reinstall/create by using terminal at the xcode root folder pod install

For me, i'm having issue where the cocoapod unable to download GoogleSignIn. Then I look into the Podfile and change the the platform from 10 to 12 platform :ios, '12.0' and try install again pod install

Since i'm targeting iOS 12 now, so in Build Setting change iOS Deployment Target to 12.0 and also Architectures to Standard architectures

pseudocolor commented 4 years ago

I wanted to find out why and once I re-imported all the certificate related sources. Then ITMS-90809 was not sent.

The problem has been solved thanks to you. The project members I belong to are also happy. Thank you very much.

@yoshisan0123 Im sorry, Im quite a newbie, can you describe what you do with the after download the fixes in Unity?

is it only to replace the Assets folder with Assets folder from the zip and build xcode? or there is something you have to do in xCode as well?

vikas-scaletech commented 3 years ago

i have update the pod 'GoogleSignIn', '4.4.0' and it is working fine..!

diemsouza commented 2 years ago

@lukezbihlyj can you provide the final package (from your branch) to import into unity? Or does anyone else have this package to share, to make final package is difficult and have a lot of configs and dependencies.

chin13577 commented 1 year ago

Hi UIWebview are no longer accepted.

I Fixed by following this thread

here

hope this help.

// using Unity 2021.3.25f1 // Xcode Version 14.3.1 (14E300c) // test on 2023/09/22