DeploymentTarget.c 755 B

123456789101112131415161718192021222324252627282930
  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_VISION
  8. # if __VISION_OS_VERSION_MIN_REQUIRED != __VISIONOS_1_0
  9. # error visionOS deployment version mismatch
  10. # endif
  11. #elif TARGET_OS_IOS
  12. # if __IPHONE_OS_VERSION_MIN_REQUIRED != __IPHONE_9_1
  13. # error iOS deployment version mismatch
  14. # endif
  15. #elif TARGET_OS_WATCH
  16. # if __WATCH_OS_VERSION_MIN_REQUIRED != __WATCHOS_2_0
  17. # error watchOS deployment version mismatch
  18. # endif
  19. #elif TARGET_OS_TV
  20. # if __TV_OS_VERSION_MIN_REQUIRED != __TVOS_9_0
  21. # error tvOS deployment version mismatch
  22. # endif
  23. #else
  24. # error unknown OS
  25. #endif
  26. void foo(void)
  27. {
  28. }