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

Fix ios compile error on RN 0.48+ #17

Closed
wants to merge 1 commit into from

Conversation

paullinator
Copy link

This PR fixes a compile error in iOS when using RN v0.48 or higher. Issue referenced here:

zoontek/react-native-permissions#137

@mvayngrib
Copy link
Owner

@paullinator afaik, RN >= 0.40 supports import <React/RCTBridgeModule.h>. This PR is still useful as it would allow react-native-randombytes to support RN < 0.40, but the <React/RCTBridge.h> import would also need to be adjusted, as well as the imports in RNRandomBytes.h

@paullinator
Copy link
Author

From what I can tell, RN 48+ does not support import <React/RCTBridgeModule.h>. That's the reason for this change. It needed to move to `import "RCTBridgeModule.h"'

I'm not aware of RCTBridge.h having to change. We are using this change in our repo for both RN 48+ and <48 just fine.

@mvayngrib
Copy link
Owner

hm, works for me on 0.48.4 without any modifications: https://github.com/mvayngrib/rn-randombytes-test

@abdurrahmanekr
Copy link

abdurrahmanekr commented Jan 26, 2018

@paullinator It does not work without deleting the following:

#import <React/RCTBridgeModule.h>
#import <React/RCTBridge.h>

react-native version: 0.52.1

@paullinator
Copy link
Author

We are only on RN 51. It seems to work fine there.

@mvayngrib
Copy link
Owner

closing, please reopen if it's still an issue. See recent changes in #28

@mvayngrib mvayngrib closed this Jul 30, 2018
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.

3 participants