Fixed bug preventing delayed events from working #85
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using
[RNVoipPushNotificationManager voipRegistration];
inAppDelegate.m
theRNVoipPushNotificationManager.m
constructor (or init function or whatever Objective-C calls this), is executed twice, once I suppose by us interacting with RNVoipPushNotificationManager prior to the RN Bridge having instantiated it, and then again later when the bridge is going to use it and start observing.The initialization process is a bit of a mystery to me, but in any regard, the
_delayedEvents
array is overridden by the 2nd initialization, causing us to loose all the delayed events, effectively causingdidLoadWithEvents
to never fire, and the events being lost in the void that exists between IOS and React Native :(This fixes that, but as I'm not really an objective-c developer, I don't know if I'm just hacking this together, instead of addressing some underlaying issue.