Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect signing certificate used for macOS App Store submission #51

Open
digitalmoksha opened this issue Sep 5, 2020 · 2 comments
Open

Comments

@digitalmoksha
Copy link
Contributor

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?

@amirrajan
Copy link
Collaborator

I think it's a good idea 👍

@ediathome
Copy link
Contributor

👍+1 for this change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants