Added support for synchronous methods in native modules on iOS

Reviewed By: javache

Differential Revision: D4947556

fbshipit-source-id: 0ef73dc5d741201e59fef1fc048809afc65c75b5
This commit is contained in:
Alex Dvornikov
2017-04-27 11:49:49 -07:00
committed by Facebook Github Bot
parent 2d3a272e0e
commit db0c22192c
9 changed files with 134 additions and 67 deletions

View File

@@ -17,6 +17,17 @@ typedef NS_ENUM(NSUInteger, RCTFunctionType) {
RCTFunctionTypeSync,
};
static inline const char *RCTFunctionDescriptorFromType(RCTFunctionType type) {
switch (type) {
case RCTFunctionTypeNormal:
return "async";
case RCTFunctionTypePromise:
return "promise";
case RCTFunctionTypeSync:
return "sync";
}
};
@protocol RCTBridgeMethod <NSObject>
@property (nonatomic, copy, readonly) NSString *JSMethodName;