NotarizeProcess

master

Utility object to launch `xcrun altool` to get notarization information
phimage/NotarizeProcess

NotarizeProcess

License Language

Utility object to launch xcrun altool to notarize app and get notarization information.

Notarize app

let process = NotarizeProcess(username: username, password: password)
let upload = try process.notarize(app: appArchiveURL, bundleID: "your.app.bundle.id")

or for .app

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.

Get information about notarized app

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)

Get history

let history = try process.notarizationHistory() // page: i

and full information

for item in history.items {
    let info = try process.notarizationInfo(for: item)
    print("\(info)")
}

Get audit log from information

let info = try process.notarizationInfo(for: id)
let publisher = info.auditLogPublisher() // using Combine framework

_ = publisher.sink(receiveCompletion: { completion in
...
}) { auditLog in
...
}

Stapler

Staple

try process.staple(app: appURL)

Validate

try process.validate(app: appURL)

All in one

try process.run(action: [.notarize, .wait, .staple] /*.all*/, on: appURL)
try process.run(action: .all, on: appURL)
try process.run(on: appURL)

Dependencies

Dependencies graph

Description

  • Swift Tools 5.1.0
View More Packages from this Author

Dependencies

Last updated: Fri Mar 15 2024 22:35:43 GMT-0900 (Hawaii-Aleutian Daylight Time)