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

Setup SwiftUI as the entry point #45

Closed
okwasniewski opened this issue Dec 4, 2023 · 4 comments
Closed

Setup SwiftUI as the entry point #45

okwasniewski opened this issue Dec 4, 2023 · 4 comments
Assignees

Comments

@okwasniewski
Copy link
Member

okwasniewski commented Dec 4, 2023

Description

To allow for visionOS specific APIs we need to setup SwiftUI as the entry point to visionOS apps.

The idea is to have UIViewRepresentable holding react native root view which would allow us to use: ImmersiveSpaces, volumetric windows and ornaments

@derwaldgeist
Copy link

derwaldgeist commented Jan 11, 2024

I was just going to ask this. We're devloping a fully immersive AR app. In our case, the best combination would be to have the opportunity to use SwiftUI alongside React Native, so one can profit from both technologies.

(I used Cordova in the past, not React Native, and there were always cases where the only solution would have been to integrate some native UX or plugins. I know React Native is a different beast, and as our server is React-based anyways, I'm evaluating this approach right now. But I don't want to do compromises when it gets to UX, especially on the Vision Pro.)

Thanks for taking action on this integration. It's looking great. We're currently using Unity as our toolset, so I know that they're having a hard time to make visionOS support possible.

BTW: What would be your approach to integrate RealityKit Pro content? I'd love to see an example how this could be accomplished, and how you can switch between Shared Space and Full Immersive Space. Exciting times ahead :)

@okwasniewski
Copy link
Member Author

Hey @derwaldgeist,

Using ImmersiveSpaces and RealityKit content is our primary goal of making SwiftUI as the root in React native visionOS. Here is a demo of going into Immersive Space while displaying a USDZ Model (SwiftUI's RealityView). I'm hoping to get this change released soon and allow users to experiment with it. I'm planning to also write a blog post about this type of SwiftUI integration.

ttConverted.mp4

@derwaldgeist
Copy link

derwaldgeist commented Jan 11, 2024

Woah, that's amazing! Great work, guys. Love it.

I guess you're using volumes here, right? But it would be possible to place content arbitrarily in space?

@okwasniewski
Copy link
Member Author

@derwaldgeist Sorry I missed your response. Yes it will be possible to place content everywhere same as in native apps (as RealityKit capabilities are the only limit here).

SwiftUI entrypoint is now on main branch, so I'm closing this issue.

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