Skip to content

Incorrect signing certificate used for macOS App Store submission #51

@digitalmoksha

Description

@digitalmoksha

When submitting a macOS app to the app store, it is required to be archived into .pkg and signed.

Xcode 11 now supports the Apple Developer and Apple Distribution certificates. While these work for signing the app, they will not work for signing the installer/archive that needs to get uploaded to the store:

productbuild: error: Cannot write product to "buildMAS/MacOSX-10.14-Release/myApp.pkg". (Could not find appropriate signing identity for “Apple Distribution: my LLC (xxxxxxxx)”. An installer signing identity (not an application signing identity) is required for signing flat-style products.)
rake aborted!

You need to use an installer certificate, usually 3rd Party Mac Developer Installer

Our current code,
https://github.com/amirrajan/rubymotion-templates/blob/206ccac06fd7a3328f64d066f72887d8130b17ea/motion/project/template/osx/builder.rb#L37-39,
expects a certificate name with the word Application in it, to replace with Installer. This no longer works when signing your code using an Apple Distribution certificate.

We may need an additional config variable, to allow us to configure which certificate to use.

        codesign = begin
          if config.distribution_mode
            if config.installer_certificate
              "--sign \"" + config.installer_certificate + "\""
            else
              "--sign \"" + config.codesign_certificate.sub(/Application/, "Installer") + "\""
            end
          end
        end || ""

what do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions