소스 검색

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
No account linked to committer's email address
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
 }

Loading…
취소
저장