I planned to use Google Play Games for Android and Game Center for iOS but this plugin unnecessarily makes XCode to compile Google Play Games related libraries even when those are not used.
Only workaround I have is to remove Google Play Games related iOS libraries from the Plugin folder and Editor folder. then from the generated XCode project, I have to remove every line that starts with "GPG" from RegisterMonoModules.cpp.
I'm not sure how to make the unity build to exclude those lines from RegisterMonoModules.cpp, but
it would be the best if there's an option in the editor menu to exclude iOS support.
I really, really want this as well. I've read all the other issues filed to disable Google Play Games on iOS. It works great on Android, but now I can't get iOS to build, whether I set up the iOS through Google Play Games or not. Please please please give us some code that is disabled in iOS builds automatically.
Yes! I want to use Game Center for iOS. I think we have to separate the project into two (iOS & Android) for now.
They should develop two plugin; like one is only for Android and the other for iOS & Android.
I've filed this as an official feature request for the team. I'll see what they say.
(Marked as 18468026 for internal tracking purposes.)
Awesome. My plan right now is submit iOS app for review. Copy the project, import the Google Plugin, submit Android app. Delete the copy. Having an Android only plugin would allow me to have a single project again.
@ToddKerpelman , Thanks for the follow up. Please keep us updated. And thanks to @DocKaos for bumping this issue.
Thank you all.
Thanks @ToddKerpelman We really need it.
This is really necessary for get rid of bunch of frameworks.
What am I going to do if I do not want to use multiplayer features?
Adding @mrggl's workaround from issue #296 :
Unfortunately there's no built-in way to handle this currently (we're looking at this for future releases).
However, you should be able to manually remove the game services from iOS by updating the preprocessor directives that are conditionally compiling the game services package.
In the GooglePlayGames subdirectory in your project, just find all the occurrences of
"#if (UNITY_ANDROID || UNITY_IPHONE)"
or
"#if UNITY_IPHONE"
and remove "UNITY_IPHONE" (i.e. #if (UNITY_ANDROID || UNITY_IPHONE) -> #if UNITY_ANDROID).
GitHub needs a +1. (Where do you file that issue ;P ) But +1 for the idea of removing it through the preprocessor, we'll see if just having those libraries in there causes problems.
It really would help us.
Hey, just to let everyone know I worked around this by generating a 'fake' Params.H file (no problem for us since our iOS achievements are totally separate and the Params.H file seems to only be used on iOS - so it didn't affect our Android GPG achievements).
By poking around the c# files used for the actual Params.H file generation I could see where the catches were that prevent a 'non legitimate' params.h file from being generated. I essentially made a new function to create a dummy params.h file using the exact same code, minus the safety mechanisms, and called it 'generate dummy params.h file'.
Builds work fine now. Will try to dig up the modified script if needed.
+1. It would really help me if I could easily remove GPGS completely for iOS builds.
Is there any update on this issue? We have the same problem, we use this plugin for Android but not iOS. However we can not build for iOS now. Simply removing all the "#if UNITY_IPHONE" references does not fix the issue.
Specifically what is the issue when building for iOS after removing all the #if UNITY_IPHONE sections?
If I remove all the #if UNITY_IPHONE sections and build, I get the post build process error: "*** FATAL ERROR: Failed to read GPGSParams.h". However, it looks like the XCode project is still successfully created.
If I then load that resulting XCode project in XCode and try to build it I get the following build error: "...GPGSAppController.mm:20:9: 'GooglePlus/GooglePlus.h' file not found".
If I delete the file Editor/PostprocessBuildPlayer_PlayGames I can do a build that doesn't give me the first post build error. But if I load that resulting XCode project into XCode and try to build it I get the same XCode error about GooglePlus.h not being found.
Hear hear, we really need a solution to this, it's a bit rich that we are forced into incorporating all these Google API's for IOS builds when they're not wanted in that build, there should be a way to make a selection.. @TinyMobGraham did you manage to get it to work ? We're having the exact same problem and if removing all the
Has anyone actually got any working solutions ? My knowledge of how plugins get incorporated into a build is a little limited at the moment unfortunately and there doesn't appear to be good solutions other than creating an entirely different project, which isn't very conveniant as I'm sure many developers will attest. Working solution needed please!
The only thing that managed to work for me was to fully delete the plugin when doing iOS builds. This is especially frustrating because the plugin is not contained within a single subdirectory, there are files spread out in various places with different names. Luckily I had a GIT commit with the original install so I could find all the files and delete them.
@TinyMobGraham seems that I'll need to do the same every time we run an IOS build. Our project is in development, so that means we'll be needing to do frequent builds which adds to the steps and wastes our time. If we can collaborate on a list of folders to be deleted to minimize the time spent that'll be a little help too, if it's not entirely necessary to remove every file and folder added by the plugin.
One of our developers mentioned another plugin that handles Google Play services, but it's not administrated by google. It at least separates IOS and the Android plugin.
Hey there,
I worked around this by poking around the code and looking at how the params.h file was generated. If you look at the menu option to generate a params.h you will notice that the code has certain checks in place - I ended up just rewriting it to allow a 'bogus' params.h file to be generated.
Sounds dangerous, but so long as you are 100% sure you are not going to use GPG for iOS, you can have whatever params.h file you want. I'm no longer at the company where I was experiencing this problem, but I'll download the plug in again and have a look, will post the modified script here later if needed.
EDIT: for a safer option, copy the sections of the code you need and add an extra context item on the menu labelled "generate unsafe params file" or something, allowing you to use the real file generation in the future if needed (again, will post soution here when I can)
Thanks @GrayedFox , that would be very helpful.
To be honest I thought that Google portrayed itself as an open standard company, that encourages using 3'rd parties but it's seeming more and more than they're trying to direct everything to google and give sloppy thirds to other companies and providers.
Why would I want to use google play store on my iphone when there is already apple's own store? Ok sure the high score things and such would be useful to maintain in one space but I am also sure a lot of developers wish to host the game logic on their own hosting services and apply their own raw programming expertise on the logic. Most of the gimmicks that these sites offer are just that, gimmicks, and all of these things are implementable with basic logic on a basic server setup.
The idea of trying to be overly "smart" and filling the developer panels with overt encouragement to use their gimmick tools for the developer confuses things and feels like they are offering using a hydrogen bomb to kill a fly..
My point is it's disappointing that google supports openness and customization but offers this plugin that will force it's code into the binary even if you don't wish to publish it in a certain device.
Perhaps somebody is able to write up some code to circumvent any of the plugin from being compiled into the project when it is not required depending on a condition. :)
Here is what I did:
I executed following script to wrap all files with ANDROID directive: https://gist.github.com/yamanyar/3157b791726a3795dfee
Then later on I applied these:
deleted: Assets/Editor/GPGSPostBuild.cs
reset: Assets/Editor/mod_pbxproj.pyc
reset: Assets/Editor/plistlib.pyc
reset: Assets/Editor/PostprocessBuildPlayer
deleted: Assets/Plugins/iOS/GPGSAppController.h
deleted: Assets/Plugins/iOS/GPGSAppController.mm
(reset means reset it to prior to what it was before installing google play services).
That's all
Cheers
Is it ever going to be solved? I am sure easy official workaround could be done in a week. Its Frustrating that we need to rework when we want to switch between android and iOS build.
Unity has very complicated folder structure , files are spread within different folders so its hard to search each and every file to delete.
Still nothing? Wow..
Version 0.9.15 allows excluding the play game services from the iOS player by adding the symbol NO_GPGS. Of course and calls your game is making to Google Play Game Services need to be excluded by you still.
Where exactly do you add the NO_GPGS symbol to make this work?
EDIT: Nevermind, missed it in the README in the _Excluding all Google Play Game Services when building for iOS_ section
To disable the Google Play Game Services in the iOS build, open the iOS player settings. Then in the "Other Settings" panel, find the entry named "Scripting Define Symbol" and add a symbol named: NO_GPGS (case sensitive).
Thanks. It's great to have Devs who listen.
Is there any way to put the answer up at the top of the page?
Most helpful comment
Where exactly do you add the NO_GPGS symbol to make this work?
EDIT: Nevermind, missed it in the README in the _Excluding all Google Play Game Services when building for iOS_ section