-
-
Notifications
You must be signed in to change notification settings - Fork 522
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: react-native-screens not building on visionOS #2210
Conversation
Hey! What do you think about implementing visionOS CI to ensure new changes don't break existing platform support? |
Hey @okwasniewski! Yeah, I think we could add a new action for that 👍 |
Okay sounds good, I can see that you already have many examples did you consider migrating examples to https://github.com/microsoft/react-native-test-app ? We are in the middle of the migration of all of our Callstack libraries. It supports:
|
@okwasniewski hmm, could you send some repository of a library that has the example migrated to react-native-test-app? I've got some concerns about migrating to it, but before asking them I need to check if in my head these questions are valid 😄 |
@tboba There you go: callstack/repack#629 |
@tboba I think adding visionOS CI can be done in a separate PR, do you think we can merge this one? |
I'll get in a way here a bit. Can we get a link to documentation where it states that explicit imports are required? How is this enforced? I can see it only being done via compiler option & I'm not aware of such one (I obviously don't know vast majority of them, but quick googling did not help). To see the compiler error would also be useful. I'm asking these questions cause there is possibility that the issue lies somewhere else. |
@kkafar It's missing references for Technically you should always import the framework you are using but I guess for iOS it's linked anyway. Here is a screenshot:
There is nothing in the docs about the compiler being more strict when compiling for visionOS but that's the thing I've observed when working with this platform. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I took a look now into RNSConvert.h
and I'm surprised it works right now on iOS, as we do not import any UIKit related headers. I'm not aware of XCode injecting any symbols into translation units, but maybe it does 🤷🏻♂️
I need to lookup some documentation to figure out why this is the case 😄
I'll allow myself a liberty of reorganising the imports and I think we're good to go.
Thanks for this PR!
Edit: Will merge the PR after CI passes.
## Description This PR fixes React Native screens not building on visionOS. As this platform needs explicit imports for used modules ## Changes <!-- Please describe things you've changed here, make a **high level** overview, if change is simple you can omit this section. For example: - Updated `about.md` docs --> - Fixed building `RNSConvert.h` for visionOS <!-- ## Screenshots / GIFs Here you can add screenshots / GIFs documenting your change. You can add before / after section if you're changing some behavior. ### Before ### After --> ## Test code and steps to reproduce Compile on visionOS <!-- Please include code that can be used to test this change and short description how this example should work. This snippet should be as minimal as possible and ready to be pasted into editor (don't exclude exports or remove "not important" parts of reproduction example) --> ## Checklist - [ ] Included code example that can be used to test this change - [ ] Updated TS types - [ ] Updated documentation: <!-- For adding new props to native-stack --> - [ ] https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md - [ ] https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md - [ ] https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx - [ ] https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx - [ ] Ensured that CI passes --------- Co-authored-by: Kacper Kafara <[email protected]>
…2210) ## Description This PR fixes React Native screens not building on visionOS. As this platform needs explicit imports for used modules ## Changes <!-- Please describe things you've changed here, make a **high level** overview, if change is simple you can omit this section. For example: - Updated `about.md` docs --> - Fixed building `RNSConvert.h` for visionOS <!-- ## Screenshots / GIFs Here you can add screenshots / GIFs documenting your change. You can add before / after section if you're changing some behavior. ### Before ### After --> ## Test code and steps to reproduce Compile on visionOS <!-- Please include code that can be used to test this change and short description how this example should work. This snippet should be as minimal as possible and ready to be pasted into editor (don't exclude exports or remove "not important" parts of reproduction example) --> ## Checklist - [ ] Included code example that can be used to test this change - [ ] Updated TS types - [ ] Updated documentation: <!-- For adding new props to native-stack --> - [ ] https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md - [ ] https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md - [ ] https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx - [ ] https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx - [ ] Ensured that CI passes --------- Co-authored-by: Kacper Kafara <[email protected]>
Description
This PR fixes React Native screens not building on visionOS. As this platform needs explicit imports for used modules
Changes
RNSConvert.h
for visionOSTest code and steps to reproduce
Compile on visionOS
Checklist