bugfix(ios) changes the participantInfo completion handler reference to strong.
When the method was called from Swift they were collected before calling them.
This commit is contained in:
parent
579acbc570
commit
ef6b641802
|
@ -30,7 +30,7 @@ static NSMapTable<NSString*, void (^)(NSArray* participantsInfo)> *participantIn
|
||||||
|
|
||||||
__attribute__((constructor))
|
__attribute__((constructor))
|
||||||
static void initializeViewsMap() {
|
static void initializeViewsMap() {
|
||||||
participantInfoCompletionHandlers = [NSMapTable strongToWeakObjectsMapTable];
|
participantInfoCompletionHandlers = [NSMapTable strongToStrongObjectsMapTable];
|
||||||
}
|
}
|
||||||
|
|
||||||
RCT_EXPORT_MODULE();
|
RCT_EXPORT_MODULE();
|
||||||
|
@ -160,7 +160,7 @@ RCT_EXPORT_METHOD(sendEvent:(NSString *)name
|
||||||
NSString *completionHandlerId = [[NSUUID UUID] UUIDString];
|
NSString *completionHandlerId = [[NSUUID UUID] UUIDString];
|
||||||
NSDictionary *data = @{ @"requestId": completionHandlerId};
|
NSDictionary *data = @{ @"requestId": completionHandlerId};
|
||||||
|
|
||||||
[participantInfoCompletionHandlers setObject:completionHandler forKey:completionHandlerId];
|
[participantInfoCompletionHandlers setObject:[completionHandler copy] forKey:completionHandlerId];
|
||||||
|
|
||||||
[self sendEventWithName:retrieveParticipantsInfoAction body:data];
|
[self sendEventWithName:retrieveParticipantsInfoAction body:data];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue