简体   繁体   中英

Xcode throws build error on M1 MacBook Pro

We have an app which compiles properly on old Intel based MacBooks. However on M1 MacBook Pro, it's not compiling due to arm64 compilation issue with latest iPhone simulators. It works till 13.7 simulators.

Based on few solutions on other posts, I tried to add arm64 architecture in Excluded Architectures section also in Build Settings, but that throws a different error with Swift Package Manager, like Could not find module 'Viewer' for target 'arm64-apple-ios-simulator'; found: x86_64-apple-ios-simulator, x86_64, at: /Users/bappaditya/Library/Developer/Xcode/DerivedData/Aconex-dcwfxmeztacqqoewrptfilxusnyj/Build/Products/Debug-iphonesimulator/Viewer.framework/Modules/Viewer.swiftmodule Could not find module 'Viewer' for target 'arm64-apple-ios-simulator'; found: x86_64-apple-ios-simulator, x86_64, at: /Users/bappaditya/Library/Developer/Xcode/DerivedData/Aconex-dcwfxmeztacqqoewrptfilxusnyj/Build/Products/Debug-iphonesimulator/Viewer.framework/Modules/Viewer.swiftmodule

The solution with opening with Rosetta works but some of the features like selecting photos from camera are broken due to this changes, so we can't accommodate this also.

We are seeking for a solution to compile our app on M1 without breaking any existing feature support.

Xcode 构建设置

I resolved the build error opening XCode using Rosetta.

However, I have a problem running the app on simulator (white screen after splash). On device it's ok.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM