diff --git a/React/Base/RCTBridgeMethod.h b/React/Base/RCTBridgeMethod.h index cb322c261..bfa466cef 100644 --- a/React/Base/RCTBridgeMethod.h +++ b/React/Base/RCTBridgeMethod.h @@ -19,7 +19,6 @@ typedef NS_ENUM(NSUInteger, RCTFunctionType) { @protocol RCTBridgeMethod @property (nonatomic, copy, readonly) NSString *JSMethodName; -@property (nonatomic, copy, readonly) NSDictionary *profileArgs; @property (nonatomic, readonly) RCTFunctionType functionType; - (void)invokeWithBridge:(RCTBridge *)bridge diff --git a/React/Base/RCTModuleMethod.m b/React/Base/RCTModuleMethod.m index 38c18c808..8c51824e9 100644 --- a/React/Base/RCTModuleMethod.m +++ b/React/Base/RCTModuleMethod.m @@ -27,7 +27,7 @@ typedef BOOL (^RCTArgumentBlock)(RCTBridge *, NSUInteger, id); nullability:(RCTNullability)nullability unused:(BOOL)unused { - if ((self = [super init])) { + if (self = [super init]) { _type = [type copy]; _nullability = nullability; _unused = unused; @@ -44,11 +44,9 @@ typedef BOOL (^RCTArgumentBlock)(RCTBridge *, NSUInteger, id); NSArray *_argumentBlocks; NSString *_methodSignature; SEL _selector; - NSDictionary *_profileArgs; } @synthesize JSMethodName = _JSMethodName; -@synthesize functionType = _functionType; static void RCTLogArgumentError(RCTModuleMethod *method, NSUInteger index, id valueOrType, const char *issue) @@ -157,27 +155,10 @@ SEL RCTParseMethodSignature(NSString *methodSignature, NSArray 0 ? JSMethodName : ({ - NSString *methodName = methodSignature; - NSRange colonRange = [methodName rangeOfString:@":"]; - if (colonRange.location != NSNotFound) { - methodName = [methodName substringToIndex:colonRange.location]; - } - methodName = [methodName stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; - RCTAssert(methodName.length, @"%@ is not a valid JS function name, please" - " supply an alternative using RCT_REMAP_METHOD()", methodSignature); - methodName; - }); - - if ([_methodSignature rangeOfString:@"RCTPromise"].length) { - _functionType = RCTFunctionTypePromise; - } else { - _functionType = RCTFunctionTypeNormal; - } + _JSMethodName = [JSMethodName copy]; } return self; @@ -218,7 +199,6 @@ SEL RCTParseMethodSignature(NSString *methodSignature, NSArray", - [self class], self, [self methodName], _JSMethodName]; + return [NSString stringWithFormat:@"<%@: %p; exports %@ as %@()>", + [self class], self, [self methodName], self.JSMethodName]; } @end