- Home /
Platform Dependent Compilation iOS vs iPhone
Ok so this may be a stupid question but I can't find the answer for it. In the documentation on this subject, it only shows #if UNITY_IPHONE, but in the editor/monodevelop I noticed #if UNITY_IOS is in there too.
Now my question is, does #if UNITY_IPHONE cover the iPad as well or is that what #if UNITY_IOS is for? If the iPhone compilation does cover both what is the iOS compilation for? I am trying to build a game for iPhone and iPad but i am not sure which compilation to use for them.
Thanks!
I would guess UNITY_IPHONE is the original macro, and they added UNITY_IOS later because it is more generic, but they should work the same. I can't guarantee that. Unity doesn't even mention UNITY_IOS in their documentation. Perhaps you can test this and post the proper answer for future peeps. If you want to test specific platforms, look at iPhone.generation which is of type iPhoneGeneration.
Thanks for replying, I would definitely test this and let everyone know, but I only have an iPhone 4 and no iPad. So i cant do a proper test, unless the iPad simulator were to work with it. Besides my game is still in the early stages of development, so it might be a while before I get to it.
Answer by ChorcheRnR · Jul 15, 2015 at 10:48 AM
According to the documentation, UNITY_IPHONE is deprecated and recommends to use UNITY_IOS, but basically they are the same.
Your answer
Follow this Question
Related Questions
iOS development: what hardware for testing? 1 Answer
Possible to render a simple colored spot rather than use a PNG? 0 Answers
How do I read XML on iOS? 2 Answers
Does Unity iOS support GetPixels? 1 Answer