No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UndefinePlatforms.h 1.1KB

1234567891011121314151617181920212223242526272829303132333435
  1. // DO NOT PUT #pragma once or include guard check here
  2. // This header is designed to be able to be included multiple times
  3. // This header is used to temporary undefine iOS/tvOS platform definitions in case there is a naming conflict with
  4. // 3rd party code. Please make sure to always use this paired with the RedefinePlatforms.h header.
  5. // Note: PLATFORM_IOS and PLATFORM_TVOS are redefined in
  6. // /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/mach-o/loader.h
  7. //
  8. //
  9. // ex.
  10. //
  11. // #include "UndefinePlatforms.h"
  12. // #include "Some3rdParty.h"
  13. // #include "RedefinePlatforms.h"
  14. #ifdef DETAIL__PLATFORMS_HAD_BEEN_UNDEFINED_BY_UNDEFINEPLATFORMS_H
  15. #error "UndefinePlatforms.h has been included more than once or RedefinePlatforms.h is missing."
  16. #endif
  17. #if PLATFORM_IOS
  18. #define DETAIL__TEMP_PLATFORM_IOS_WAS_1
  19. #endif
  20. #undef PLATFORM_IOS
  21. #if PLATFORM_TVOS
  22. #define DETAIL__TEMP_PLATFORM_TVOS_WAS_1
  23. #endif
  24. #undef PLATFORM_TVOS
  25. #if PLATFORM_VISIONOS
  26. #define DETAIL__TEMP_PLATFORM_VISIONOS_WAS_1
  27. #endif
  28. #undef PLATFORM_VISIONOS
  29. #define DETAIL__PLATFORMS_HAD_BEEN_UNDEFINED_BY_UNDEFINEPLATFORMS_H