Releases: callstack/react-native-visionos
Release 0.73.6
What's Changed
- docs: move to documentation website by @okwasniewski in #119
- Update README.md by @okwasniewski in #121
- chore: update getting started link in Readme. by @christina-de-martinez in #123
- chore: remove hover effect & add cursor: pointer by @Saadnajmi in #122
- feat: add multi-window support by @okwasniewski in #117
Highlights
Multi window support
You can now use WindowManager
API to create multiple windows.
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
- @christina-de-martinez made their first contribution in #123
Full Changelog: v0.73.5-visionos...v0.73.6-visionos
Release 0.73.5
What's new?
Release 0.73.4-1
What's new?
- fix(#106) FBReactNativeSpec_visionOS.h not found by @okwasniewski
Release 0.73.4
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
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
Release 0.74.0-nightly-20240123
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
- fix: use isVision instead of isVisionOS by @okwasniewski in #76
- fix: release build bundle by @okwasniewski in #74
- feat: update docs by @okwasniewski in #80
Full Changelog: https://github.com/callstack/react-native-visionos/commits/v0.74.0-nightly-20240123