Tom
Tom

Reputation: 3637

Codesign without xcode - error code object is not signed at all

I have a macOS .app developed in a non-xcode tool. I want to sign it, so users can download from my website.

I have manually created my "info.plist" file which looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleExecutable</key>
    <string>mydemo</string>
    <key>CFBundleName</key>
    <string>md</string>
    <key>LSApplicationCategoryType</key>
    <string></string>
    <key>CFBundleIdentifier</key>
    <string>com.company.mydemo</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleSignature</key>
    <string>md</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0</string>
    <key>CFBundleVersion</key>
    <string>1</string>
    <key>CFBundleIconFile</key>
    <string>mydemo.icns</string>
    <key>CSResourcesFileMapped</key>
    <true/>
    <key>CFBundleDocumentTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Viewer</string>
            <key>CFBundleTypeExtensions</key>
            <array>
                <string>*</string>
            </array>
            <key>CFBundleTypeOSTypes</key>
            <array>
                <string>fold</string>
                <string>disk</string>
                <string>****</string>
            </array>
        </dict>
    </array>
    <key>NSHighResolutionCapable</key>
    <true/>
</dict>
</plist>

I have an Apple developer account and in https://developer/apple/account/mac/certificate followed instructions for creating a Developer ID application certificate.

I am now doing this

codesign -s "Certificate Developer ID Company Name" mydemo.app

but get error

mydemo.app: code object is not signed at all In subcomponent: mydemo.app/Contents/info.plist

My .app file does noy contain in additional lib - just executable mydemo.app/Contents/MacOS/mydemo

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

Upvotes: 2

Views: 4192

Answers (1)

l&#39;L&#39;l
l&#39;L&#39;l

Reputation: 47274

The info.plist filename should be capitalized:

Info.plist 

It should codesign without issue after correcting it.

Upvotes: 4

Related Questions