Skip to content

BestSolution-at/mac-codesigner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mac-codesigner project

Commandline utility to not going insane when codesigning and notarizing application for Apple Devices.

Bildschirmfoto 2021-04-22 um 18 02 47

This utility allows to:

  • Codesign your applications
  • Package as DMG
  • Package as PKG
  • Notarize the DMG and PKG
  • Staple DMG and PKG artifact

Synopsis

To print all available commandline options

./mac-codesigner-1.0.0-SNAPSHOT-runner -h

Example:

./mac-codesigner-1.0.0-SNAPSHOT-runner  --app-path=/path/to/my/Sample.app \
 --developer-certificate-key=1111111111111111 \
 --with-dmg \
 --with-pkg \
 --installer-certificate-key=1111111111 \
 --pkg-identifier=my.application.identifier.pkg \
 --entitlements=/path/to/entitlements.plist \
 --with-notarization \
 --notarization-primary-bundle-id=my.application.id \
 [email protected] \
 --notarization-password="johndoe-secret"
 --with-staple

Prequisits

  • Make sure you have xcode command line utilities installed
    sudo xcode-select --install
  • Create an "App-Specific password for altool" Apple Instructions - Use Safari - Firefox nor Chrome worked for me
    • Name it Developer-altool
    • Save the password created we you need to pass it to as the --notarization-password
  • Create 2 certificates at Apple Developer
    • Developer ID Application
    • Developer ID Installer
  • Add them to your "KeyChain Access" Application

Acknowledgement

There are other utilities which helped me implement this or provided useful information. One could argue that I suffer from the NIH-Syndrom but I found it interesting to get something done with Quarkus and GraalVM to create a native binary so for me it was more of a research project teaching about this tech-stack.

Similar utilities:

Sites / Articles I found useful while implementing this:

Building

The application can be packaged using:

./mvnw package

It produces the quarkus-run.jar file in the target/quarkus-app/ directory. Be aware that it’s not an über-jar as the dependencies are copied into the target/quarkus-app/lib/ directory.

Creating a native executable

You can create a native executable using:

./mvnw package -Pnative

Or, if you don't have GraalVM installed, you can run the native executable build in a container using:

./mvnw package -Pnative -Dquarkus.native.container-build=true

You can then execute your native executable with: ./target/mac-codesigner-1.0.0-SNAPSHOT-runner

If you want to learn more about building native executables, please consult https://quarkus.io/guides/maven-tooling.html.

About

Commandline Utility to Sign and Notarize OS-X Application

Resources

License

Stars

Watchers

Forks

Packages

No packages published