run cd ios
run pod install
cd ..
delete build folder
run react-native run-ios
/*Go to project settings in Xcode. Menu File->Project Settings
Go to per-User Project Settings section.
Click on advanced.
Select Xcode Default option. previously this used to be Legacy for my project.
I have analysed on similar lines and concluded that clean is causing the archive to fail. So, the new build system is not clearing the custom/legacy build directory.
delete the build/ folder in ios/ and rerun if that doesn't do any change then
File -> Project Settings (or WorkSpace Settings) -> Build System -> Legacy Build System
Rerun */
cd ios
pod install // install all pods for new project
xcodebuild clean // delete ios build
cd ..
npx react-native run-ios --simulator="iPhone 14 Plus"