Help wanted - Compile App for Intel and ARM for Mac with Xcode 14.2 and framework not Apple
CPiersigilli opened this issue · 1 comments
I have a MacBook Air M1 which I use to develop Mac apps for personal use. However, when adding a framework (i.e ZipFoundation) I can't compile them for Intel, but only for ARM. To better explain the issue I'm facing, I attach a first screenshot showing the configuration that should allow me to compile apps for both Intel and ARM, plus a second one with the error I get.
Why do I get the error "Could not find module 'ZIPFoundation' for target 'x86_64-apple-macos'; found: arm64-apple-macos"?
How to set Xcode 14.2 to compile app with non-Apple framework for Intel and Arm?
By removing all non-Apple frameworks (i.e. ZipFoundation) I can compile for Intel and Arm just fine, with the settings shown above.
How are you integrating ZIP Foundation? SPM, Carthage, CocoaPods?
With Xcode 14.2, SPM is the easiest way to manage the dependency. When you add the library via "Add Package", it should resolve the dependency and ask for a target to link against. Tweaking the project settings shouldn't be necessary.