Repository navigation
Conversation
|
Thanks for this, the diagnosis is right. I reproduced it before reviewing. Reproduction. I compiled the real
So the fix works, and One problem: the lazy init races with Suggestion: create the array once, where the singleton is allocated, and drop the lazy init: + (id)allocWithZone:(NSZone *)zone {
static RNCallKeep *sharedInstance = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
sharedInstance = [super allocWithZone:zone];
sharedInstance->_delayedEvents = [NSMutableArray array];
});
return sharedInstance;
}
A separate, pre-existing issue: |
|
Update: I ran the same tests on a real iPhone 15 Pro Max (iOS 26.6.1) with the real CallKit. Nothing is simulated this time, including the incoming call.
|
|
Hi @sboily thanks for your review and suggestion , I have pushed the changes. |
_delayedEventsis normally initialized in init. However, when the app is launched from a terminated state,reportNewIncomingCallcan be invoked before init.In this case,
_delayedEventsis nil, so the incoming call event is not stored. WhengetInitialEventsis called early during app startup, it therefore returns an empty list.Reproduce Log: