Swiftpack.co - Mortennn/Notarize as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Mortennn.
Mortennn/Notarize 1.0.0
CLI to easily notarize a Mac app
⭐️ 56
🕓 1 year ago
.package(url: "https://github.com/Mortennn/Notarize.git", from: "1.0.0")

Notarize

Command line tool to easily notarize a Mac app

latest swift5 platform license



Apple recently added a new service where they will check and approve an app to not execute malcious code. It is a great security improvement, but the downside is that this adds a new step in the build system.

This project is created to make it easy to automate this process.

Installation

  1. Download the latest release
  2. Run the install script: $ ./install.sh

Usage

Example

$ notarize \
    --package "~/path/to/app.dmg" \
    --username "[email protected]" \
    --password "@keychain:AC_PASSWORD" \
    --primary-bundle-id "com.company.appname.dmg"

Description

$ notarize --help

    Copyright (c) 2019, Morten Nielsen.

    Version: Notarize 1.0.0 NotarizeKit 1.0.0

    Usage: --package <path> --username <username> --password <password> --primary-bundle-id <primary-bundle-id>

    Options:

    --package            Path to either DMG or zip file.
    --username           Email associated with Apple Connect.
    --password           Password for Apple Connect. Can be plain text, but it is recommended to use "@keychain:<name>".
    --primary-bundle-id  Bundle id of package. e.g. "com.company.appName.dmg".
    --asc-provider       Specify asc provider.

    --help               Display options.

What does it actually do?

  1. Uses $ xcrun altool to upload the app package to Apple's servers.
  2. Waits for the app to be notarized. Checks every 30 seconds.
  3. Staples the app package with the generated certificate using $ xcrun stapler staple <path>

FAQ

  • Notarize says the package is invalid?
    • Notarize will print a UUID, which you can use to see the error log from Apple. The error log can be seen using $ xcrun altool --notarization-info

License

MIT © Morten Nielsen

GitHub

link
Stars: 56
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Dependencies

Release Notes

Version 1.0.0
5 years ago

Initial release.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics