Closed billyjacoby closed 8 months ago
Hey @billyjacoby,
Just cloned your repro and everything works as it should.
Can you try to clean the native build folder and pods:
cd visionos
rm -rf Pods build
then reinstall pods:
bundle install && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install
Open the project in Xcode and try to build it. Also make sure you've installed dependencies with yarn
Hmm still seeing the same thing, not sure if this screenshot of the errors in XCode is helpful:
Can you try CMD+K in Xcode (this cleans build folder) if that won't help try to Clear Xcode Derived data
Still nothing, getting the same errors.
One interesting thing I noticed is that when I ran yarn visionos
(successfully) i saw this line:
Multiple Podfiles were found: ios/Podfile,visionos/Podfile. Choosing ios/Podfile automatically. If you would like to select a different one, you can configure it via "project.ios.sourceDir". You can learn more about it here: https://github.com/react-native-community/cli/blob/main/docs/configuration.md
Which looks like it's using the iOS Podfile instead of the visionos Podfile, could this be related?
Can you share a screenshot of how your built app looks? I need to fix this warning in CLI as it's not really accurate and you should still use visionos Podfile. Also you can try if you can build your app through Xcode now
So this issue that I'm having is building the app through XCode, that's the only time I face this issue.
Here's the built app (without the dev server running)
Ah so it's using visionos Podfile, that's great.
Im not sure why you are facing those issues (probably they are only appearing in Xcode.app as building through CLI also uses Xcode build tools and it works). Xcode sometimes is weird so restarting your Mac or something may help here.
Sorry had to start work, but restarting my laptop didn't fix this issue.
Ah, okay I thought it's fixed. So even if you built the app through yarn visionos
and then open Xcode and try to build it still shows the same error? Can you also try initializing a new project?
Yeah, yarn visionos
then opening XCode shows the same error. Lemme try a new project in a few mins and get back to you. For some reason I get other issues running bundle install
when I try this from my work machine
Okay a brand new install seems to work fine, which is super strange because I only initialized the other project this morning right before I opened this 🤔
A guess: I think cocoapods 1.15 had issues with the cocoapods caches, and doesn't work with React Native at the moment?
Interestingly I'm using 1.15.0 on the machine I eventually got this working on but I can't get this to build on the machine using 1.14.3
Just to further comment here - updating to Cocopods version 1.15.2 seems to have fixed this so it seems that was the culprit.
Description
When trying to run the
visionos/app.xcworkspace
in xcode I receive the build error:No such module 'React_RCTSwiftExtensions'
Steps to reproduce
App.swift
fileReact Native Version
0.73.3
Affected Platforms
Build - MacOS
Output of
npx react-native info
Reproducer
https://github.com/billyjacoby/vision-template
Screenshots and Videos
No response