main.m 828 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. See LICENSE folder for this sample’s licensing information.
  3. Abstract:
  4. Application entry point for all platforms
  5. */
  6. #if defined(TARGET_IOS) || defined(TARGET_TVOS)
  7. #import <UIKit/UIKit.h>
  8. #import <TargetConditionals.h>
  9. #import <Availability.h>
  10. #import "AAPLAppDelegate.h"
  11. #else
  12. #import <Cocoa/Cocoa.h>
  13. #endif
  14. #if defined(TARGET_IOS) || defined(TARGET_TVOS)
  15. int main(int argc, char * argv[]) {
  16. #if TARGET_OS_SIMULATOR && (!defined(__IPHONE_13_0) || !defined(__TVOS_13_0))
  17. #error No simulator support for Metal API for this SDK version. Must build for a device
  18. #endif
  19. @autoreleasepool {
  20. return UIApplicationMain(argc, argv, nil, NSStringFromClass([AAPLAppDelegate class]));
  21. }
  22. }
  23. #elif defined(TARGET_MACOS)
  24. int main(int argc, const char * argv[]) {
  25. return NSApplicationMain(argc, argv);
  26. }
  27. #endif