What is AMWorkspace

Hi,

there's a class AMWorkspace introduced in 10.13

Does anyone know what it does ?

Documentation on every method is empty.

/* 
    AMWorkspace.h
    Copyright (C) 2006 Apple Inc. All rights reserved.    
    
    Public header file.
*/

open class AMWorkspace : NSObject {

    
    open class var shared: AMWorkspace! { get }

    
    open func runWorkflow(atPath path: String!, withInput input: Any!) throws -> Any
}

Replies

On modern systems workspaces don’t run within your own process but run within an XPC service (something we already discussed in your other thread).

AMWorkspace
is the client side of that service.

Documentation on every method is empty.

Yeah, that’s not good. Please file a bug against the docs.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Both AMWorkspace:

func runWorkflow(atPath path: String!, 
       withInput input: Any!) throws -> Any

and AMWorkflow:

class func run(at fileURL: URL, 
     withInput input: Any?) throws -> Any

have almost identical methods.

I'd like to understand use case distinction between those classes.


Filled in documentation enhancement request ID: 46624093.

I believe the

AMWorkflow
runs the workflow in your process whereas
AMWorkspace
runs it in the afore-mentioned XPC service.

Filled in documentation enhancement request ID: 46624093.

Thanks!

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"