0

Is it possible to build for android with objective-c native plugin in Unity3D? It builds when i press "bıild and run" without error but can't test with emulator since i use native plugin. I don't have an android device either.

Any help would be appreciated.

1
  • Objective-C is used for iOS and Mac OS X only. They rely on frameworks that are known in the Apple universe only. So I hardly believe that it's possible. Instead you should have java or C code via native code (JNI) to get it running. Commented Oct 24, 2013 at 13:44

1 Answer 1

1

You'll be able to build for Android, but you won't be able to use an iOS plugin in Android.

In my projects I have multiple plugins for various platforms. By isolating platform dependent code with #if UNITY_platform, where platform ranges from IPHONE to ANDROID, you can effectively have a single code base with multiple platform plugins, that implement functionality in that single code base, by using dependency injection.

Sign up to request clarification or add additional context in comments.

3 Comments

Why the down vote? I have many projects that work exactly like I stated above and this is a correct answer to the OP.
How about windows phone? if i convert my native objective-c code to native c++ will i be able to build for windows phone, android and iOS? Do you have any idea?
I haven't done any plugins for Windows Phone, but yes, you can convert Objective-C to either C++ or C#. See: docs.unity3d.com/Documentation/Manual/wp8-plugins.html

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.