Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
2
Question by serenefox · Mar 19, 2014 at 08:15 PM · iosiphoneipad

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!

Comment
Add comment · Show 2
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 supernat · Mar 20, 2014 at 09:30 PM 0
Share

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.

avatar image serenefox · Mar 21, 2014 at 05:21 AM 0
Share

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.

3 Replies

· Add your reply
  • Sort: 
avatar image
1

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.

Comment
Add comment · 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
avatar image
-1

Answer by Tekksin · Dec 15, 2014 at 01:11 PM

lines 19-22

https://books.google.com/books?id=toCfAwAAQBAJ&pg=PA158&lpg=PA158&dq=Platform+Dependent+Compilation+does+UNITY_IPHONE+cover+the+ipad&source=bl&ots=FPYLZF6lcW&sig=InaxbuW-HPYEAyxSprJz6rs0GaA&hl=en&sa=X&ei=2d2OVLqSH4mqgwSFv4TQDA&ved=0CCkQ6AEwAg#v=onepage&q=Platform%20Dependent%20Compilation%20does%20UNITY_IPHONE%20cover%20the%20ipad&f=false

Comment
Add comment · 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
avatar image
0

Answer by Vjosey · Mar 16, 2016 at 05:46 PM

UNITY_IPHONE is Deprecated. Use UNITY_IOS instead.

Comment
Add comment · 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.

Follow this Question

Answers Answers and Comments

24 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

Related Questions

iOS development: what hardware for testing? 1 Answer

Possible to render a simple colored spot rather than use a PNG? 0 Answers

[iOS Memory Question] At ~35MB of memory on a heavily multitasked iPhone4/iPad we are getting suspend-crashes after lowmemory warnings. Is there anything we can do? 1 Answer

How do I read XML on iOS? 2 Answers

Does Unity iOS support GetPixels? 1 Answer


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