-
Notifications
You must be signed in to change notification settings - Fork 60
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
Build swift package attempts to build only for MacOs error :no such module 'UIKit' #1361
Comments
Hi, this issue doesn't seem to be related to the VS Code Extension for Swift, but instead looks like a build configuration error. The |
Hi @MikePendo thanks for reporting this. Just to add to what Paul mentioned, I think what's happening here is that by default the toolchain is set to macOS. In the latest version of the extension (version 2.0.0 onwards, which should be released shortly), you will able to do a #1335 will also have to be fixed, but until then you'll have to set the Swift.SDK setting to |
Hi |
Describe the bug
I have fetched an iOS package. attempt to run
swift build
and had the following error:
error :no such module 'UIKit'
As far as I can see it builds only for Mac so the error makes sense
so I tried some works arounds like:
swift build --arch arm64 -Xswiftc -sdk -Xswiftc /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.1.sdk -Xswiftc -target -Xswiftc arm64-apple-ios18.0
but that has some other errors
To Reproduce
Steps to reproduce the behavior:
swift build
Expected behavior
Run swift build successfully to use jump to code in VS code
Environment
Thanks
The text was updated successfully, but these errors were encountered: