- Home /
How do I remove plugin for iOS builds only
Hi,
I'm using the GameCircle plugin for android builds, but will not be using it for iOS. I've already put all my code that uses any GameCircle stuff in a "#if UNITY_ANDROID" block, and that works fine at run time. However, it is still trying to link against the plugin even though I am not using it (which is causing me grief during submission because it uses an IDFA and I'm not showing any ads...)
Anyway, if I delete all the GameCircle files in the /Plugins folder, it compiles without any refs to GameCircle. I've tried only deleting the GameCircle files in /Plugins/iOS, but the xcode build still tries to link against the plugin. I am obviously not understanding how the /Plugins directory is supposed to work.
Is there any way to ensure that certain plugins are only referenced if they are being used in that platform?
Thanks
P.S. I have the same linking problem in iOS with the Google Play Games Services plugin, though it does not affect my submission so I haven't tried doing anything about it yet.
I'd like to know as well. I'm experiencing this issue with the Google Play Games Services plugin, though it is actually keeping me from compiling in xcode saying the header file is missing.
Did you find any sophisticated way? I have removed all UNITY_IPHONE statements from scripts in Assets\GooglePlayGames\Platforms\Native And scripts under Plugins/iOS
@JovanS, yeah I did eventually find a forum thread with a solution that worked for me. I believe it was this one: https://github.com/playgameservices/play-games-plugin-for-unity/issues/61
See the 2nd comment there. Basically deleting 2 folders and an #elif statement from one of the scripts. Hope that helps.
Thank you theredace. Let's hope they will spit plugins soon.
Answer by steakpinball · Oct 02, 2014 at 02:24 AM
If you are using a version control system you can create a fork for a new platform and delete any files you need to. The specifics depend on the version control system used.