问题:归档时在终端中出现以下错误
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
以下是**归档失败**之前的几行:(请参见下文)
/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/"
}
}
编辑:我能够在设备和模拟器上运行该项目。因此,该问题与代码语义无关