Create a Mac OS Trust1Connector API package

This page will describe the steps to create a Mac OS API package.

Prerequisites

For creating a package we need the following components:

Internet access towards Google cloud storage environment is a requirement, see the introduction for more information

Step 1: Preparation

for the first step make sure all assets are updated for your version, environment and naming (application naming, installation folder, logos, ...). For this you can look at Mac OS introduction

application.conf is a file that needs to be provided by Trust1Team. We will need the following information to create a valid application.conf;

  • Distribution service URL

  • Distribution service Public key

  • Domain of the Trust1Connector (t1c.t1t.io) -- this needs to map to localhost

  • SSL certificate of the Trust1Connector domain -- Trust1Team will put this in a keystore

t1c.conf needs to be updated with a valid API key for the specified version and environment.

Step 2: Apple Developer Application Bundle ID & Certificates

You should create 3 new application identifiers. The names may be chosen freely but the identifiers must follow the package naming convention, being the reverse organisation domain name + application name in lowercase, e.g. com.t1t as reverse organization domain and t1c as application name. The component identifier values following this may not be altered:

  1. *.api: The Trust1Connector API application identifier.

  2. *.api.dialog: The Trust1Connector OS dialog application identifier.

  3. *.grpc: The Trust1Connector Sandbox application identifier.

The package also needs to be updated in all the following scripts;

  • post_install.sh

  • pre_install.sh

  • uninstall.sh

  • installer.pkgproj -> update com.t1t.t1c. entries to desired package

  • api_Info.plist

  • grpc_Info.plist

  • *.api.plist -> rename to {package}.api.plist

  • *.grpc.plist -> rename to {package}.grpc.plist

And in the package.sh you need to update the PACKAGE_NAME

The certificates for Developer ID Application and Developer ID Installer should be imported in your login keychain

The certificate private key access control should also be set to allow access to all applications prior to creating the package.

Step 3: Packaging Script

the file 1_FULL_PACKAGE.sh in the folder /_mac is everything you need to create your package. It will fetch all needed resources from the cloud and copy all resources needed from the local repository to create an dmg installer.

Signing

Do not forget to update the sign command to your desired method.

For MacOS this is more envolved, you need to update the developer settings found below. Make sure if you update the package name all the scripts are updated. Make sure the steps above are also executed.

Step 4: Execute the script

Be sure to update the package.sh script with the proper credentials

DEV_ACCOUNT=""
DEV_PASSWORD=""
DEV_TEAM=""

The credentials above should be filled accordingly.

Execute the bash script with the appropriate arguments for your package.

Creating the package

Arguments

The arguments are in a fixed order and must all be provided:

Example

./1_FULL_PACKAGE.sh trust1team dev {{password}}

This process may take a while to complete, especially the notarisation and stapling process at the end.

Last updated