简体   繁体   English

Xcode 在 M1 MacBook Pro 上引发构建错误

[英]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 上编译我们的应用程序,而不会破坏任何现有的功能支持。

Xcode 构建设置

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.

相关问题 复制/粘贴在 XCode 13 模拟器与 M1 Macbook Pro 中不起作用 - Copy/Paste not working in XCode 13 Simulators with M1 Macbook Pro 在 Macbook M1 上的 Xcode 12.4 中构建后,在 IOS 上的 React Native 中找不到 YogaKit.modulemap - YogaKit.modulemap not found in React Native on IOS after build in Xcode 12.4 on Macbook M1 macbook m1中没有发生这样的模块'firebase'错误 - no such module 'firebase' error occurring in macbook m1 cocoapods 错误在 flutter 项目 m1 macbook - cocoapods error in flutter project m1 macbook Xcode error.zprofile:1 和沙箱与 Podfile.lock MacBook m1 不同步 flutter - Xcode error .zprofile:1 and The sandbox is not in sync with the Podfile.lock MacBook m1 flutter 所有 storyboard,xib 文件不更新 Macbook Pro M1 上的框架或约束与 Rosetta(与 IBAgent-iOS 通信时遇到错误) - All storyboard, xib file don't update the frame or constraint on Macbook Pro M1 with rosetta (Encountered an error communicating with IBAgent-iOS) 无法发出预编译的 header Xcode 12 MacBook M1 - Failed to emit precompiled header Xcode 12 MacBook M1 无法在 MacBook M1 芯片上构建 Kotlin 多平台移动项目 - Unable to build Kotlin Multiplatform mobile project on MacBook M1 chip m1 芯片上的 Xcode 构建失败 - Xcode build fail on m1 chip 在 flutter 项目 M1 Macbook 中更新 cocoapods 时出错 - Error occurs during update cocoapods in flutter project M1 Macbook
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM