Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find module 'SwiftLinkPreview' for target 'x86_64-apple-ios-simulator'; found: arm64, arm64-apple-ios-simulator` #137

Closed
dastan1302 opened this issue Mar 17, 2021 · 7 comments

Comments

@dastan1302
Copy link

Getting this error when running on Intel and M1 both macs with xcode 12.4, on latest OS BigSur

@LeonardoCardoso LeonardoCardoso added good first issue This issue is good for beginners to start contributing. investigation-needed help wanted labels Apr 24, 2021
@LeonardoCardoso
Copy link
Owner

I'm closing this issue because I couldn't reproduce. Are you still having this problem?

@eliburke
Copy link

eliburke commented Oct 7, 2021

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.

@eliburke
Copy link

eliburke commented Oct 7, 2021

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)

@Samigos
Copy link

Samigos commented Mar 28, 2022

I just got my first M1 mac and I get the exact same error! What is the fix here?

@eliburke
Copy link

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.

@Samigos
Copy link

Samigos commented Mar 28, 2022

I tried pinning the pod to your branch (valid_archs), but cocoapods failed to find it! Indeed, there’s no branch with that name!

@eliburke
Copy link

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"

https://guides.cocoapods.org/making/private-cocoapods.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants