react-native-community / cli

The React Native Community CLI - command line tools to help you build RN apps
MIT License
2.4k stars 905 forks source link

Change default location of iOS folder (RN 0.75.0) #2509

Open ShrikantRao opened 2 months ago

ShrikantRao commented 2 months ago

Ask your Question

I'm encountering build errors in my React Native iOS project (npx @react-native-community/cli@latest init MyApp) where I have moved the "IOS" folder from root to "clients/c1/ios". Here's my react-native.config.js

Screenshot 2024-09-18 at 12 58 56 AM

Getting error on 'pod install' Screenshot 2024-09-18 at 12 43 39 AM

Can you please help me out what I'm missing.

szymonrybczak commented 2 months ago

Hey, I could replicate this issue and it's related to Codegen, I'll try to debug and check how we can resolve this issue. For now it only works when .. from iOS project is root React Native project and this is not good assumption because it fails in case like yours.

szymonrybczak commented 1 month ago

cc @cipolleschi is there any chance we could leverage root property from config's command output in Codegen to avoid situations like this one? Especially now that the structure for the Config should be the same across implementations.

cipolleschi commented 1 month ago

probably yes, but right now we don't have capacity nor time to work on that. Moreover, this will introduce yet another dependency on the config command from the CLI, something we are trying to minimize for the React Native framework effort. I don't have a clear solution in mind, right now. I'll have to spend time thinking about that.