سؤال

I am running this lines of code to sign my app of Java application on Mac OS X -

#!/bin/sh
export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/usr/bin/codesign_allocate"
codesign -s "my name" my.app
codesign -v -v my.app  && echo my.app is Signed Successfully!

I have written these all lines into one sh (SignApp.sh) file and running this sh file on creating app successfully to sign in my build.xml file as -

<target name="SigningApp">
      <exec executable="/bin/sh">
          <arg value="SignApp.sh"/>
     </exec>
</target> 

The same lines to sign app work fine at my system always successfully.

My app is created at another server machine. But sometime it sign my app successfully with this lines of code, and sometime it do not, I get these message on verification of app using this command codesign -v -v my.app -

my.app: code object is not signed at all
In architecture: x86_64

One more thing is that running these below lines on command prompt manually sign the app -

  export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/usr/bin/codesign_allocate"
  codesign -s "my name" my.app
هل كانت مفيدة؟

المحلول

Try using the --deep option

codesign --deep -s "my name" my.app

That has just built without errors for me, just going to upload and redownload to see if it really has worked.

نصائح أخرى

If you have recently updated your Xcode version (let says in 5.0.1 for instance) you might have to change location of codesign_allocate environment variable to: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate

see blog.hoachuck.biz

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top