Skip to content

Releases: callstack/react-native-visionos

Release 0.73.6

26 Feb 16:05
Compare
Choose a tag to compare

What's Changed

Highlights

Multi window support

You can now use WindowManager API to create multiple windows.

multi-window

Example:

const secondWindow = WindowManager.getWindow('SecondWindow');

const Example = () => {
  return (
    <View style={styles.container}>
      <Button
        title="Open Second Window"
        onPress={() => {
            secondWindow.open({title: 'React Native Window'});
        }}
      />
      <Button
        title="Update Second Window"
        onPress={() => {
          secondWindow.update({title: 'Updated Window'});
        }}
      />
      <Button
        title="Close Second Window"
        onPress={() => {
          secondWindow.close();
        }}
      />
    </View>
  );
};

Note: This API was established with NativeScript Team. Shoutout to: Nathan Walker and Jamie Birch.

XR

You can now pass additional props to ImmersiveSpaces:

XR.requestSession(id, {data}

cursor: pointer

visionos_hoverEffect get's replaced by cursor: pointer for hover effects

New Contributors

Full Changelog: v0.73.5-visionos...v0.73.6-visionos

Release 0.73.5

16 Feb 11:46
Compare
Choose a tag to compare

Release 0.73.4-1

12 Feb 14:04
Compare
Choose a tag to compare

What's new?

Release 0.73.4

07 Feb 13:42
1055b58
Compare
Choose a tag to compare

Release 0.73.4

Hey! This release follows the React Native upstream bump (0.73.4). Additionally, we are releasing XR API and many bug fixes.

Thanks to everyone trying out the releases and contributing! 🙏

Happy Hacking!

XR API

API to allows you to manage immersive experiences.

Methods

requestSession

requestSession: (sessionId?: string) => Promise<void>

Opens a new ImmersiveSpace given it's unique Id.

endSession

endSession: () => Promise<void>

Closes currently open ImmersiveSpace.

For a full guide, checkout project README.

Bug fixes

  • fix: DevMenu Configure Bundler, Show Perf monitor not working
  • fix: hoverStyle crashes the app
  • fix: properly pass custom resolver options
  • fix: set correct react-native path for template when bundling for release

Full Changelog: v0.73.3-visionos...v0.73.4-visionos

Release 0.73.3

01 Feb 14:21
d2eb21b
Compare
Choose a tag to compare

React Native visionOS 0.73

We are excited to announce our first react-native-visionos release based on a stable version of React Native!

Caution

react-native-visionos is not production ready. If you encounter any issues let us know!

Get started

Make sure to follow the prerequisites described in the README and run this command to create a new project:

npx @callstack/react-native-visionos init VisionApp

Features

visionOS CLI commands:

npx react-native run-visionos
npx react-native log-visionos
npx react-native build-visionos

SwiftUI as the entry point

The app entry point is now App.swift file (by default it is main.m). This change allows us to use full capabilities of the visionOS SDK. It allows you to also easily extend the framework using Swift and RealityKit to render 3D content.

// App.swift
@main
struct HelloWorldApp: App {
  @UIApplicationDelegateAdaptor var delegate: AppDelegate
  
  var body: some Scene {
    RCTMainWindow(moduleName: "HelloWorld")
  }
}

Hover Effect API

<TouchableOpacity visionos_hoverEffect="lift">
  <Text>Click me</Text>
</TouchableOpacity>
CleanShot.2024-02-01.at.15.06.50.mp4

...And a lot of bug fixes 🐛

To learn more, check out the documentation here.

Screenshot

CleanShot 2024-02-01 at 15 00 01@2x

Release 0.74.0-nightly-20240123

26 Jan 12:44
4e11ae3
Compare
Choose a tag to compare

What's new?

SwiftUI as Entry point

React native visionOS now uses SwiftUI lifecycle. The app entry point is now App.swift file (by default it is main.m). This change allows us to use full capabilities of the visionOS SDK.

Here is a example from the template:

// App.swift
@main
struct HelloWorldApp: App {
  @UIApplicationDelegateAdaptor var delegate: AppDelegate
  
  var body: some Scene {
    RCTMainWindow(moduleName: "HelloWorld")
  }
}

What's Changed

Full Changelog: https://github.com/callstack/react-native-visionos/commits/v0.74.0-nightly-20240123