commit | author | age
|
454098
|
1 |
/* |
L |
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 |
|
|
17 |
#import <Foundation/Foundation.h> |
|
18 |
|
|
19 |
#if TARGET_OS_IOS || TARGET_OS_TV |
|
20 |
|
|
21 |
#import <UIKit/UIKit.h> |
|
22 |
|
|
23 |
#define GULApplication UIApplication |
|
24 |
#define GULApplicationDelegate UIApplicationDelegate |
|
25 |
#define GULUserActivityRestoring UIUserActivityRestoring |
|
26 |
|
|
27 |
static NSString *const kGULApplicationClassName = @"UIApplication"; |
|
28 |
|
|
29 |
#elif TARGET_OS_OSX |
|
30 |
|
|
31 |
#import <AppKit/AppKit.h> |
|
32 |
|
|
33 |
#define GULApplication NSApplication |
|
34 |
#define GULApplicationDelegate NSApplicationDelegate |
|
35 |
#define GULUserActivityRestoring NSUserActivityRestoring |
|
36 |
|
|
37 |
static NSString *const kGULApplicationClassName = @"NSApplication"; |
|
38 |
|
|
39 |
#elif TARGET_OS_WATCH |
|
40 |
|
|
41 |
#import <WatchKit/WatchKit.h> |
|
42 |
|
|
43 |
// We match the according watchOS API but swizzling should not work in watch |
|
44 |
#define GULApplication WKExtension |
|
45 |
#define GULApplicationDelegate WKExtensionDelegate |
|
46 |
#define GULUserActivityRestoring NSUserActivityRestoring |
|
47 |
|
|
48 |
static NSString *const kGULApplicationClassName = @"WKExtension"; |
|
49 |
|
|
50 |
#endif |