AMWorkflow sandbox issue

Originator:fraserhess
Number:rdar://9710209 Date Originated:01-Jul-2011 10:42 AM
Status:Open Resolved:
Product:Mac OS X Product Version:10.7
Classification:Bug Reproducible:Always
 
Summary:

My app, Viewfinder (http://connectedflow.com/viewfinder), uses AMWorkflow to communicate with Keynote (the workflow is attached). When I enable the app sandbox under Lion, the workflow does not run as expected.

Steps to Reproduce:

The following code is used to load a workflow from the app bundle and run it, passing in a file URL to a photo that has been downloaded:

+ (void)sendFileToKeynote:(NSURL *)pathURL;
{
	NSURL *url = [[NSBundle mainBundle] URLForResource: @"CreateKeynoteSlides" withExtension: @"workflow"];
	if(url) {
		NSError *workflowError = nil;
		id success = [AMWorkflow runWorkflowAtURL: url withInput: [pathURL path] error: &workflowError];
		if(!success && workflowError)
			[NSApp presentError: workflowError];
	}	
}

Expected Results:

Expected that the workflow would run and communicate correctly with Keynote.

Actual Results:

The workflow does not run and Console reports:

2011-07-01 10:31:20.352 Automator Runner[1548:707] Automator Runner is unable to establish a connection to the delegate.

Regression:

The workflow runs correctly on Lion with sandbox disabled and on Snow Leopard.

Notes:

I request the following entitlements in my app: app-sandbox, assets.pictures.write, files.downloads.read-write, network.client. I have tried adding temporary-exception.apple-events but this doesn't help.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!