1 // Copyright 2018-present 650 Industries. All rights reserved.
2 
3 #import <React/RCTBridgeModule.h>
4 
5 #import <ExpoModulesCore/EXInternalModule.h>
6 #import <ExpoModulesCore/EXModuleRegistry.h>
7 
8 // RCTBridgeModule capable of receiving method calls from JS and forwarding them
9 // to proper exported universal modules. Also, it exports important constants to JS, like
10 // properties of exported methods and modules' constants.
11 
12 // Swift compatibility headers (e.g. `ExpoModulesCore-Swift.h`) are not available in headers,
13 // so we use class forward declaration here. Swift header must be imported in the `.m` file.
14 @class SwiftInteropBridge;
15 @class ModulesProvider;
16 
17 NS_SWIFT_NAME(NativeModulesProxy)
18 @interface EXNativeModulesProxy : NSObject <RCTBridgeModule>
19 
20 @property (nonatomic, strong) SwiftInteropBridge *swiftInteropBridge;
21 
22 - (nonnull instancetype)init;
23 - (nonnull instancetype)initWithModuleRegistry:(nullable EXModuleRegistry *)moduleRegistry;
24 
25 - (void)callMethod:(NSString *)moduleName methodNameOrKey:(id)methodNameOrKey arguments:(NSArray *)arguments resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject;
26 - (id)callMethodSync:(NSString *)moduleName methodName:(NSString *)methodName arguments:(NSArray *)arguments;
27 
28 + (ModulesProvider *)getExpoModulesProvider;
29 
30 @end
31