I had a few automator actions developed under OSX 10.6, which successfully executed under automator without an issue. The binary products of these actions continues to work under OSX 10.7 (Lion), but compiling them from source fails.
In trying to debug this issue, I created the dirt simple "Hello, World" action, but it will not successfully execute in automator, both the ObjC and Applescript variant getting "launch 开发者_开发百科path not accessible", no matter where in the workflow they are placed.
The development path I have followed is:
- In XCode 4.1 (build 4B110, from the App Store), create a new project, and select Automator Action" as the type
- Set Output type to com.apple.cocoa.string
- Under the ObjC variant, change the runWithInput:error method to return @"Hello, World!" Under the AppleScript variant, change the runWithInput_fromAction_error_ method to return "Hello, World!"
- Compile the action via the run arrow
- Open the new action in finder via right click on the action under the Products group
- Double click on the action and let automator install it
- In automator, create a single item workflow (but have tried multi-item workflows) with the new action
- Execute the workflow via the run arrow and receive the "launch path not accessible" error
I have tried restarting xcode, restarting automator, removing my ~/Library/Automator directory after shutting down automator, and combinations of the above without change. At this point, however, I'm out of ideas.
Thanks for your help.
As per the comment recommendation, and for posterity, the issue appears to be localized to XCode 4.1. XCode 4.2 betas do not exhibit this behavior and appear to operate as expected following the workflow I outlined in the question.
after stopped searching for it, found an tutorial but can't test it anymore because I already upgraded to Xcode 4.2. It would be nice if someone could verify that: http://macosxautomation.com/automator/xcodefix/index.html
精彩评论