playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.47k stars 967 forks source link

Cannot build for iOS using GPGS 0.9.25 "frengle" #689

Closed chetanisinanand closed 9 years ago

chetanisinanand commented 9 years ago

Getting error on Unity 5.2.0f3 (On MacOSX 10.10.3) :

Error building Player: Exception: /Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe did not run properly!

Failed running /Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out>>>

please let me know if anyone facing same issue and if anyone have solution for this ?

uareurapid commented 9 years ago

I have a different error with the same version:Assets/GooglePlayGames/Platforms/IClientImpl.cs(31,9): error CS0246: The type or namespace name `TokenClient' could not be found. Are you missing a using directive or an assembly reference?

Man, this plugin is really buggy... I´ve been using for some time, but is always issues after issues :-(

chetanisinanand commented 9 years ago

@uareurapid your issue seems to caused by changed identifier in latest GPGS version. please post the line of code which is throwing this error. maybe late, but @claywilkinson will surely look into it.

Although this plugin in less supported, but this is the only plugin which provide features like Realtime/turn-based online multiplayer free of cost.

chetanisinanand commented 9 years ago

_Issue Resolved_ Resolved my issue by deleting everything except 'Asset' directory. Also deleted 'GooglePlayGames' and 'Editor' directory and installed GPGS from scratch. Updated CocoaPods and successfully build the project.

uareurapid commented 9 years ago

yes, this is the same of #693

adrianogil commented 9 years ago

I have tried the steps recommended by @chetanisinanand, but it didn't work! I still got this error: "Assets/GooglePlayGames/Platforms/IClientImpl.cs(31,9): error CS0246: The type or namespace name `TokenClient' could not be found. Are you missing a using directive or an assembly reference?"

So, I removed "!NO_GPGS" from the #preprocessor macro on TokenClient.cs and the compile error disappeared.

claywilkinson commented 9 years ago

I see - the actual fix is to change IClientImpl.cs to be excluded completely if NO_GPGS is defined. Change line 17 to #if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))

I'll update the plugin today.

adrianogil commented 9 years ago

Now I got an error on PlayGamesClientFactory: "Cannot create IPlayGamesClient for unknown platform, returning DummyClient"

It seems such error is due to line 37 where NO_GPGS is used.

elif (UNITY_IPHONE && !NO_GPGS)

Then, I'm very curious to understand that NO_GPGS macro and why is it defined?

claywilkinson commented 9 years ago

NO_GPGS is a macro that when defined, removes all the Google Play Game Services from the project. The warning should be just that - a warning since if NO_GPGS is defined, you're not going to make any calls to the game services anyway.

I will update the plugin today so there are no warnings when NO_GPGS is defined.

claywilkinson commented 9 years ago

Just updated the plugin.