title: Codesign without xcode - error code object is not signed at all
body: <p>I have a macOS .app developed in a non-xcode tool. I want to sign it, so users can download from my website.</p>
  
  <p>I have manually created my "info.plist" file which looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
  &lt;plist version="1.0"&gt;
  &lt;dict&gt;
      &lt;key&gt;CFBundleDevelopmentRegion&lt;/key&gt;
      &lt;string&gt;English&lt;/string&gt;
      &lt;key&gt;CFBundleExecutable&lt;/key&gt;
      &lt;string&gt;mydemo&lt;/string&gt;
      &lt;key&gt;CFBundleName&lt;/key&gt;
      &lt;string&gt;md&lt;/string&gt;
      &lt;key&gt;LSApplicationCategoryType&lt;/key&gt;
      &lt;string&gt;&lt;/string&gt;
      &lt;key&gt;CFBundleIdentifier&lt;/key&gt;
      &lt;string&gt;com.company.mydemo&lt;/string&gt;
      &lt;key&gt;CFBundleInfoDictionaryVersion&lt;/key&gt;
      &lt;string&gt;6.0&lt;/string&gt;
      &lt;key&gt;CFBundlePackageType&lt;/key&gt;
      &lt;string&gt;APPL&lt;/string&gt;
      &lt;key&gt;CFBundleSignature&lt;/key&gt;
      &lt;string&gt;md&lt;/string&gt;
      &lt;key&gt;CFBundleShortVersionString&lt;/key&gt;
      &lt;string&gt;1.0&lt;/string&gt;
      &lt;key&gt;CFBundleVersion&lt;/key&gt;
      &lt;string&gt;1&lt;/string&gt;
      &lt;key&gt;CFBundleIconFile&lt;/key&gt;
      &lt;string&gt;mydemo.icns&lt;/string&gt;
      &lt;key&gt;CSResourcesFileMapped&lt;/key&gt;
      &lt;true/&gt;
      &lt;key&gt;CFBundleDocumentTypes&lt;/key&gt;
      &lt;array&gt;
          &lt;dict&gt;
              &lt;key&gt;CFBundleTypeRole&lt;/key&gt;
              &lt;string&gt;Viewer&lt;/string&gt;
              &lt;key&gt;CFBundleTypeExtensions&lt;/key&gt;
              &lt;array&gt;
                  &lt;string&gt;*&lt;/string&gt;
              &lt;/array&gt;
              &lt;key&gt;CFBundleTypeOSTypes&lt;/key&gt;
              &lt;array&gt;
                  &lt;string&gt;fold&lt;/string&gt;
                  &lt;string&gt;disk&lt;/string&gt;
                  &lt;string&gt;****&lt;/string&gt;
              &lt;/array&gt;
          &lt;/dict&gt;
      &lt;/array&gt;
      &lt;key&gt;NSHighResolutionCapable&lt;/key&gt;
      &lt;true/&gt;
  &lt;/dict&gt;
  &lt;/plist&gt;
  </code></pre>
  
  <p>I have an Apple developer account and in
  <a href="https://developer/apple/account/mac/certificate" rel="nofollow noreferrer">https://developer/apple/account/mac/certificate</a> followed instructions for creating a Developer ID application certificate.</p>
  
  <p>I am now doing this</p>
  
  <pre><code>codesign -s "Certificate Developer ID Company Name" mydemo.app
  </code></pre>
  
  <p>but get error</p>
  
  <blockquote>
    <p>mydemo.app: code object is not signed at all In subcomponent:
    mydemo.app/Contents/info.plist</p>
  </blockquote>
  
  <p>My .app file does noy contain in additional lib - just executable <em>mydemo.app/Contents/MacOS/mydemo</em></p>
  
  <p>I would like to successfully sign mydemo.app. I distribute my app in mydemo.zip and my goal is that when people download. unzip and drag it into /Applications it will run more easily</p>