Closed turbolent closed 5 months ago
This is very FAQ, so let me explain here for record.
There are several error caused by newer Xcode and older SwiftWasm toolchain combination.
Dispatch module references too new declarations while building for host target.
/Applications/Xcode-15beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/lib/swift/Dispatch.swiftmodule/arm64e-apple-macos.swiftinterface:702:121: error: no type named '__DispatchData' in module 'Dispatch'
This usually happens while building Package.swift
containing import Foundation
by swift build
.
Unable to discover
swiftccommand line tool info
while building in Xcode
But actually building with SwiftWasm toolchain in Xcode is not supported at this time, so it won't work even though using the same Swift versions with Xcode and SwiftWasm toolchain.
So at this time, SwiftWasm toolchain is only usable with Xcodes corresponding the same Swift version. We are transiting to Swift SDK instead of xctoolchain and it will solve the root issue.
A new version of SwiftWasm toolchain has been released https://github.com/swiftwasm/swift/releases/tag/swift-wasm-5.9.1-RELEASE
The new toolchain works with Xcode 15.x
After installing the 5.8 toolchain in Xcode 15, I get the following error: