Bladeren bron

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 jaren geleden
bovenliggende
commit
ef6b641802
No account linked to committer's email address
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2
    2
      ios/sdk/src/ExternalAPI.m

+ 2
- 2
ios/sdk/src/ExternalAPI.m Bestand weergeven

@@ -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
 }

Laden…
Annuleren
Opslaan