-
Notifications
You must be signed in to change notification settings - Fork 656
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
ReactNativeConfig.h name collision w/ React Native 0.68 iOS #667
Comments
@HolySamosa have you found any solution? |
Having the same issue. Seems like either this library have to rename the class or RN have to rename the class 🤔 |
Unfortunately, I had to disable the "native" usage of this lib and hard-coded some values in the native part of app (for our iOS Widget) 😢 Not an expert on this topic but I think the problem comes from this mechanism:
Without being 100% sure, I guess the author here should probably "alias" the class. I guess the package is not named properly since the origin:
Or maybe move the library to Swift, which supports namespacing :) I wish I had skills to offer a fix! |
@pedro @luancurti any solution for this. I can't build my app due this on 0.69.1 |
the error still there |
There is no fix unless you fork this and rename. The author will need to rename the package/podspec because of the name clash with newer versions of react which introduced a "ReactNativeConfig" package in 0.68 and higher. |
Feel free to make a pull request @exs6350 with this solution |
Hi @luancurti , if we need to rename the package/podspec to fix the issue, do you have any preferences what the new package should be called? |
Sorry, I thought I had long ago replied with my work around. In my case, I've opted out of the "new architecture" for the time being, and I commented out all code in the RCT_NEW_ARCH_ENABLED code blocks. Also, regarding preferences for the new name, might I suggest |
My poor attempt at humor aside, Apple recommends using 3 letter prefixes for class names. So |
@pedro @luancurti please see PR changes. I added an example 0.68.5 project for Android and iOS which seem to work as expected. I don't have access to windows though so I haven't added an example project or been able to test on windows. |
This is so awesome. Thanks @philpettican118, for your great work! 🍺 |
React Native 0.68 iOS introduces
<react/config/ReactNativeConfig.h>
inAppDelegate.mm
as part of optional new-architecture support, conflicting with react-native-config'sReactNativeConfig.h
.It seems the docs should be updated to make it clear these are different classes and provide an example of how to work around the name collision.
Thanks!
The text was updated successfully, but these errors were encountered: