From 3764e3d4389bdabaf30857889fb07a70dc0d84ce Mon Sep 17 00:00:00 2001 From: Watson Date: Sun, 9 Jun 2013 17:10:28 +0900 Subject: [PATCH] [OSX] fix a bug where it is not possible to submit app to Mac App Store We have to do the code sign twice to submit app 1. code sign to app with "3rd Party Mac Developer Application: XXX" 2. code sign to pkg with "3rd Party Mac Developer Installer: XXX" --- lib/motion/project/template/osx/builder.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/motion/project/template/osx/builder.rb b/lib/motion/project/template/osx/builder.rb index 7b6a4e68..1db1bcf0 100644 --- a/lib/motion/project/template/osx/builder.rb +++ b/lib/motion/project/template/osx/builder.rb @@ -31,7 +31,12 @@ module Motion; module Project archive = config.archive if !File.exist?(archive) or File.mtime(app_bundle) > File.mtime(archive) App.info 'Create', archive - sh "/usr/bin/productbuild --quiet --component \"#{app_bundle}\" /Applications \"#{archive}\"" + codesign = begin + if config.distribution_mode + "--sign \"" + config.codesign_certificate.sub(/Application/, "Installer") + "\"" + end + end || "" + sh "/usr/bin/productbuild --quiet --component \"#{app_bundle}\" /Applications \"#{archive}\" #{codesign}" end end