From 9506f3ac3d653f240f4cf79640105f4850371fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolta=CC=81n=20Ulrich?= Date: Wed, 13 Oct 2021 18:44:29 +0300 Subject: [PATCH] fix(ios) Fixes RCTBridge not being released when JitsiMeet is trying to destroy its bridge on some OS versions --- ios/sdk/src/JitsiMeet.m | 1 + ios/sdk/src/RCTBridgeWrapper.h | 2 ++ ios/sdk/src/RCTBridgeWrapper.m | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/ios/sdk/src/JitsiMeet.m b/ios/sdk/src/JitsiMeet.m index 34b37e1d1..06c46e82f 100644 --- a/ios/sdk/src/JitsiMeet.m +++ b/ios/sdk/src/JitsiMeet.m @@ -127,6 +127,7 @@ } - (void)destroyReactNativeBridge { + [_bridgeWrapper invalidate]; _bridgeWrapper = nil; } diff --git a/ios/sdk/src/RCTBridgeWrapper.h b/ios/sdk/src/RCTBridgeWrapper.h index 995bd4fd2..0b0bcb0ee 100644 --- a/ios/sdk/src/RCTBridgeWrapper.h +++ b/ios/sdk/src/RCTBridgeWrapper.h @@ -34,4 +34,6 @@ @property (nonatomic, readonly, strong) RCTBridge *bridge; +- (void)invalidate; + @end diff --git a/ios/sdk/src/RCTBridgeWrapper.m b/ios/sdk/src/RCTBridgeWrapper.m index 2e3da65c8..28a645d3d 100644 --- a/ios/sdk/src/RCTBridgeWrapper.m +++ b/ios/sdk/src/RCTBridgeWrapper.m @@ -33,6 +33,10 @@ return self; } +- (void)invalidate { + [_bridge invalidate]; +} + #pragma mark helper methods for getting the packager URL #if DEBUG