Closed okwasniewski closed 9 months ago
This PR adds multi-window support with data sharing from React Native to SwiftUI.
XR.requestSession
WindowManager
Example usage:
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> ); };
This design allows other platforms to adapt this pattern and extend the returned window object instead of adding more static methods on theWindowManager object
[VISIONOS] [ADDED] - Multi window support
CI Green / Test multi window apis
I’m really excited about this PR - if there’s anything I can contribute to help get this in please ping me!
Summary:
This PR adds multi-window support with data sharing from React Native to SwiftUI.
Changes
XR.requestSession
now accepts additional object which can be retrieved from the SwiftUI side.New
WindowManager
APIExample usage:
This design allows other platforms to adapt this pattern and extend the returned window object instead of adding more static methods on the
WindowManager
objectChangelog:
[VISIONOS] [ADDED] - Multi window support
Test Plan:
CI Green / Test multi window apis