Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

override is missing for methodQueue using ReactModule #4

Closed
svipas opened this issue Feb 1, 2024 · 5 comments
Closed

override is missing for methodQueue using ReactModule #4

svipas opened this issue Feb 1, 2024 · 5 comments

Comments

@svipas
Copy link

svipas commented Feb 1, 2024

With @ReactModule(methodQueue: DispatchQueue.main) I get this error:

image

Seems like override is missing for methodQueue

@ikhvorost
Copy link
Owner

Hi! Looks like your class inherits the other one where methodQueue is already implemented. What class do you inherit your own or React's one? Please provide more info.

@svipas
Copy link
Author

svipas commented Feb 2, 2024

I'm using it with RCTEventEmitter if I'm not mistaken, I did not add it manually (the methodQueue). Problem is that override keyword is missing from what I can see in XCode errors then macro output expanded. I checked the source code and I see that you do override ? "override " : "", but not sure why it wasn't included, maybe somehow Bool was false of override? Also, why you don't want to use override always? At least as I checked you should always override it.

@ikhvorost
Copy link
Owner

ikhvorost commented Feb 2, 2024

If you make a module class that inherits from NSObject you have nothing to override but if it inherits from a class that is already implemented RCTBridgeModule (like RCTEventEmitter etc.) you have to and this is a question. I'm considering how to determine this case.

@ikhvorost
Copy link
Owner

The issue is fixed in 1.0.4, please try it out and thanks for bug reporting!

@svipas
Copy link
Author

svipas commented Feb 6, 2024

Thanks, I will try and I will let you know

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

No branches or pull requests

2 participants