After migrating my framework to Xcode 10 beta (10L176w) I started to get warnings like:
Mapping architecture arm64 to x86_64. Ensure that this target\
If you are facing problem in Flutter:
Delete the Podfile, Podfile.lock, Pods folder, Runner.xcworkspace, Flutter.framework.
Run flutter clean
.
flutter build ios
.I am also facing the same problem. For resolution, I have just changed the build system from Standard to Legacy and that resolved the issue.
Similar to other answers, I was able to remove the warning by changing $(VALID_ARCHS)
(Valid Architectures) to $(ARCHS_STANDARD)
. From there, I cleared all Derived Data and restarted Xcode 10.0. This made the warning go away completely. Deleting everything from Valid Architectures just made a different warning appear ("No valid architectures found").
The solution is simpler: in Valid Architectures just replace arm64 with x86_64.
Had similar issue and the following three warnings in my project:
My Valid Archtectures originally were
Replacing:
(as mentioned in the Warnings) was my solution. The result in the Valid Architecture setting was:
After the replacements my three warnings above disappeared.
More profound info about the Architectures can be found here: https://docs.elementscompiler.com/Platforms/Cocoa/CpuArchitectures/
I think the formulation of this warning in Xcode is a bit confusion.
I was seeing this warning when I tried to compile code for both iOS and Mac OS. I was able to get around it by first doing what Hassan Taleb suggested in his answer: clear out the architectures so that only valid iPhone architectures are in there. And then finally, to maintain being able to build for Mac OS, wave your mouse over the Valid Architectures so that a plus button appears. Click that and then you can add separate settings for different platforms as needed, including different CPU architectures. For macOS SDK, I can set my Valid Architectures to just x86_64 if I want.
You likely have the VALID_ARCHS ("Valid Architectures") build setting overridden, either for the target or for its project. This is a build setting that should get its value automatically based on which run destination you're building for. When you figure out where this override is coming from (the build setting will display in bold when overridden), select it and hit the delete key to restore it to the default value.