问题:存档时在终端中出现以下错误
The following build commands failed:
CompileSwift normal arm64
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
重现步骤:
xcodebuild -workspace playmule.xcworkspace -scheme playmule -sdk iphoneos -archivePath ~/Desktop/playmule.xcarchive -configuration playmule archive
以下是 ** ARCHIVE FAILED ** 之前的一堆行:(见下文)
/Users/ss/Desktop/playmule-ios/playmule/Utility/NetworkManager.swift:174:25:错误:类型“Constants.Api”没有成员“BaseUrl”;你是说'resetUrl'吗?让 urlString = Constants.Api.BaseUrl + Constants.Api.currentVersion + Constants.Api.resendSMSEndpoint ^~~~~~~~~~~~~ ~~~~~~~ resetUrl
对于同一个静态变量,同样的错误会重复出现。该变量被确认存在于结构中,如下所示:
struct Constants {
struct Api {
static let BaseUrl = "https://some-valid-url.com/dev/"
}
}
编辑:我能够在设备和模拟器上运行这个项目。所以这个问题与代码语义无关