bugfix(ios) changes the participantInfo completion handler reference to strong.

When the method was called from Swift they were collected before calling them.
pull/8594/head jitsi-meet_5500
tmoldovan8x8 4 years ago committed by GitHub
parent 579acbc570
commit ef6b641802
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      ios/sdk/src/ExternalAPI.m

@ -30,7 +30,7 @@ static NSMapTable<NSString*, void (^)(NSArray* participantsInfo)> *participantIn
__attribute__((constructor))
static void initializeViewsMap() {
participantInfoCompletionHandlers = [NSMapTable strongToWeakObjectsMapTable];
participantInfoCompletionHandlers = [NSMapTable strongToStrongObjectsMapTable];
}
RCT_EXPORT_MODULE();
@ -160,7 +160,7 @@ RCT_EXPORT_METHOD(sendEvent:(NSString *)name
NSString *completionHandlerId = [[NSUUID UUID] UUIDString];
NSDictionary *data = @{ @"requestId": completionHandlerId};
[participantInfoCompletionHandlers setObject:completionHandler forKey:completionHandlerId];
[participantInfoCompletionHandlers setObject:[completionHandler copy] forKey:completionHandlerId];
[self sendEventWithName:retrieveParticipantsInfoAction body:data];
}

Loading…
Cancel
Save