From ea12009d83499a510c94437a892fc4a2a0c98199 Mon Sep 17 00:00:00 2001 From: Clayton Halim Date: Thu, 24 Sep 2020 16:01:30 -0400 Subject: [PATCH] Fix missing bridge on reload --- ios/RNTaplyticsReact.m | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ios/RNTaplyticsReact.m b/ios/RNTaplyticsReact.m index 207426e..aaced72 100644 --- a/ios/RNTaplyticsReact.m +++ b/ios/RNTaplyticsReact.m @@ -3,7 +3,14 @@ @implementation RNTaplyticsReact -@synthesize bridge = _bridge; ++ (id)allocWithZone:(NSZone *)zone { + static RNTaplyticsReact *sharedInstance = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + sharedInstance = [super allocWithZone:zone]; + }); + return sharedInstance; +} - (dispatch_queue_t)methodQueue {