unity-googledrive icon indicating copy to clipboard operation
unity-googledrive copied to clipboard

DisplayManager.mm >> l.331 > EXC_BAD_ACCESS

Open samavan opened this issue 7 years ago • 4 comments

While it runs on device, it register the follow error... Not sure what to do in the file to fix it :(... Any idea please?

Now every routine such as login/upload/download are working great from the editor on both windows and Mac.

screen shot 2018-09-01 at 15 36 05

samavan avatar Sep 01 '18 06:09 samavan

It seems the errors due to the fact I was deactivating the Objective-C Automatic Refeference Counting as below....

screen shot 2018-09-01 at 16 04 51

... Since I was having the following error from your code. DisplayManager.mm seems to be an Unity class then I believe it works... Would you have any idea how to edit the WebView.mm to get the code run smooth on Build?....

screen shot 2018-09-01 at 15 53 22 screen shot 2018-09-01 at 15 56 28

samavan avatar Sep 01 '18 07:09 samavan

A friend fixed the WebView.mm file. The build now run smooth.

WebView.mm.zip

Now once the login WebView showing up I have this showing up : s__12361732

But well you mentioned in another Issue : https://github.com/midworld/unity-googledrive/issues/35 "Hmm, I think Google drive doesn't support OAuth2 anymore."

Your plugin is very nice, as I previously said, it still works a charm from Editor and StandAlone then... :(...

samavan avatar Sep 02 '18 15:09 samavan

Google now disallows WebView/UIWebView/WKWebView for OAuth interactions. Several solutions (that might be integrated with this plugin) are enumerated in the second link.

https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html https://auth0.com/blog/google-blocks-oauth-requests-from-embedded-browsers/

Also the following plugin seems to be updated for this issue.

https://github.com/Elringus/UnityGoogleDrive

KojiNakamaru avatar Sep 03 '18 00:09 KojiNakamaru

Well hmm... there are actually some issue with the plugin you mention... https://github.com/Elringus/UnityGoogleDrive/issues/25

It seems Unity doesn't like to switch of app while the login process then unable to catch the answer from the html page...

Well myself I have no idea how to super this kind of thing, it is out of my skill set unfortunately :( ...

samavan avatar Sep 03 '18 00:09 samavan