[英]Xcode throws build error on M1 MacBook Pro
We have an app which compiles properly on old Intel based MacBooks.我们有一个可以在旧的基于 Intel 的 MacBook 上正确编译的应用程序。 However on M1 MacBook Pro, it's not compiling due to
arm64
compilation issue with latest iPhone simulators.但是在 M1 MacBook Pro 上,由于最新 iPhone 模拟器的
arm64
编译问题,它无法编译。 It works till 13.7 simulators.它可以工作到 13.7 模拟器。
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
基于其他帖子上的少数解决方案,我尝试在构建设置中的排除架构部分添加
arm64
架构,但这会引发与 Swift Package 管理器不同的错误,例如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.使用 Rosetta 打开的解决方案有效,但由于此更改,某些功能(例如从相机中选择照片)已损坏,因此我们也无法适应此问题。
We are seeking for a solution to compile our app on M1 without breaking any existing feature support.我们正在寻找一种解决方案来在 M1 上编译我们的应用程序,而不会破坏任何现有的功能支持。
I resolved the build error opening XCode using Rosetta.我解决了使用 Rosetta 打开 XCode 的构建错误。
However, I have a problem running the app on simulator (white screen after splash).但是,我在模拟器上运行应用程序时遇到问题(启动后出现白屏)。 On device it's ok.
在设备上没问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.