https://github.com/phimage/notarizeprocess
Utility object to launch `xcrun altool` to get notarization information
https://github.com/phimage/notarizeprocess
Last synced: 11 months ago
JSON representation
Utility object to launch `xcrun altool` to get notarization information
- Host: GitHub
- URL: https://github.com/phimage/notarizeprocess
- Owner: phimage
- License: mit
- Created: 2019-10-21T04:35:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-05T05:06:17.000Z (over 6 years ago)
- Last Synced: 2025-03-01T22:15:59.255Z (12 months ago)
- Language: Swift
- Homepage:
- Size: 28.3 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# NotarizeProcess
[](http://mit-license.org)
[](https://developer.apple.com/swift)
Utility object to launch `xcrun altool` to notarize app and get notarization information.
## Notarize app
```swift
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.
```swift
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
```swift
let info = try process.notarizationInfo(for: upload) // or upload.requestUUID
```
You can also wait for the final result
```swift
let info = try process.waitForNotarizationInfo(for: upload, timeout: 30 * 60)
```
## Get history
```swift
let history = try process.notarizationHistory() // page: i
```
### and full information
```swift
for item in history.items {
let info = try process.notarizationInfo(for: item)
print("\(info)")
}
```
## Get audit log from information
```swift
let info = try process.notarizationInfo(for: id)
let publisher = info.auditLogPublisher() // using Combine framework
_ = publisher.sink(receiveCompletion: { completion in
...
}) { auditLog in
...
}
```
## Stapler
### Staple
```swift
try process.staple(app: appURL)
```
### Validate
```swift
try process.validate(app: appURL)
```
## All in one
```swift
try process.run(action: [.notarize, .wait, .staple] /*.all*/, on: appURL)
try process.run(action: .all, on: appURL)
try process.run(on: appURL)
```
## Dependencies

* [NotarizationInfo](https://github.com/phimage/NotarizationInfo)
* [NotarizationAuditLog](https://github.com/phimage/NotarizationAuditLog)