Utility object to launch xcrun altool
to notarize app and get notarization information.
let process = NotarizeProcess(username: username, password: password)
let upload = try process.notarize(app: appArchiveURL, bundleID: "your.app.bundle.id")
An archive will be created using ditto.
let upload = try process.notarize(app: appURL, bundleID: "")
If the bundleID
argument is empty, we extract it from the .app Info.plist.
let info = try process.notarizationInfo(for: upload) // or upload.requestUUID
You can also wait for the final result
let info = try process.waitForNotarizationInfo(for: upload, timeout: 30 * 60)
let history = try process.notarizationHistory() // page: i
for item in history.items {
let info = try process.notarizationInfo(for: item)
print("\(info)")
}
let info = try process.notarizationInfo(for: id)
let publisher = info.auditLogPublisher() // using Combine framework
_ = publisher.sink(receiveCompletion: { completion in
...
}) { auditLog in
...
}
try process.staple(app: appURL)
try process.validate(app: appURL)
try process.run(action: [.notarize, .wait, .staple] /*.all*/, on: appURL)
try process.run(action: .all, on: appURL)
try process.run(on: appURL)