GULApplication.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright 2019 Google LLC
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <Foundation/Foundation.h>
  17. #if TARGET_OS_IOS || TARGET_OS_TV
  18. #import <UIKit/UIKit.h>
  19. #define GULApplication UIApplication
  20. #define GULApplicationDelegate UIApplicationDelegate
  21. #define GULUserActivityRestoring UIUserActivityRestoring
  22. static NSString *const kGULApplicationClassName = @"UIApplication";
  23. #elif TARGET_OS_OSX
  24. #import <AppKit/AppKit.h>
  25. #define GULApplication NSApplication
  26. #define GULApplicationDelegate NSApplicationDelegate
  27. #define GULUserActivityRestoring NSUserActivityRestoring
  28. static NSString *const kGULApplicationClassName = @"NSApplication";
  29. #elif TARGET_OS_WATCH
  30. #import <WatchKit/WatchKit.h>
  31. // We match the according watchOS API but swizzling should not work in watch
  32. #define GULApplication WKExtension
  33. #define GULApplicationDelegate WKExtensionDelegate
  34. #define GULUserActivityRestoring NSUserActivityRestoring
  35. static NSString *const kGULApplicationClassName = @"WKExtension";
  36. #endif