1 // Copyright 2018-present 650 Industries. All rights reserved.
2 
3 #if __cplusplus
4 
5 #import <UIKit/UIKit.h>
6 #import <ExpoModulesCore/EXReactDelegateWrapper.h>
7 
8 #if __has_include(<React-RCTAppDelegate/RCTAppDelegate.h>)
9 #import <React-RCTAppDelegate/RCTAppDelegate.h>
10 #elif __has_include(<React_RCTAppDelegate/RCTAppDelegate.h>)
11 // for importing the header from framework, the dash will be transformed to underscore
12 #import <React_RCTAppDelegate/RCTAppDelegate.h>
13 #endif
14 
15 NS_ASSUME_NONNULL_BEGIN
16 
17 /**
18  Provides backwards compatibility for existing projects with `AppDelegate`
19  written in Objective-C and that forwards all messages to the new `ExpoAppDelegate`.
20  If your `AppDelegate` is in Swift, it should inherit from `ExpoAppDelegate` class instead.
21  */
22 #if __has_include(<React-RCTAppDelegate/RCTAppDelegate.h>) || __has_include(<React_RCTAppDelegate/RCTAppDelegate.h>)
23 @interface EXAppDelegateWrapper : RCTAppDelegate
24 #else
25 @interface EXAppDelegateWrapper : UIResponder <UIApplicationDelegate>
26 #endif
27 
28 @property (nonatomic, strong, readonly) EXReactDelegateWrapper *reactDelegate;
29 
30 @end
31 
32 NS_ASSUME_NONNULL_END
33 
34 #else
35 
36 // Workaround the main.m build error when running with new architecture mode
37 // Context: https://github.com/facebook/react-native/pull/35661
38 @interface EXAppDelegateWrapper : UIResponder
39 @end
40 
41 #endif
42