Closed dastan1302 closed 2 years ago
I'm closing this issue because I couldn't reproduce. Are you still having this problem?
I got this error too, with XCode 13. Runs on a device but I can't run an x86_64 simulator build (and I don't have an M1 Mac handy)
I've cleaned out my DerivedData and artifacts, and built using Carthage:
carthage update --platform iOS --no-use-binaries --cache-builds --use-xcframeworks
Problem occurs when I run: Could not find module 'SwiftLinkPreview' for target 'x86_64-apple-ios-simulator'; found: arm64, arm64-apple-ios-simulator, at: ~/Library/Developer/Xcode/DerivedData/APP_BUILD_DIRECTORY/Build/Products/Debug-iphonesimulator/SwiftLinkPreview.framework/Modules/SwiftLinkPreview.swiftmodule
I was able to resolve the problem by removing the "user-defined" VALID_ARCHS lines from the xcodeproj file. It was not sufficient to remove it in the GUI I had to manually remove from every configuration. I believe this is an old setting that was needed back in the day. #154 fixes.
This is peripherally mentioned in the XCode 12 release notes: https://developer.apple.com/documentation/xcode-release-notes/xcode-12-release-notes
The Build Settings editor no longer includes the Valid Architectures build setting (VALID_ARCHS), and its use is discouraged. Instead, there is a new Excluded Architectures build setting (EXCLUDED_ARCHS). If a project includes VALID_ARCHS, the setting is displayed in the User-Defined section of the Build Settings editor. (15145028)
I just got my first M1 mac and I get the exact same error! What is the fix here?
It's right there in my comment along with a merge request. You can pin to my branch or fork and fix it for yourself.
I tried pinning the pod to your branch (valid_archs), but cocoapods failed to find it! Indeed, there’s no branch with that name!
Ah sorry... I'm used to Carthage which lets you easily point to different repos. I can't help you any further than google but maybe check out "cocoapods private repo"
Getting this error when running on Intel and M1 both macs with xcode 12.4, on latest OS BigSur