79349343

Date: 2025-01-12 04:28:34
Score: 0.5
Natty:
Report link

For me, I was building on the Apple M2 chip. After several hours of attempts, I found that I could successfully build on a real device, but the build failed on the simulator. When I commented out the following code, the build also succeeded on the simulator.

# https://stackoverflow.com/questions/72344149/how-to-solve-xcode-build-error-undefined-symbols-for-architecture-x86-64
# Comment this line due to a build failure on Apple M2 Pro with an error: "VisionCamera.modulemap not found."
# config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = "arm64"

close Xcode

rm -rf ~/Library/Developer/Xcode/DerivedData/* && rm -rf ~/Library/Caches/org.swift.swiftpm

start Xcode

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Michael Mao