Skip to content

Race condition when setting delegate form react-native wrapper#1

Open
nazgu1 wants to merge 1 commit into
grovs-io:mainfrom
nazgu1:bug-setting-delegate
Open

Race condition when setting delegate form react-native wrapper#1
nazgu1 wants to merge 1 commit into
grovs-io:mainfrom
nazgu1:bug-setting-delegate

Conversation

@nazgu1
Copy link
Copy Markdown

@nazgu1 nazgu1 commented Oct 2, 2025

There is race condition, as react-native wrapper sets delegate directly using Grovs.delegate. Sometimes private static var manager: GrovsManager? is nil at the moment of setting delegate.

This PR fixes this issue by storing delegate in private variable and try to set it once manager is present. I consider it rather a hacky way of solving this issue, but it is sufficient at the moment. To proper resolve it there is probably need to refactor this logic (like having delegate queue, or don't use static variables and let RN wrapper handle own instance)

Reminder:
There is need to bump Grovs-iOS version and update it in RN wrapper .podspec file

dobreandl added a commit that referenced this pull request Nov 13, 2025
updated events handling and prepared 2.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant