[ReactNative] Use explicit doubles on RCTLocationOptions to avoid NSInvocation bug
This commit is contained in:
parent
17262db5a9
commit
09460cf21b
|
@ -28,9 +28,9 @@ typedef NS_ENUM(NSInteger, RCTPositionErrorCode) {
|
|||
#define RCT_DEFAULT_LOCATION_ACCURACY kCLLocationAccuracyHundredMeters
|
||||
|
||||
typedef struct {
|
||||
NSTimeInterval timeout;
|
||||
NSTimeInterval maximumAge;
|
||||
CLLocationAccuracy accuracy;
|
||||
double timeout;
|
||||
double maximumAge;
|
||||
double accuracy;
|
||||
} RCTLocationOptions;
|
||||
|
||||
@implementation RCTConvert (RCTLocationOptions)
|
||||
|
|
|
@ -381,10 +381,8 @@ static NSString *RCTStringUpToFirstArgument(NSString *methodName)
|
|||
|
||||
case '{': {
|
||||
[argumentBlocks addObject:^(RCTBridge *bridge, NSNumber *context, NSInvocation *invocation, NSUInteger index, id json) {
|
||||
NSUInteger size;
|
||||
NSGetSizeAndAlignment(argumentType, &size, NULL);
|
||||
void *returnValue = malloc(size);
|
||||
NSMethodSignature *methodSignature = [RCTConvert methodSignatureForSelector:selector];
|
||||
void *returnValue = malloc(methodSignature.methodReturnLength);
|
||||
NSInvocation *_invocation = [NSInvocation invocationWithMethodSignature:methodSignature];
|
||||
[_invocation setTarget:[RCTConvert class]];
|
||||
[_invocation setSelector:selector];
|
||||
|
|
Loading…
Reference in New Issue