Building for macOS Application

Types of Build

In Monaca, Electron appliation has two types of build: debug version and release version. The differences between these types of build are as follows:

Types of Build Description
Debug Build DevTools are shown by default when the application is launched. It can be closed or opened manually.
Release Build There are no DevTools.
The built package is unsigned. You might need to manually sign the package after downloading.

Step 1: Configure App

  1. From the Monaca Cloud IDE menu, go to Configure → App Settings for macOS .
  2. Fill in the necessary information of your app:

    • Application information:

      Application Name The application name.
      App ID A unique name which will be used when uploading to the Store. It is recommended to use reverse-domain style (for example, io.monaca.app_name) for App ID. Only alphanumeric characters, periods (at least one period must be used) and underscore are allowed. Each segment should be separated by a period and started with an alphabetic character.
      Version Number The version number of your app. A version number consist of only number seperated by dots (for example, 1.0.0)
      Application Description The description of your application.
    • Application Icon

      You can set the application icon. PNG format is supported. Icon should be at least 512x512 pixels to work across all operating systems.

  3. After finishing the configurations, click Save.

Step 2: Start Building

  1. From the Monaca Cloud IDE menu, go to BuildBuild App for macOS.

  2. Select appropriate type of build you want and click Start Build button.

  3. It may take several minutes for the build to complete. Please wait. Once the build is completed, your built application is ready to be downloaded.

Step 3: Install The App

  1. Extract the downloaded zip file.

  2. Double click on application file. The system might display a warning dialog since the application is not signed.

  3. Allow to run unsigned application. First, open the System Preferences and go to Security & Privacy

Then click on Open Anyway to allow running the unsigned application that we just downloaded.


 
    

    

Step 4: Sign The App

  1. Get a Developer ID Certificate from Apple and install it into your Mac’s Keychain.

  2. Sign your application bundle by running following command:

        $ codesign --deep --force --verbose --sign "<identity>" "Application.app"
        
  3. Once it is done, you can verify whether the application is signed by running the following command:

        $ codesign --verify -vvvv "Application.app"
        

    See the screenshot below for more detail.

Tested Environment

  • macOS Mojave, Version 10.14.6
  • Xcode 10.3, Build Version 10G8