menu
menu copied to clipboard
[iOS] Fix "react_native_menu-Swift.h" cannot be found
Overview
I noticed that many users have been facing this build error on iOS since the last version was released. It is due to a change made in this PR.
I assume that this import is correct, but I'm not sure why @svbutko still encountered this issue. Could you please check if the build error is related to this? Thank you!
Test Plan
After changing it to #import <react_native_menu/react_native_menu-Swift.h>
, the error disappeared.
Hey, @alantoa, the issue to which you are referring was happening before my PR the issue happens in NEW ARCH, while my fix fixes it for OLD ARCH.
You can check the version to which people are referring is 1.0.2 and what they are using
And that it happened more than 2 days before my PR was merged and released
Are you sure that you are using OLD ARCH?
Hey, @alantoa, the issue to which you are referring was happening before my PR the issue happens in NEW ARCH, while my fix fixes it for OLD ARCH.
You can check the version to which people are referring is 1.0.2 and what they are using
And that it happened more than 2 days before my PR was merged and released
Are you sure that you are using OLD ARCH?
is it possible for expo to auto upgrade this package when doing npx expo upgrade --fix?
Yeah, that's kind of weird. Ideally, it should work for both versions, but only v1.0.2 works for me. Let me take another look then.
Yeah, that's kind of weird. Ideally, it should work for both versions, but only v1.0.2 works for me. Let me take another look then.
Wow, thanks, downgrade to v1.0.2 + Old Arch works now! Thanks! :)
"expo": "~51.0.8", "react-native": "0.74.1", "@react-native-menu/menu": "1.0.2",
Any updates on this?
This needs to be merged in as it's still a problem and it's causing build errors on iOS. Please merge this in asap @Naturalclar
@sohail-wayland, hey, this depends on @Naturalclar. I'm not quite sure which one is actually correct. but for now, you can simply install v1.0.2, as its code is the same as this PR.
+1 this is actively broken
Hey @Naturalclar - do you have the bandwidth to take a look at this?
Hey! Thanks for this PR, but unfortunately for me it was the other way around - this PR broke the build now, while the previous release worked fine.
I think we should revert this, the previous way is the correct way of doing things (at least on latest Xcode).
Or maybe add an additional #if __has_include
check to try both ways?
Created a fix for this here: https://github.com/react-native-menu/menu/pull/832 cc @Naturalclar
Thanks, Marc!
Yeah, adding the #if __has_include
condition should work for both cases.
I'm curious why that works though. Why is it sometimes in a directory, and sometimes not?
This error still comes up on the new arch. @alantoa
hey @dancixx what if you were to use this patch? https://github.com/react-native-menu/menu/pull/832