From d775065f5531bd03dbdd86ce6fae0ebd79e8b4c7 Mon Sep 17 00:00:00 2001 From: Min Hu Date: Thu, 15 Oct 2026 20:46:41 +0100 Subject: [PATCH 1/2] [iOS] fix events lost before module initialized --- ios/RNCallKeep/RNCallKeep.m | 1 + 1 file changed, 1 insertion(+) diff --git a/ios/RNCallKeep/RNCallKeep.m b/ios/RNCallKeep/RNCallKeep.m index 475cd623..e9feb580 100644 --- a/ios/RNCallKeep/RNCallKeep.m +++ b/ios/RNCallKeep/RNCallKeep.m @@ -171,6 +171,7 @@ - (void)sendEventWithNameWrapper:(NSString *)name body:(id)body { body, @"data", nil ]; + if (_delayedEvents == nil) _delayedEvents = [NSMutableArray array]; [_delayedEvents addObject:dictionary]; } } From bb9378ee37bad43b8d71990b2a56e37d5bb1589b Mon Sep 17 00:00:00 2001 From: Min Hu Date: Sat, 17 Oct 2026 14:21:31 +0100 Subject: [PATCH 2/2] change the place of creating _delayedEvents array --- ios/RNCallKeep/RNCallKeep.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/RNCallKeep/RNCallKeep.m b/ios/RNCallKeep/RNCallKeep.m index e9feb580..44b5a657 100644 --- a/ios/RNCallKeep/RNCallKeep.m +++ b/ios/RNCallKeep/RNCallKeep.m @@ -81,6 +81,7 @@ + (id)allocWithZone:(NSZone *)zone { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ sharedInstance = [super allocWithZone:zone]; + sharedInstance->_delayedEvents = [NSMutableArray array]; }); return sharedInstance; } @@ -171,7 +172,6 @@ - (void)sendEventWithNameWrapper:(NSString *)name body:(id)body { body, @"data", nil ]; - if (_delayedEvents == nil) _delayedEvents = [NSMutableArray array]; [_delayedEvents addObject:dictionary]; } }