1

Hello,everyone。

my project need to be compiled on Xcode5 using iOS7 SDK and on compiled on Xcode6 using iOS8 SDK at the same time,but some header file like "opengles/gltypes.h" only appears in iOS8 SDK。

When I compile my project using Xcode5,the compiler complains that the opengles/gltypes.h file not found。

Is it this problem solvable? How to fix it?

Thanks a lot!

ylovesy
  • 904
  • 1
  • 8
  • 21

1 Answers1

2

Code that should only be compiled under Xcode 6 with a Base SDK of iOS 8 should be wrapped with:

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000
    // Base SDK of iOS 8
#endif

Anything in between will be ignored if the Base SDK is iOS 7 or earlier (such as when using Xcode 5).

Note that the above is a compile time check. You may need additional runtime checks if you need to support both iOS 7 and iOS 8 while using Xcode 6.

rmaddy
  • 314,917
  • 42
  • 532
  • 579