React Native iOS build fails on M1 chip, MacOS Sonoma 14.0 and Xcode 15.0

2.9k Views Asked by At

Build fails with the message:

Details:  createItemModels creation requirements should not create a capability item model for a capability item model that already exists.
Function: createItemModels(for:itemModelSource:)
Thread:   <_NSMainThread: 0x130609930>{number = 1, name = main}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
** BUILD FAILED **

The following build commands failed:
        CompileC /Users/myusername/Library/Developer/Xcode/DerivedData/rsmclient-cqisjblhpcnxszfpjsdthcauhgsz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-hermes.build/Objects-normal/arm64/MessageTypes.o /Users/myusername/Desktop/rsmclient/node_modules/react-native/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-hermes' from project 'Pods')
(1 failure)

Initialised the project with React native 0.72.6 and React 18.2.0 with the following command:

arch -arm64 npx react-native init rsmclient

Steps to reproduce:

1. arch -arm64 npx react-native init <PROJECT-NAME>
2. npm run start
3. npm run ios

Have already tried deintegrating and reinstalling the pods.

1

There are 1 best solutions below

0
On

In my case, there's something wrong with selecting simulator or device.

npx react-native run-ios --scheme=<MY_SCHEME>

...
# both MY_PHONE and iPhone 15 selected automatically
info Found booted <MY_PHONE>, iPhone 15
...

and then, same the error that you had occured.

Try to fix argument --simulator or --device, like this

yarn run-ios --simulator="iPhone 15"