Search code examples
iphoneiosmonoxamarin.iosmonodevelop

MonoDevelop/MonoTouch #if iPHONE?


I'm currently working on a multiplatform app for iPhone and various other devices, as far as I can work out I can use preprocessor directives to check if I'm building for iPhone or another platform, so for example I could have:

#if WINDOWS_PHONE
ScreenRes = new Vector2(800,480);
#endif

#if XBOX360
ScreenRes = new Vector2(1280,720);
#endif

However I'm not sure which declaration I'm supposed to use to check for iPhone, I've already tried IPHONE, IOS, I_PHONE and a few others.


Solution

  • We do not define any by default. You can do this by adding the define yourself when you build it with MonoDevelop to your configurations.