How do I remove plugin for iOS builds only


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?


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.

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.