• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by jkramar · Sep 29, 2014 at 11:47 PM · iospluginxcodelinking

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 (w$$anonymous$$ch 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 anyt$$anonymous$$ng about it yet.

Comment
badjano
efge
Reklore

People who like this

3 Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image theredace · Oct 01, 2014 at 06:58 PM 0
Share

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.

avatar image JovanS · Feb 16, 2015 at 10:13 AM 0
Share

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

avatar image theredace · Feb 16, 2015 at 02:18 PM 0
Share

@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.

avatar image JovanS · Feb 16, 2015 at 08:31 PM 0
Share

Thank you theredace. Let's hope they will spit plugins soon.

1 Reply

· Add your reply
  • Sort: 
avatar image

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.

Comment

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

28 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Compiling plugin for iOS - need more info. 4 Answers

iOS Build Error 1 Answer

ios plugin Undefined symbols for architecture i386 0 Answers

Xcode 8 linking error help 0 Answers

Have to "Replace" iOS project every build because of Linker Errors 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges