Solved: iOS app failed to run on Xcode 14.3 in M2 computer
When I move my computer to M2, one of the project can not compile, some module didn’t in the dependency graph, and finally, a friend told…
When I move my computer to M2, one of the project can not compile, some module didn’t in the dependency graph, and finally, a friend told me that I need run the application in Rosetta simulator, after I changed the simulator to rosetta, the project can compile correctly.
Enable Rosetta Simulator in Xcode 14.3
Navigate to Product/Destination/Destination Architectures
in Xcode, then select Show Both or Show Rosetta Destinations, then we can select Rosetta Simulators.
After set the simulator to rosetta, the project can build correctly, but when I run the application, it report another error.
Delete the Build Data and Index from Xcode
To solve this issue, I find a lot of solutions, and finally it can run on Rosetta Simulator.
Because the default iOS system is 16.4, and in my computer, it has a 14.4 OS, then I create a Simulator, and it can run on the Simulator, so I think it’s the problem of the Xcode, the application can not run on Simulator with OS version 16.4, and I find another solution from iOS 16 Simulator: Running an app in the simulator results in a “.xpc error”, after I clean the build cache from Xcode, the application can run on 16.4 Simulator also.