SD Notary 1.1 Released

We are pleased to announce the release of SD Notary 1.1. SD Notary is a tool for notarizing AppleScript and Automator apps. Please see this blog post for more information.

This update can be applied using SD Notary’s Check For Updates command (in the SD Notary menu). Alternatively, you can download the latest version from the blog post linked above.

Version 1.1 Changes:

  • The application is now multi-window/tab, so you can process multiple apps at the same time. Although uploading of apps for submission can only happen one file at a time, meaning submissions are queued, the polling for results can take place concurrently.

    The File menu contains relevant New and Close commands, and windows can also be closed via the close button.

  • The File menu includes a new submenu, Info For, whose commands allow you to query Apple’s servers for details of apps that have already been submitted for notarizing. When you submit an app, once it is uploaded Apple assigns it a unique ID, known as the Request UUID. These commands let you retrieve information based on the Request UUID. You can either copy a UUID from a page returned by the Fetch History command and use that; let the app retrieve the info for the most recent submission; or select the RequestUUID.txt file saved when you submit a file. If notarizing fails with the Staple Only command, this can sometimes give you more clues to why.

  • SD Notary now handles enclosed .dylib files.

  • The ability to cancel submissions is improved.

  • The Don't sign enclosures checkbox now works.

  • The label has been changed from Team Provider to Apple Team ID, and the scripting property has been changed accordingly.

  • The scripting interface has changed, with the introduction of the document class — each window is represented by a document. Documents can’t be saved, but they have properties, and respond to commands (see below). The existing application properties are mostly retained, except they now usually set default values used by new documents.

    The main windows collection lists only “true” windows, with a new sub-element class, window tab, listing all the tabs within a window. You can also manipulate windows and window tabs using the window’s parent window, tabbed, visible, and index properties.

    The submit app and staple app commands no longer take the app as the direct parameter, but rather require it as the at parameter. The change was necessary to allow the commands to be targeted at specific documents. If these commands (and others) are directed to the application rather than a document, they will first create a new document and address that.

    The submit app command has a new optional boolean parameter skipping stapling. This lets you submit an app, and staple it later.

    The document class has target file property. This returns a reference to the copy of the file submitted/uploaded/stapled, the path of which will change as the process progresses. If you use this property, read it after running your submit/staple command.

    A typical script to submit an app might look like this:

    set appFileOrAlias to choose file of type {"app"}
    try
        tell application id "com.latenightsw.Script-Notary" -- SD Notary.app
            set newDoc to make new document with properties {allow events:true, allow calendar access:true}
            tell newDoc
                with timeout of 10000 seconds
                    set notarizedCopy to submit app at appFileOrAlias without showing dialogs
                end timeout 
            end tell
            close newDoc
        end tell
    on error errMess number errNum from extraInfo
        -- handle error
    end try
    
    tell application id "com.apple.finder" -- Finder
        reveal notarizedCopy
    end tell
    

    To see how to manipulate windows and tabs, step through this script in Script Debugger:

    tell application id "com.latenightsw.Script-Notary" -- SD Notary.app
        -- wipe the slate
        close every document
        set doc1 to make new document
        set doc2 to make new document with properties {tabbed:false} -- add other props to suit
        -- now tab them
        set parent window of window of doc2 to window of doc1
        -- make third document
        set doc3 to make new document with properties {tabbed:true} -- add other props to suit
        -- untab it
        set tabbed of doc3 to false
        --tab it again, specifiying parent window
        set parent window of window of doc3 to window of doc1
        -- make doc3 standalone again
        set tabbed of window of doc3 to false
        -- bring doc1's window to front
        set index of window of doc1 to 1
        -- make sure doc2 is the first tab
        set tab index of window of doc2 to 1
        -- make sure doc1 is the visible tab
        set visible of window of doc1 to true
    end tell