callstack / react-native-visionos

A framework for building native visionOS applications using React
https://callstack.github.io/react-native-visionos-docs/
MIT License
1.02k stars 30 forks source link

fix: deep and universal links #140

Closed okwasniewski closed 7 months ago

okwasniewski commented 7 months ago

Summary:

This PR allows to use deeplinks/universal links in React Native visionOS apps.

In order to use this feature, users need to add this modifier to their App.swift file:

@main
struct RNTesterApp: App {
  @UIApplicationDelegateAdaptor var delegate: AppDelegate

  var body: some Scene {
    RCTMainWindow(moduleName: "RNTesterApp")
      .onOpenURL(perform: { url in
        RCTLinkingManager.onOpenURL(url: url)
      })
  }
}

A more in-depth documentation page will be created.

Thanks to @thiagobrez for investigating this one and helping me with the implementation and testing 🙏

Changelog:

[VISIONOS] [ADDED] - Support for deep links / universal links

Test Plan:

Check if deeplink is opening the app