DeploymentTarget.c 580 B

1234567891011121314151617181920212223242526
  1. #include <Availability.h>
  2. #include <TargetConditionals.h>
  3. #if TARGET_OS_OSX
  4. #if __MAC_OS_X_VERSION_MIN_REQUIRED != __MAC_10_11
  5. #error macOS deployment version mismatch
  6. #endif
  7. #elif TARGET_OS_IOS
  8. #if __IPHONE_OS_VERSION_MIN_REQUIRED != __IPHONE_9_1
  9. #error iOS deployment version mismatch
  10. #endif
  11. #elif TARGET_OS_WATCH
  12. #if __WATCH_OS_VERSION_MIN_REQUIRED != __WATCHOS_2_0
  13. #error watchOS deployment version mismatch
  14. #endif
  15. #elif TARGET_OS_TV
  16. #if __TV_OS_VERSION_MIN_REQUIRED != __TVOS_9_0
  17. #error tvOS deployment version mismatch
  18. #endif
  19. #else
  20. #error unknown OS
  21. #endif
  22. void foo()
  23. {
  24. }