macosapp-storeapp-store-connectmac-app-storeappstore-sandbox

Code Signing an Automator Workflow file within macOS app bundle


I am attempting to upload a macOS binary to the Mac App Store via the Xcode Organizer.

I get an "Upload failed" error with the message:

App Store Connect Operation Error

ERROR ITMS-90276: Missing Bundle Identifier. The application bundle contains a tool or framework workflow [com.company.AppName.pkg/Payload/AppName.app/Contents/Resources/Resources/Scripts/workflow.workflow] that is missing the bundle identifier in its Info.plist file.

My app bundle contains AppleScript.scpt, ShellScript.sh, and workflow.workflow scripting files.

What kind of scripts need Info.plist and Bundle Identifiers for signing? How can I get past this error?


Solution

  • Apple requires that all bundled executables be code signed

    What to Code Sign

    You sign all the individual components of your app, leaving no gaps, including:

    Nested code. First, you recursively sign all of the helpers, tools, libraries, frameworks, and other components that your app relies on, and that are bundled with your app.

    https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#//apple_ref/doc/uid/TP40005929-CH4-SW2

    In this case, the workflow.workflow Automator Workflow bundle is failing code signature because it is missing a Bundle Identifier in its existing Info.plist.

    I added the lines:

    <key>CFBundleIdentifier</key>
    <string>com.company.AppName.SampleWorkflow</string>
    

    after adding the BundleID, the Xcode Organizer signs and uploads to the Mac App Store without issue.