浏览代码

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

When the method was called from Swift they were collected before calling them.
master
tmoldovan8x8 4 年前
父节点
当前提交
ef6b641802
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      ios/sdk/src/ExternalAPI.m

+ 2
- 2
ios/sdk/src/ExternalAPI.m 查看文件

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

正在加载...
取消
保存