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

'FBReactNativeSpec_visionOS/FBReactNativeSpec_visionOS.h' file not found #106

Closed billyjacoby closed 9 months ago

billyjacoby commented 9 months ago

Description

When trying to compile and run the example XR app, the process fails with the error 'FBReactNativeSpec_visionOS/FBReactNativeSpec_visionOS.h' file not found

Steps to reproduce

  1. Init a new project as described in the readme
  2. Run the build in XCode

React Native Version

0.73.4

Affected Platforms

Other (please specify)

Output of npx react-native info

System:
  OS: macOS 14.2.1
  CPU: (12) arm64 Apple M2 Max
  Memory: 1.01 GB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.5.0
    path: ~/.nvm/versions/node/v20.5.0/bin/node
  Yarn:
    version: 4.1.0
    path: ~/.nvm/versions/node/v20.5.0/bin/yarn
  npm:
    version: 9.8.0
    path: ~/.nvm/versions/node/v20.5.0/bin/npm
  Watchman:
    version: 2024.01.15.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11330709
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.4
    wanted: 0.73.4
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

`/Users/billyjacoby/Programming-Local/rnVisionLATEST/node_modules/@callstack/react-native-visionos/Libraries/XR/RCTXRModule.mm:3:9 'FBReactNativeSpec_visionOS/FBReactNativeSpec_visionOS.h' file not found
`

Reproducer

https://github.com/billyjacoby/callstack-visionos-repro

Screenshots and Videos

No response

degeloper34 commented 9 months ago

Same issue +1

okwasniewski commented 9 months ago

Hey,

Can you try running git clean -xdf visionos to remove build folders and cache from visionOS folder.

And then rerun pod install. You might also need to remove and install node_modules

Let me know if this fixes the issue

giovanijfc commented 9 months ago

Same issue in @callstack/react-native-visionos@0.73.4, in version @callstack/react-native-visionos@0.73.3 works normally

billyjacoby commented 9 months ago

Hey,

Can you try running git clean -xdf visionos to remove build folders and cache from visionOS folder.

And then rerun pod install. You might also need to remove and install node_modules

Let me know if this fixes the issue

This doesn't fix it. I ran git clean -xdf visionos and yarn cache clean and deleted node_modules before trying again too.

okwasniewski commented 9 months ago

Can you try if it's reproducible in a freshly initialised project?

billyjacoby commented 9 months ago

Can you try if it's reproducible in a freshly initialised project?

Yeah I actually tried in a brand new project on 2 different machines before posting the issue.

RobPruzan commented 9 months ago

I'm also reproducing on a new project, can't downgrade and re-init either since I can't find what's being persisted

MP185496 commented 9 months ago

Same for me

JeffreyCastellano commented 9 months ago

Hey folks, was just a code generation issue. Had the same problem... 'FBReactNativeSpec_visionOS/FBReactNativeSpec_visionOS.h' should be 'FBReactNativeSpec/FBReactNativeSpec.h'. The updated header already has the appropriate code updates. Doing that cleared the error for me and I can launch XR immersions.
Screenshot 2024-02-08 at 3 33 46 PM

billyjacoby commented 9 months ago

Hey folks, was just a code generation issue. Had the same problem... 'FBReactNativeSpec_visionOS/FBReactNativeSpec_visionOS.h' should be 'FBReactNativeSpec/FBReactNativeSpec.h'. The updated header already has the appropriate code updates. Doing that cleared the error for me and I can launch XR immersions. Screenshot 2024-02-08 at 3 33 46 PM

Confirmed, this worked for me too!

@JeffreyCastellano Did you have to create that Alert from SwiftUI? I'm trying to figure out if the current XR implementation only allows for immersive content from Swift. And if so you would mind sharing the code you've got here from the App.swift file?

I'm super new to Swift and trying to dip my toes in for VisionOS dev specifically

JeffreyCastellano commented 9 months ago

Alert is coming from React Native...its worth noting they may change the way that file is coming in to better support react native since the other devices won't have that XR profile but at least temporarily this solved it for me.

okwasniewski commented 9 months ago

Hey!

I've released new version 0.73.4-1 with the fix. Let me know if this solves the issue

billyjacoby commented 9 months ago

Confirmed that this fixes it!