使用带有 --output-format xml
参数的 xcrun altool
从上传、信息和历史记录请求中解码公证信息。
let response = try NotarizationResponse(from: data) // or string
xcrun altool --notarize-app ...
if let uuid = response.notarizationUpload?.requestUUID {
...
}
xcrun altool --notarization-info <id> ...
if let status = response.notarizationInfo?.status {
}
xcrun altool --notarization-history ...
for item in response.notarizationHistory?.items ?? [] {
...
}